#19836 closed enhancement (fixed)
Add keyboard shortcut for DownloadOsmInViewAction
Reported by: | kebisi | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.09 |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
Dear developers,
I would like to have a keyboard shortcut for https://josm.openstreetmap.de/wiki/Help/Action/DownloadOsmInView which has currently has none.
So I've tried to identify the right field
tr("Download in current view"), "download_in_view", tr("Download map data from the OSM server in current view"), null, → shortcut false, "dialogs/download_in_view", true);
and changed DownloadOsmInViewAction.java to
public final class DownloadOsmInViewAction extends JosmAction { /** * Creates a new {@code DownloadOsmInViewAction}. */ public DownloadOsmInViewAction() { super(tr("Download in current view"), "download_in_view", tr("Download map data from the OSM server in current view"), Shortcut.registerShortcut("file:download_currview", tr("File: {0}", tr("Download currview")), KeyEvent.VK_C, Shortcut.ALT), false, "dialogs/download_in_view", true); }
but this fails due to missing symbols.
What's the right way to add a shortcut key?
Attachments (1)
Change History (9)
comment:1 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 3 years ago by
Milestone: | → 20.09 |
---|
comment:3 follow-up: 5 Changed 3 years ago by
Thanks, that was quick. I've just recompiled JOSM.
When I try to assign a key it always becomes "Ctrl+Shift+Unknown keyCode: 0xfff". Even patching in KeyEvent.VK_B, Shortcut.ALT doesn't fix this.
comment:5 follow-up: 6 Changed 3 years ago by
Replying to kebisi:
When I try to assign a key it always becomes "Ctrl+Shift+Unknown keyCode: 0xfff". Even patching in KeyEvent.VK_B, Shortcut.ALT doesn't fix this.
What do you do? Go to JOSM settings and assign the key for the action there. You must not modify the code for key assignments!
In 17049/josm: