Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open Minimap on Non-US keyboards #2812

Closed
tyrasd opened this issue Oct 21, 2015 · 8 comments
Closed

Cannot open Minimap on Non-US keyboards #2812

tyrasd opened this issue Oct 21, 2015 · 8 comments
Labels
bug A bug - let's fix this! usability An issue with ease-of-use or design

Comments

@tyrasd
Copy link
Member

tyrasd commented Oct 21, 2015

The keyboard shortcut to open the minimap (#2554) is the slash / character, which is input on a German keyboard layout via shift+7. iD doesn't trigger the minimap-toggle when pressing this key combo. Strangely, pressing the # character on a German keyboard opens the minimap on Chrome, but not on Firefox.

I'm assuming this is because of using the keyCode property here, which seems to be a bit broken:

Web developers shouldn't use the keycode attribute for printable characters […] especially those input with the Shift or Alt key pressed. When implementing a shortcut key handler, the keypress event is usually better.

@bhousel
Copy link
Member

bhousel commented Nov 3, 2015

Hmm, yeah keycode detection is kind of broken.

It's hacky, but maybe for now (in lieu of changing d3.keybinding) we can find a keycode on the German keyboard that isn't used for anything.

What codes do you get when you visit this jsfiddle, and try keys like ä,ö,ü,ß
http://jsfiddle.net/YKeye/

@bhousel bhousel added the usability An issue with ease-of-use or design label Nov 3, 2015
@tyrasd
Copy link
Member Author

tyrasd commented Nov 4, 2015

character keycode (chromium) keycode (firefox) keycode (old presto based opera)
/ 55 (then 16 on releasing the shift key) 55 (then 16) 55 (then 16)
ä 222 0 222
ö 192 0 186
ü 186 0 219
ß 219 63 109

It's a mess! 💩

@Abbe98
Copy link
Contributor

Abbe98 commented Nov 4, 2015

This is broken using Swedish and Norwegian keyboards too.

@bhousel
Copy link
Member

bhousel commented Dec 23, 2015

I did some research today, and yeah it's a mess. This will hopefully get better when DOM Level 3 Keyboard Events are implemented in all browsers, but that's a long way off.

For now some decent resources are Unixpapa's summary and this implementation by the noVNC developer.

@bhousel bhousel added the bug A bug - let's fix this! label Nov 1, 2016
@bhousel bhousel changed the title Cannot open Minimap on German keyboard Cannot open Minimap on Non-US keyboards Dec 18, 2016
@bhousel
Copy link
Member

bhousel commented Dec 18, 2016

Check French keyboard too, per #3660

@manfredbrandl
Copy link
Contributor

at the latest preview '/' (Shift-7) now works on my German keyboard

@magol
Copy link

magol commented Jun 6, 2017

And it works on Swedish keyboard to 😀

@tyrasd
Copy link
Member Author

tyrasd commented Jun 6, 2017

perfect

@tyrasd tyrasd closed this as completed Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this! usability An issue with ease-of-use or design
Projects
None yet
Development

No branches or pull requests

5 participants