Earlier quoted context omitted.
Question then - what do you use functionally to replace "Escape" in your daily use? As a native English-speaking engineer, the escape button has a history of doing exactly what you're suggesting it not do going back to the beginning of computing.
The standard behavior of Esc is to abort the current interaction - which is not the same as closing the dialog. For example, if you have a dialog with a drop-down list, and open that list, Esc should close it, not the whole dialog. In this scenario, the "current interaction" is IME input. The bug is that the page intercepts Esc keypresses intended to be handled by it.
Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
181–190 of 212 posts
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#182Earlier quoted context omitted.
Last time I needed a new laptop (my old one died) I took a 8 hour train to travel to the Netherlands from Munich instead of back home to Berlin (where I live) just so I could visit a store that has laptops with a non German layout (US international). The only way to get a non German keyboard in Germany is to order them online and wait for a week+ (typically) for that to ship internationally (because they don't stock…
I would guess that the amount of people who care about which keyboard layout they use, don't use the local keyboard layout, and require appropriate labeling of keys (i.e. don't touch type) at the same time isn't that high. I can imagine how annoying it must be to be in that group, though.
Some, of those people buy locally and suffer the bad experience of dealing with a sub optimal keyboard. But a lot of them take their money abroad. Local businesses are missing out on that, which IMHO is kind of stupid.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#183One of many reasons i switched from a Euro ISO layout to a QWERTY ANSI layout a while ago. It took me about 3 weeks to get comfortable with QWERTY ANSI, plus another 2 months to fully get back to my regular typing speed. 100% worth it tho if you need a bunch of special characters as you regularly do with most programming languages. Some tips: - switch out ALL you keyboards, at home, at work, on all devices - use EurK…
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#184Earlier quoted context omitted.
Seems easy to fix > Windows for backwards compatibility reports 'right-alt' as 'alt+control'. There’s your problem, right there
No, there are at least two problems here. An application shouldn't accept ctrl+alt+n as either ctrl+n or alt+n. That is simply a bug, no way around it.
I would argue that the bug is implicitly pressing Control. Control is not a layer modifier.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#185I use an English keyboard for development.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#186There is also a whole slew of issues with Polish characters. Polish keyboard setup relies on "right-alt" and a letter to get it's diacritics variation. Ie: 'ą' is 'right-alt'+a Windows for backwards compatibility reports 'right-alt' as 'alt+control'. Many applications developers assign key combos with no negative checks. So 'ctrl-s', typically used for save gets triggered when user wants to type 'ś'. To repeat, "righ…
> Windows for backwards compatibility reports 'right-alt' as 'alt+control'. Interesting because on French AZERTY we also have an "altgr" key, and while Windows considers alt-control equivalent (ie. you cant type alt-control-à as well as altgr-à to get an @), typing altgr itself never triggers ctrl or alt shortcuts, it only goes the other way.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#187It switches to a US layout if ctrl/lalt/cmd are pressed, including switching `Z` and `Y`:
https://github.com/ivancuric/mac-hr-sane-layout
MacOS is notoriously bad for handling international shortcuts. Eg, `Cmd+[` is back system-wide. To get [ on my keyboard I need to press `AltGr + F`. `Cmd + AltGr + F` doesn't work, of course.
Where the `[` character is on a US keyboard, I have `Š`. `Cmd + Š` also doesn't work. Manually recording a shortcut to rebind it to `Cmd + Š` also used to output `Cmd + Ctrl + Alt + F`, which seems to be fixed at some point in the last 3 years.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#188TL;DR. Don't use keypress, it's deprecated. Don't use 'keyCode', 'which', 'char' which are all deprecated. Do use 'key' Another issue I run into is forms that dismiss via keydown and escape. I type in Japanese which means I'm using an IME. An IME, or at least the Japanese IME, you type characters and they appear with possible completions. They haven't actually been given to the app yet. Pressing Escape cancels the co…
Not sure if I agree with this summary of my article. For most web apps with relatively few keyboard shortcuts, I would actually recommend to use keypress. keyCode/which/charCode work when used with keypress. The article mentions an open-source example that does it this way and works fine on international layouts: Discourse
https://developer.mozilla.org/en-US/docs/Web/API/Document/ke...
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#189One of many reasons i switched from a Euro ISO layout to a QWERTY ANSI layout a while ago. It took me about 3 weeks to get comfortable with QWERTY ANSI, plus another 2 months to fully get back to my regular typing speed. 100% worth it tho if you need a bunch of special characters as you regularly do with most programming languages. Some tips: - switch out ALL you keyboards, at home, at work, on all devices - use EurK…
How did you cope with the horizontal enter key? That is the single most unpleasant thing whenever forced on ANSI. (I'm not a touch typist)
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#190I 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…