So indeed avoid symbols. If the application needs more shortcuts, then use prefix keys for less frequently used shortcuts or allow the user to type commands.
Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
141–150 of 212 posts
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#142As a kid, I remember being utterly confused, when most games with a console would have the key ` to open it. WTF is the key ` and where is it? For a kid it wasn't that easy to understand that there are such things as different keyboard layouts. Turns out that ` is a single key press to the left of the '1', in English, while it is a bit obscure character to write in other languages. In mine, you have º and ª in that p…
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#143It's not just international keyboards that are affected by this. I'm a Dvorak user so I run into these issues from time to time. As the article explains, there is a difference between the physical keyCode and character it corresponds to. Which to use really depends on what it is being used for, and there are situations for both. The article suggests checking the character typed, but this is not always the correct way…
Is there a programmatic way to figure out what letter corresponds to a given keycode without that key being pressed? Because you may have to display that info somewhere to give an indication what the user has to press.
Here is the function for macOS:
https://developer.apple.com/documentation/coreservices/13905...
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#144I mostly write in English (plus Clojure, shell, and C#), but often also in Spanish, French and Finnish. I've found that a standard QWERTY/US layout with a Compose key is the best option. It gives you a decent layout for coding and shell related characters, and all diacritics (and plenty more) are a 3 keystroke chain away (with no chording). Even when writing French, which requires a lot of accents, I find it more flu…
I only wish there was good support for it on Linux and Windows. I will eventually contribute a patch to xkb to fix its version of this.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#145(I'm from the UK, so I only really lose the British currency symbol)
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#146Earlier quoted context omitted.
Is there a programmatic way to figure out what letter corresponds to a given keycode without that key being pressed? Because you may have to display that info somewhere to give an indication what the user has to press.
Not that I know of. Also, not that “alt-s” will produce an s character on a US keyboard on windows, but will not produce an s on MacOS with a US layout - alt-anything will produce all sorts of interesting characters on MacOS.
https://developer.apple.com/documentation/coreservices/13905...
My memory is that if you press option E on a Mac, the translation function reports a non-zero state but no character output. You can detect this and call the translation function again with a space to get the diacritic by itself.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#147Earlier quoted context omitted.
Really shows how useful macs having 4 modifier keys (versus PC’s 3) is. Also the better (though not perfect) matching of scopes and modkeys: on macs, command / control / option tend to affect different system areas entirely (with command taking precedence, then control, although control and option are rarely used together).
I do like Cmd+c vs Ctrl+c on a mac. On linux I've changed my terminal to use Ctrl+Shift+c instead of Ctrl+c for ^C because I kept accidentally killing programs when trying to copy text with Ctrl+c which works in every app except terminals...
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#148> What baffles me is that the problem exists in apps used by millions of people every day, developed by gigantic corporations who pride themselves with having the best engineers in the world. Why is this baffling? Because the underlying technical issues are rather trivial! > Hint for developers: Switch your computer’s keyboard layout to something other than US to debug your application’s shortcut handling on differen…
Monolinguals, especially those living in the United States, are a minority globally. If you're going to develop all software in the United States, please at least make it work for the rest of us.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#149Earlier quoted context omitted.
I think back in the day (typewriters thru... 90s?) you wrote quoted text `like this.'
This is how both TeX and m4 do quoting by default so presumably common when they were created (mid-eighties and early seventies respectively IIRC)
Similarly, LaTeX uses `` and ‘’ for double quotes because the opening and closing symbols are not the same in properly typeset texts.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#150On a tangent, why are non-qwerty keyboards so poorly designed for programming? And specifically, why is apple’s azerty layout so terrible? Just look at this image: https://i.stack.imgur.com/3LL8a.png Can you find the [ and ] keys? If you’re having trouble, it’s because you have to use 2 (two!) modifier keys and activate the ( or ) keys, which themselves are clumsily placed. This cannot be typed one-handed in a comfor…
Honestly that's one of the reasons I'm happy with the Logitech Craft: it lets me use a proper Azerty layout yet silent like the Apple keyboards (plus I can control both my computers from a single keyboard, but that's more an edge case).