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

Add ² as hotkey to close the sidebar for azerty keboard users #5663

Closed
pietervdvn opened this issue Dec 30, 2018 · 6 comments
Closed

Add ² as hotkey to close the sidebar for azerty keboard users #5663

pietervdvn opened this issue Dec 30, 2018 · 6 comments
Labels
localization Adapting iD across languages, regions, and cultures

Comments

@pietervdvn
Copy link

Hello,

I love the 'close left sidebar' feature. Unfortunately, the ` key is quite hard to type on a azerty keyboard. Would it be possible to add ² as alternative?

Thanks a lot!

@bhousel
Copy link
Member

bhousel commented Dec 30, 2018

Would it be ok to just translate the sidebar.key string differently? see:
https://www.transifex.com/openstreetmap/id-editor/translate/#de/core/157285793?q=text%3A%60

You can change it to be something other than `

@bhousel bhousel added the localization Adapting iD across languages, regions, and cultures label Dec 30, 2018
@pietervdvn
Copy link
Author

I'm afraid not. I use iD in English, despite it not being my mother tongue. On the other hand, some areas which speak Dutch (as I do) use mostly qwerty (such as the Netherlands), whereas most people in Flanders use azerty.

@slhh
Copy link
Contributor

slhh commented Dec 31, 2018

@bhousel Do not assume matching of UI language and keyboard layout.

The main issue might be that the used shortcut key is a dead key (https://en.wikipedia.org/wiki/Dead_key#Dead_keys_on_various_keyboard_layouts) on many keyboard layouts, including the US-international one, but excluding the US layout.

I have tested with current Firefox and Edge on Windows 10 with German keyboard:
To generate the shortcut, I need to press the key + shift and the spacebar afterwards.
The shift requirement is added by the German keyboard layout, but the shift key is nearby.

The spacebar is required because the shortcut key is a dead key. We would likely need to listen to the keydown event to avoid this requirement.

Btw, the ² key wouldn't be a good replacement on German keyboards. It needs AltGr and both keys are far away. I think most people can't reach both keys simultanously with a single hand, even with widely spead fingers.

@bhousel
Copy link
Member

bhousel commented Dec 31, 2018

Do not assume matching of UI language and keyboard layout.

Oh, yes I know about this. But right now it's the best we can do. From a browser app we have no idea what the user's keyboard layout is. It's enough of a challenges just to be able to get the keycode that they pressed.

I think to solve this specific issue, I'll probably just bind a bunch of the keys that commonly appear up in the corner for various QWERTY, QWERTZ, AZERTY layouts.

@pietervdvn
Copy link
Author

For this specific issue, binding a bunch of common keys would be an appropriate fix - at least one that would work great for me. Looking forward to that!

@pietervdvn
Copy link
Author

<3

Thx mate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
localization Adapting iD across languages, regions, and cultures
Projects
None yet
Development

No branches or pull requests

3 participants