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

Localized keyboard shortcuts #4081

Closed
magol opened this issue Jun 3, 2017 · 21 comments
Closed

Localized keyboard shortcuts #4081

magol opened this issue Jun 3, 2017 · 21 comments
Labels
localization Adapting iD across languages, regions, and cultures

Comments

@magol
Copy link

magol commented Jun 3, 2017

All keyboard shortcuts are selected based on the US keyboard layout. This is problematic if you use a keyboard layout for another country as the characters are placed differently and you may have to use extra modification key(s) to reach some characters.

This means that some shortcuts that are easy to accomplish on an US keyboard may be difficult or impossible to do on other keyboard layouts.

In addition, many keyboard shortcuts are based on what things are called in English. It may not be obvious in some languages to press S to Save.

My suggestion is to enable localization of the keyboard shortcuts. This is really no controversial, many desktop applications already do so today. For example, if I want bold text in MS Word, I press Ctrl+B (Bold) in an English version and Ctrl+F (Fet) in a Swedish version.

Something to take into account is that the same language may have different keyboard layouts and that it differs between different platforms (Windows, Linux, Mac OS)

This issue is related to following issues:

@bhousel
Copy link
Member

bhousel commented Jun 3, 2017

All keyboard shortcuts are selected based on the US keyboard layout.

iD already does localize all the shortcuts for the operations. (Rotate, Move, Reflect, Combine, etc)

We could do some of the other ones too, but I'd want the "system" kinds of shortcuts to match whatever the OS does. (e.g. Ctrl+S Save, Ctrl+C Copy, Ctrl+V Paste - or whatever the OS does for that language)

Keys like ? and + are especially problematic because they don't work the same in all browsers, even within en-US keyboard layout. (now fixed, probably)

Something to take into account is that the same language may have different keyboard layouts and that it differs between different platforms (Windows, Linux, Mac OS)

How would we handle that?

@bhousel bhousel added the considering Not Actionable - still considering if this is something we want label Jun 3, 2017
@manfredbrandl
Copy link
Contributor

For me the (primary or only) aim of localizing keyboard-shortcuts is to be able to enable every user to use all shortcuts. Unusable shortcuts should not be shown at the '?'-shortcuts.

@slhh
Copy link
Contributor

slhh commented Jun 4, 2017

Supporting the different keyboard styles is neccessary, but this can't be a UI language based localization.
In general a localization of keyboard shortcuts has a severe disadvantage. Any explanation how to do things using shortcuts would be useless for users with different language setting. This does not only affect forum and mailing list content, but also direct support by PM.

@manfredbrandl
Copy link
Contributor

I now realised that I oppose localized keyboard shortcuts, because it complicates communication. Copy&Paste simply is Strg-C / Strg-V or 'international': Ctrl-C / Ctrl-V. Differences between languages are complicated enough.

@bhousel
Copy link
Member

bhousel commented Jun 9, 2017

I now realised that I oppose localized keyboard shortcuts, because it complicates communication. Copy&Paste simply is Strg-C / Strg-V or 'international': Ctrl-C / Ctrl-V. Differences between languages are complicated enough.

Yes I agree we shouldn't localize things like Ctrl-C / Ctrl-V, but we do already localize many of the keys and there are probably some more that we could do. I'll make a list.

This is an issue that might matter more to users of non-latin keyboards. As far as I know, keyboards in Kanji or Cyrillic also have latin letters on the key caps and use Ctrl-C / Ctrl-V like anyone else - however asking them to type H for Help or B for Background might be weird.

@bhousel
Copy link
Member

bhousel commented Jun 9, 2017

The current state of keyboard shortcut localization is below.

Green = We already allow a language to change the key
Red = We don't provide option to localize the key but we probably should.
All others = We don't provide option to localize the key and we probably should not.

Let me know if I have this right
cc @1ec5, who has localized Vietnamese shortcut keys

screenshot 2017-06-09 09 34 46

screenshot 2017-06-09 09 34 58

@1ec5
Copy link
Collaborator

1ec5 commented Jun 9, 2017

Yes, that looks about right. It would be worthwhile to localize the “With node selected” shortcuts too: many European keyboard layouts (e.g., Danish, Finnish, French, German on the Mac) lack labeled square and curly brace keys.

I’m not entirely sure about the full screen shortcut. On macOS, ⌃⌘F is the standard full screen shortcut in all applications and in all locales. Similarly, in Firefox on all platforms, Ctrl+Shift+F or ⇧⌘F is mapped to full screen. On the other hand, ⇧⌘F in Chrome toggles the full screen toolbar instead. But I guess that would be a separate issue.

@manfredbrandl
Copy link
Contributor

manfredbrandl commented Jun 9, 2017

I do agree with the proposed localisation including 'with node selected'. For those languages which are so unhappy as not having the same first letter for straighten and square (e.g. gerade biegen und rechtwinklig machen) please allow having extra keys. Btw: Do the icons before Shift, Return etc. stay? Then I would remove the symbols I added in the translation.

@bhousel
Copy link
Member

bhousel commented Jun 9, 2017

Btw: Do the icons before Shift, Return etc. stay? Then I would remove the symbols I added in the translation.

For display, the symbols are only shown if you're viewing it on a Mac, otherwise they are dropped, see here. This code also converts the names of the keys depending if you are on a Mac or not.

So for the translation, you don't need to include the symbols.
Also I just looked at Transifex - you definitely don't want to translate "Cmd" as "Win ⊞".
German Mac keyboards also say "Cmd".

@bhousel
Copy link
Member

bhousel commented Jun 9, 2017

. For those languages which are so unhappy as not having the same first letter for straighten and square (e.g. gerade biegen und rechtwinklig machen) please allow having extra keys.

Could you double check with the German community on their web forum and make sure this is really what they want, and if so open a new issue?

@bhousel
Copy link
Member

bhousel commented Jun 9, 2017

On macOS, ⌃⌘F is the standard full screen shortcut in all applications and in all locales.

Ok, in that case we should change it..

@1ec5
Copy link
Collaborator

1ec5 commented Jun 9, 2017

To be clear, both shortcuts currently work in iD. The only possible point of confusion is that it overrides Chrome's shortcut for toggling the toolbar.

@bhousel
Copy link
Member

bhousel commented Jun 10, 2017

To be clear, both shortcuts currently work in iD. The only possible point of confusion is that it overrides Chrome's shortcut for toggling the toolbar.

Yes, I think the intent was to just bind all of the common "full screen" OS shortcuts so that they all work no matter what OS or browser the user happens to be on.

So the fullscreen shortcuts should be ⌃⌘F and F11

@manfredbrandl
Copy link
Contributor

manfredbrandl commented Jun 10, 2017

full screen shortcut with double Strg instead of Strg Shift:
image

@bhousel
Copy link
Member

bhousel commented Jun 10, 2017

full screen shortcut with double Strg instead of Strg Shift:

Oh yeah I think we should only offer ⌃⌘F if the user is on a mac. I just pushed a change for this.

@manfredbrandl
Copy link
Contributor

Checked just now with Chromium Version 57.0.2987.98 Built on 8.7, running on Debian 8.8 (64-bit),
there is still Strg + Strg +F oder F11 for Vollbildmodus (full screen mode). This seems to be complicated.

@bhousel
Copy link
Member

bhousel commented Jun 10, 2017

Checked just now with Chromium Version 57.0.2987.98 Built on 8.7, running on Debian 8.8 (64-bit),
there is still Strg + Strg +F oder F11 for Vollbildmodus (full screen mode). This seems to be complicated.

Sorry about that, I think I got it fixed this time. Can you check http://preview.ideditor.com/master/ again

It unfortunately is complicated because the code does slightly different things for mac/windows/linux.

@manfredbrandl
Copy link
Contributor

Check just now with Chromium on Debian as above, it reads F11 only for full screen mode.
Also checked with Firefox on Debian, where i cannot leave full screen mode (Neither F11, nor Esc nor Strg Shift F helps)

@bhousel
Copy link
Member

bhousel commented Jun 11, 2017

Check just now with Chromium on Debian as above, it reads F11 only for full screen mode.

Sounds good..

Also checked with Firefox on Debian, where i cannot leave full screen mode (Neither F11, nor Esc nor Strg Shift F helps)

I'm not going to be able to figure out why it gets stuck on Firefox and Debian, but if you want to dig into that issue, the code is here.

@manfredbrandl
Copy link
Contributor

manfredbrandl commented Jun 12, 2017

I'm not going to be able to figure out why it gets stuck on Firefox and Debian, but if you want to dig into that issue, the code is here.

As the next Debian release will come soon I will not test the old one. Maybe the problem is gone in a week.

@bhousel bhousel added localization Adapting iD across languages, regions, and cultures and removed considering Not Actionable - still considering if this is something we want labels Jun 13, 2017
@bhousel
Copy link
Member

bhousel commented Jun 18, 2017

I added ability to localize these shortcuts:

  • H : Help
  • ? : Keyboard Shortcuts
  • ⌘I : Infobox
  • B : Background
  • ⌘B : Switch Background
  • F : Map Data
  • W : Wireframe
  • / : Minimap

I'd like to not change the vertex navigation keys right now. We fixed handling of AltGr, so it might be easier for Germans to use {[]}\ now, and I don't see any other obvious keys that would work well as forward/backward.

A few of the default keys like B and ? are still hardcoded in the help text, but updating and rewriting that is #4018

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

5 participants