Modify

Opened 4 weeks ago

Closed 4 weeks ago

Last modified 8 days ago

#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)

shot.png (202.4 KB) - added by kebisi 4 weeks ago.
Unknown keyCode 0xffff

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 weeks ago by stoecker

Resolution: fixed
Status: newclosed

In 17049/josm:

fix #19836 - add possibility for shortcuts to two actions

comment:2 Changed 4 weeks ago by stoecker

Milestone: 20.09

comment:3 Changed 4 weeks ago by kebisi

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:4 Changed 4 weeks ago by stoecker

In 17052/josm:

see #19836 - display main menu item for shortcut name

comment:5 in reply to:  3 ; Changed 4 weeks ago by stoecker

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!

Changed 4 weeks ago by kebisi

Attachment: shot.png added

Unknown keyCode 0xffff

comment:6 in reply to:  5 Changed 4 weeks ago by kebisi

Last edited 4 weeks ago by kebisi (previous) (diff)

comment:7 Changed 4 weeks ago by kebisi

Sorry, my mistake, issue "closed".

comment:8 Changed 8 days ago by stoecker

Ticket #13853 has been marked as a duplicate of this 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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.