Opened 15 years ago
Closed 8 years ago
#2205 closed defect (fixed)
Keyboard handling of map chooser hardcoded (not in hotkey handler)
Reported by: | --IKS-- | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core shortcuts | Version: | latest |
Keywords: | keyboard shortcut download slippy map chooser usability | Cc: |
Description (last modified by )
The usability of map-representations espacially on the download-dialog is quite poor if you don't have a scroll-wheel and a right mouse button (laptops, netbooks, mac-books, ..)
It would be nicer if the 'well known' keyboard shortcuts used in the main-map were used in all map-representations (world-image, slippy map-chooser, ...)
Attachments (1)
Change History (14)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
There is a map controller implementation for the map component also used in JOSM that implements map moving via keyboard:
BTW: The project license is GPL, there it wold be no problem to copy the relevant parts into JOSM.
comment:3 by , 15 years ago
Owner: | changed from | to
---|
by , 15 years ago
Attachment: | SlippyMapKeyMovement.diff added |
---|
comment:4 by , 15 years ago
Summary: | Make map-moving keyboard shortcuts availalable on all map-representations → [Patch] Make map-moving keyboard shortcuts availalable on all map-representations |
---|
The hint about PreviewMapController.java was great. I copied the useful stuff into OsmMapControl.java and adapted the help text on the bottom of the SlippyMapChooser download tab.
Therefore map movement via cursor keys is now possible as well as zooming in/out via Ctrl or Alt + cursor up/down.
comment:5 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
Please change that according to src/org/openstreetmap/josm/gui/MapView.java and src/org/openstreetmap/josm/gui/MapMover.java to use the internal shortcurt handling as well.
comment:6 by , 15 years ago
Well, changing it to the same (user configured) keys as the world map is not that much of a problem - but afterwards it will not work very well anymore:
By default the keys for movement are Ctrl + cursor key
The problem is that Java has some wired login when registering keyboards shortcuts for the release event that use a modifier (key combination with Ctrl/Shift/Alt).
Example:
User presses Ctrl + right - map moves right
User releases Ctrl - map still moves right
User releases cursor right - map still moves right!
The only workaround I see at the moment is registering (base on the user configured key combination) all possible combination for the release event - but IMHO it is a very ugly workaround with lots of potential side effects and therefore I don't plan to implement it.
If somebody has a alternative solution this would be the right time...
comment:7 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
Summary: | [Patch] Make map-moving keyboard shortcuts availalable on all map-representations → Keyboard handling of map chooser hardcoded (not in hotkey handler) |
Applied in r1602, but I'm not totally happy with it.
Would it be usable to allow only single keys and not key combinations?
Does your described problem also affect main josm display?
The plain non slippy map downloader handling should also be fixed.
comment:8 by , 15 years ago
I just checked how it is implemented for the main map view. To make it short the implementation listening I copied from the PreviewMapController.java works - but it uses a very complicated way which has the mentioned problem with key combinations. I did not question the implementation if it follows the KISS (Keep It Simple and Stupid) approach as I am not an expert of Javas inputmap/actionmap system.
With the knowledge I gained e.g. from JOSM's MapMover class I will be able to simplify the implementation so that it will work for all keys and key combinations.
comment:10 by , 14 years ago
Priority: | trivial → minor |
---|---|
Type: | enhancement → defect |
comment:11 by , 14 years ago
After deleting the text (how to zoom with keyboard) gets frustrated while using the josm standards (+-).
BTW there is a problem with focusing the map. If it is not focused, the keyboard short cuts will not work.
comment:12 by , 10 years ago
Component: | Core → Core shortcuts |
---|
comment:13 by , 8 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed long ago
Ticket #2569 has been marked as a duplicate of this ticket.