Modify

Opened 12 years ago

Closed 10 years ago

#7626 closed enhancement (fixed)

Shortcuts in toggle dialogs: Enter, Spacebar, Up/Down

Reported by: akks Owned by: team
Priority: normal Milestone:
Component: Core shortcuts Version:
Keywords: shortcuts Cc:

Description

During fixing #7463 I noticed that keys Enter/Spacebar in toggle dialog tables and lists are often ignored or does not do anything useful (when table or list item is focused, not the buttons). This behavior was changed in #7131 for properties dialog, there was no complains so far :)

I tried to add most useful actions on Enter and Spacebar (only when some item is selected and focused):

  • activate layer = Enter in Layer List toggle dialog
  • show/hide layer = Spacebar in Layer List toggle dialog
  • zoom to one of selected items = Enter in Selection List toggle dialog
  • open history of primitive = Enter/Spacebar in History toggle dialog
  • toggle map style = Enter/Spacebar in Map Style toggle dialog
  • select relation = Enter in Relation List toggle dialog
  • edit relation = Ctrl-Enter in Relation List toggle dialog (because Ctrl-DoubleClick already works)
  • select primitives with error = Enter in Validator toggle dialog

I am committing the changes and creating this ticket for feedback - I hope there are no errors, regressions, but anything could happen... Maybe some extra changes are needed or better solution exist.
Current behavior of keys should be untouched if no item of list/table is manually selected.

Attachments (0)

Change History (9)

comment:1 by akks, 12 years ago

In 5200/josm:

see #7626, fix #7463: keys Ctrl-Shift-Up/Down, Enter, Spacebar work better in toggle dialogs
Enter and Spacebar = useful actions for list items (select, toggle, etc.)

comment:2 by akks, 12 years ago

Here is the jar for today testing (while latest is 5199): http://dl.dropbox.com/u/63393258/josm-custom.jar

comment:3 by Don-vip, 12 years ago

r5200 cause some problems with the Enter key. There's still something to do, I'm looking.

comment:4 by Don-vip, 12 years ago

At http://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java?rev=5200#L32:

         b.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_Q,0), "enter");

It should be VK_ENTER, right ?

comment:5 by Don-vip, 12 years ago

In 5367/josm:

see #7626 - Fix usage of key "Enter' in dialogs

comment:6 by akks, 12 years ago

Thank you! Very strange I missed such a mispell :)

comment:7 by Don-vip, 10 years ago

Component: CoreCore shortcuts

comment:8 by akks, 10 years ago

Guess it can be closed too. No more related ideas?

Last edited 10 years ago by akks (previous) (diff)

comment:9 by Don-vip, 10 years ago

Resolution: fixed
Status: newclosed

Yep :) if new ideas new ticket :)

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.