Skip to content

Keyboard shortcuts do not take keyboard layouts into consideration #9227

Closed

Description

@Clorith

The keyboard shortcuts we've added doesn't take keyboard layouts into consideration.

One great example is CTRL+`, the grave key requires you to hit shift+\ +space to print just a single grave on a Norwegian keyboard, this means the shortcut does not work at all for us.

Taking all keyboard layouts into consideration is understandably not an option, but let's try to avoid special symbols/characters whenever possible and we'll have sorted the scenarios for this that I can think of at the very least.

Activity

  1. jasmussen commented on Aug 22, 2018

    @jasmussen
    Contributor

    What I'm about to say is not the solution to this issue, but nonetheless worth mentioning.

    Please try pressing Ctrl+[the key that sits below escape] on your norwegian keyboard. It should work. On my danish keyboard that character is $. In other words, in that specific case, the "geographical" keyboard shortcut works. For the time being this exists because it sits in a nice place next to tab, and has similarish functionality, and because it has a more generic Shift+Option+N keyboard shortcut to do the same.

  2. aldavigdis commented on Aug 22, 2018

    @aldavigdis
    Contributor

    This underlines my point of view that we need to have some sort of unified policy about keyboard shortcuts in general. See #9190 for example.

    In cases where there is a limited set of locales to work with or resources to do user testing for each locale, I would suggest making it depend on the locale. But I don't think it is the right way forward for WordPress/Gutenberg in general.

    I think we need to limit most keyboard shortcuts to alphanumerics. Symbols such as [ or ] don't have dedicated keys on many keyboard layouts and - has a very inconsistent location.

  3. added
    [Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).
    Needs DecisionNeeds a decision to be actionable or relevant
    on Aug 22, 2018
  4. aldavigdis commented on Aug 22, 2018

    @aldavigdis
    Contributor

    @jasmussen The key below esc doesn't exist on my external keyboard, but on my built-in Mac keyboard, it results in ° if pressed directly and on MacOS (and not on Windows), it's combined with alt to enter Danish/Norweigian Ø.

  5. aldavigdis commented on Aug 22, 2018

    @aldavigdis
    Contributor

    One thing to add is that even if there are published ISO standards for each keyboard layout, they are expensive to obtain and are not always followed by OS vendors.

  6. jasmussen commented on Aug 23, 2018

    @jasmussen
    Contributor

    One thing to add is that even if there are published ISO standards for each keyboard layout, they are expensive to obtain and are not always followed by OS vendors.

    Can you elaborate a bit on this?

    This is definitely a balancing act. For example Shift+? in nearly all Google apps open a shortcut sheet. The ? key is in the same place, I think, on most keyboards. Only on my Danish keyboard, it doubles as the + key, which means for me to type out ?, I have to hold shift first. So in a way, the keyboard shortcut on danish keyboards in Google apps is actually Shift++. But somehow this doesn't seem to cause any misunderstandings.

  7. aldavigdis commented on Aug 23, 2018

    @aldavigdis
    Contributor

    Can you elaborate a bit on this?

    Basically — There are actual National/ISO standards for keyboard layouts but as a general rule, they can only be obtained for payment and the terms are very draconian. Operating systems then extend upon those, with MacOS-specific layouts being known for that. Fun stuff.

    This is definitely a balancing act. For example Shift+? in nearly all Google apps open a shortcut sheet.

    I've got Google Apps open right now and this does work for the US-English layout and doing CMD+/ does give me that popover, but I can't find a way to reproduce it with Danish, German or Icelandic layouts.

  8. jasmussen commented on Aug 23, 2018

    @jasmussen
    Contributor

    Basically — There are actual National/ISO standards for keyboard layouts but as a general rule, they can only be obtained for payment and the terms are very draconian. Operating systems then extend upon those, with MacOS-specific layouts being known for that. Fun stuff.

    Really, that's super interesting. That seems like a weirdly kept secret in this age of information. It does seem to explain why it's so hard to find documentation on how to create cross-locale keyboard shortcuts.

    I've got Google Apps open right now and this does work for the US-English layout and doing CMD+/ does give me that popover, but I can't find a way to reproduce it with Danish, German or Icelandic layouts.

    Hmm. Can you open Google Inbox and type Shift + ? and see if that works?

  9. Clorith commented on Aug 23, 2018

    @Clorith
    MemberAuthor

    Yeah, with a Norwegian keyboard like mine, I can't do the "next block" movement as the grave requires too many key combinations and are therefore ignored by our shortcuts (I can't hold down ctrl while also hitting shift+\ followed by space, the space is needed to print the character, it is not registered as existing until it has a letter to go over, or a space to force it by it self), I believe it's because of the need for any input character following to print it that breaks the shortcut though. I know on my US keyboard the ` is a stand alone button you can hit, making it much more accessible as a shortcut.

  10. aldavigdis commented on Aug 23, 2018

    @aldavigdis
    Contributor

    It does seem to explain why it's so hard to find documentation on how to create cross-locale keyboard shortcuts.

    On that topic, if you're on a Mac, try having a look at Pages' top menu to have a look at the keyboard shortcuts there. They seem to be doing their best to stick with alphabetical keys in combination with modifiers.

    Hmm. Can you open Google Inbox and type Shift + ? and see if that works?

    Got it! In Google Drive, it's bound to the physical key, which would be Þ in the Icelandic layout. As far as I know, the Gutenberg project has been binding shortcuts to the symbols, not the physical keys, which also makes things confusing.

  11. aldavigdis commented on Aug 23, 2018

    @aldavigdis
    Contributor

    Issue #3218 from @afercia is for a similar topic.

  12. afercia commented on Aug 23, 2018

    @afercia
    Contributor

    Apart from the considerations made in #3218, a couple shortcuts have been added as alternative to the backtick shortcut CTRL+` in #8005:

    • shift+alt+n to go to the next region
    • shift+alt+p to go to the previous region

    /Cc @Clorith

    Just for reference, the Norwegian keyboard layout is not the only one where the backtick key is absent or hard to use. As noted in #3218, it's missing also (at least) in the Italian, Dutch, Finnish, and French keyboard layouts.

  13. aldavigdis commented on Aug 23, 2018

    @aldavigdis
    Contributor

    I'm always a fan of having navigation buttons right next to each other.

  14. removed
    Needs DecisionNeeds a decision to be actionable or relevant
    on Aug 24, 2018
  15. afercia commented on Feb 26, 2019

    @afercia
    Contributor

    I guess this can be closed now, but a more general solution is necessary and there's #3218 for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions