#16453 closed enhancement (fixed)
Support other keyboard layouts than QWERTY/AZERTY for ReorderImageryLayers action
Reported by: | Don-vip | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | 18.07 |
Component: | Core imagery | Version: | |
Keywords: | keyboard | Cc: | wiktorn |
Description
Follow-up of #11556. It does not work for QWERTZ layout used in German-speaking countries. And also for all other layouts than QWERTY/AZERTY.
It's really hard to get physical key codes in Java (scancodes). It either requires JNI/JNA (no-go for JOSM) or reflection into OpenJDK classes, but it seems to work only for Windows (also no-go).
We can't register all possible keys at the same time but maybe we can, based on current locale, register the three/four plausible characters. Even if not perfect, this should work for most of our users.
Attachments (1)
Change History (27)
follow-up: 4 comment:2 by , 6 years ago
Replying to Don-vip:
The goal is to use the key next to "1".
It's really hard to get physical key codes in Java (scancodes)
Why is this so important in this case? Why not handle it like with all other shortcuts: Simply assign a default shortcut and if the user is not happy with the choice he can change it.
by , 6 years ago
follow-up: 5 comment:3 by , 6 years ago
(BTW, not sure about other languages, but ~
is not a dead key on german keyboards, it is displayed immediately.)
comment:4 by , 6 years ago
Replying to Klumbumbus:
Why is this so important in this case? Why not handle it like with all other shortcuts: Simply assign a default shortcut and if the user is not happy with the choice he can change it.
I find this so well located (no need to search it on the keyboard) that I would like all JOSM users benefit from this default settings, not just those using the American, German and French keyboards :)
comment:5 by , 6 years ago
Replying to Klumbumbus:
(BTW, not sure about other languages, but
~
is not a dead key on german keyboards, it is displayed immediately.)
We don't display this text, Java does by itself. I don't know why.
comment:6 by , 6 years ago
Cc: | added |
---|
@wiktorn: what's the character displayed in the first key on this keyboard? https://upload.wikimedia.org/wikipedia/commons/c/c0/Klawiatura_Polski_214.jpg
comment:8 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:10 by , 6 years ago
One suggestion - change the function to go up or down the list of images and then use the up/down or left/right arrow along with another key like Alt. Up/Down would be closer to the layers box showing the imagery.
comment:11 by , 6 years ago
Replying to Don-vip:
@wiktorn is it the ogonek?
It looks like modifier key for both ogonek and dot. Though I've never used this keyboard layout. Most common in Poland is Polish programmer layout, which is very similar to EU layouts and has tilde character in the top left.
Though under Windows (but not under Linux/FreeBSD) tilde key is used as modifier for ogonek characters.
comment:12 by , 6 years ago
Doesn't work for QWERTY keyboards either. On Ubuntu 17.10 if I reassign reorder imagery to back quote it will work with a keyboard layout without dead keys (assigning it to shift+back quote makes the tilde key start to work). With a keyboard layout using dead keys I can't get it to work at all (I can tell the dead keys are working because I can enter text with the accents into JOSM).
comment:14 by , 6 years ago
@Klumbumbus, @gokehufu, @wiktorn: please test with JOSM latest (r14012+) and your respective keyboard layout.
comment:16 by , 6 years ago
On my Linux EN:US keyboard, the backquote "`" works, but the Tilde "~" (Shift Backquote) does not work.
comment:17 by , 6 years ago
That's intended, the shortcut is without modifier, so it doesn't work if you press Shift. Tilde is meant for keyboard layouts where backquote and tilde are inversed.
comment:19 by , 6 years ago
Now works on US Eng on Ubuntu 17.10. Doesn't work with US Eng International (guess that's because it's a dead key in that layout).
comment:20 by , 6 years ago
I have 3 shortcuts in the preferences now: "circumflex", "closing quotation mark" and "~". None of them work on german QWERTZ. The only one without modifier is circumflex and this is displayed in the imagery menu too. It is a dead key in this layout too.
comment:23 by , 6 years ago
comment:25 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I think this is fixed. I wasn't able to make it work with Spanish and Icelandic keyboard layouts, but that's a Java bug I can't workaround. Please reopen if it doesn't work for another keyboard layout.
Replying to Don-vip:
Your're right, however:
²
toStrg+Umschalt+²
(=Ctrl+Shift+²
)²
viaAltGR+2
or mostlyCtrl+Alt+2
(notice2
vs.²
andShift
vs.Alt
)Tilde (Dead)
key on my keyboad, only~
;)