Modify

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 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 15 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 by anonymous, 15 years ago

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

comment:2 by anonymous, 15 years ago

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 by jpstotz, 15 years ago

Owner: changed from team to jpstotz

by jpstotz, 15 years ago

Attachment: SlippyMapKeyMovement.diff added

comment:4 by jpstotz, 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 stoecker, 15 years ago

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 by jpstotz, 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 stoecker, 15 years ago

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 by jpstotz, 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:9 by stoecker, 14 years ago

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

comment:10 by bastiK, 14 years ago

Priority: trivialminor
Type: enhancementdefect

comment:11 by vsandre, 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 Don-vip, 10 years ago

Component: CoreCore shortcuts

comment:13 by Don-vip, 8 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.