Modify

Opened 14 years ago

Closed 7 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 Don-vip)

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)

SlippyMapKeyMovement.diff (17.1 KB) - added by jpstotz 14 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 14 years ago by anonymous

Ticket #2569 has been marked as a duplicate of this ticket.

comment:2 Changed 14 years ago by anonymous

There is a map controller implementation for the map component also used in JOSM that implements map moving via keyboard:

https://trekbuddyatlasc.svn.sourceforge.net/svnroot/trekbuddyatlasc/trunk/src/tac/gui/mapview/PreviewMapController.java

BTW: The project license is GPL, there it wold be no problem to copy the relevant parts into JOSM.

comment:3 Changed 14 years ago by jpstotz

Owner: changed from team to jpstotz

Changed 14 years ago by jpstotz

Attachment: SlippyMapKeyMovement.diff added

comment:4 Changed 14 years ago by jpstotz

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 Changed 14 years ago by stoecker

Owner: changed from jpstotz to --IKS--
Status: newneedinfo

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 Changed 14 years ago by jpstotz

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 Changed 14 years ago by stoecker

Owner: changed from --IKS-- to team
Status: needinfonew
Summary: [Patch] Make map-moving keyboard shortcuts availalable on all map-representationsKeyboard 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 Changed 14 years ago by jpstotz

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:9 Changed 13 years ago by stoecker

Ticket #4038 has been marked as a duplicate of this ticket.

comment:10 Changed 13 years ago by bastiK

Priority: trivialminor
Type: enhancementdefect

comment:11 Changed 13 years ago by vsandre

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 Changed 9 years ago by Don-vip

Component: CoreCore shortcuts

comment:13 Changed 7 years ago by Don-vip

Description: modified (diff)
Resolution: fixed
Status: newclosed

Fixed long ago

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.