News for hackers. Stuff that matters.
Re:Text Editing Hates You Too by babuskov on Tuesday October 29, 2019 @05:15AM (#21385277)
> I use a Swedish keyboard

AFAICT, Swedish keyboard has a dedicated key for ö. You just press it. I don't understand how an app can get stuck on keyboard layout if you set the system keyboard layout to Swedish. Could you give an example?

Or are you're actually using US keyboard with Swedish layout and there is no ö key on it?

Re:Text Editing Hates You Too by alkonaut on Tuesday October 29, 2019 @05:38AM (#21385386)
There are multiple things in play here: keyboard layout which is slightly different for a swedish keyboard https://en.wikipedia.org/wiki/QWERTY#Swedish and of course keyboard language which maps the key pressed to a character. You can mix and match those. Lacking the Ö key doesn't matter so long as pressing the key that is where the Ö key should be actually produces an Ö (which is the case e.g. with a US keyboard layout but a Swedish keyboard chosen in windows).

> Could you give an example?

It was a hypothetical, but in windows you have a per-app layout (so you can choose multiple keyboard layouts in windows and an icon in the systray will let you choose the active one) and that one often spuriously switches so suddenly you hit the Ö key and it produces a ';'. A better example is perhaps when I'm travelling and composing an email from someone elses computer at my office in Britain back to my office in Sweden. I'm not going to bother switching the windows settings just to write the email on that machine. Or if I'm logging on to a VM with only english layout so hitting my Ö key will produce a ; If I needed to type anything inside that VM desktop for whatever reason, I wouldn't bother trying to write Swedish even if the person I was typing to was Swedish.

> Or are you're actually using US keyboard with Swedish layout and there is no ö key on it?

Personally I actually do use a US keyboard wit ha Swedish layout, which works fine. If I hit the key labelled ';' it will show an Ö on screen. The reason is I wanted a specific type of keyboard that didn't exist with Swedish layout, and the layouts are almost equal. It's just one missing key between lshift and Z that doesn't exist in US layout.

Re:Text Editing Hates You Too by big_chungus on Tuesday October 29, 2019 @08:00PM (#21393392)
I can second that particular grief in windows. I use english input for most things but spanish for a few; it will randomly switch. This is doubly aggravating when I am in, say, vim and it messes everything up before I figure out why things aren't responding. Or, I go to put in a `[`, get nothing, press again and get `''`, or press a key and get `á`. Let alone if I'm trying to type programming-related chars in my spanish keymap (taking notes in markup syntax etc.); I then have to remember modified positions of keys (parentheses are the worst). Dealing with essentially all non-char keys getting hijacked is very confusing; just writing this, I have made several mistakes.

Honestly, English is uniquely suited to computer input. A narrowly-defined charset maps well to a situation where you can only fit so many keys on a keyboard or on a screen. I also sympathize with difficulties implementing languages that have ligatures, right-to-left reading, or other significant differences. Non-discrete chars just don't map well to a world of ones and zeroes, because representing all is the simplest option but has O(n!) complexity in such languages (assuming you can combine all, which is probably not possible, but you get the point). I have a great deal of sympathy for maintaining such complexity for what can be a very small part of your user-base (that is can communicate in only one foreign language).

Re:Text Editing Hates You Too by pmjordan on Tuesday October 29, 2019 @05:30AM (#21385353)
I assume this is about having to use other people’s devices, which aren’t configured how you’d configure your own.

I personally have muscle-memory for my own programming-optimised adaptation of Type 2 Dvorak, regular German layout, and UK/US/International variants of English keyboards, each in Mac and PC variants. And, I suppose, in mobile phone and tablet screen-keyboard variants.

It always takes a few seconds to adapt to whatever I’m sitting in front of, and I have a lot of practice with this compared to the average person.

At least in German, there are standard substitutions for when umlauts and sharp S aren’t available for technical reasons:

ä -> ae

ö -> oe

ü -> ue

ß -> ss (historically “sz“, which you still occasionally see, particularly where there is Hungarian influence; Swiss German tends to forego ß altogether)

Re:Text Editing Hates You Too by kstenerud on Tuesday October 29, 2019 @06:18AM (#21385560)
It happens to my wife's German USB keyboard in Windows 10. One day it's working fine, the next day pressing Z outputs a Y and Ä outputs a semicolon. I've had tons of problems with Japanese input in Linux and Mac (but not in Windows).

Multilanguage support is a function of how many customers demand it, and aside from English and Japanese, there hasn't been enough economic incentive to take it seriously.

Re:Text Editing Hates You Too by LaxisB on Tuesday October 29, 2019 @06:33AM (#21385622)
the windows issue might also be caused by accidentally pressing the hotkey (alt+shift i believe) to switch layouts. it's super easy to mis-trigger
Re:Text Editing Hates You Too by raverbashing on Tuesday October 29, 2019 @06:56AM (#21385719)
This is the correct answer, if you have two keyboards configured it's not uncommon to switch between them accidentally.
Re:Text Editing Hates You Too by big_chungus on Tuesday October 29, 2019 @08:07PM (#21393428)
It's win+space, and I regularly end up switched without pressing it. It triggers in error quite frequently.
Re:Text Editing Hates You Too by hackerNoose on Tuesday October 29, 2019 @07:29AM (#21385932)
"win key + space" lets you change the input method on windows
Re:Text Editing Hates You Too by alkonaut on Tuesday October 29, 2019 @08:01AM (#21386142)
I have done that hundreds of times. I have not done it deliberately even once. It's like playing that U2 album on my phone.
Re:Text Editing Hates You Too by yk on Tuesday October 29, 2019 @05:59AM (#21385483)
The keyboard sends a scancode, and something, either the text input of the OS, or the app themselves, translates that to an ö. Second, it is possible that the system just does not load the correct keyboard layout and defaults to US, so you loose your familiar keyboard layout precisely when you already have other problems.
Re:Text Editing Hates You Too by hyperman1 on Tuesday October 29, 2019 @08:13AM (#21386239)
Parts of the system hardware might also do scancode to text transcoding. When PS/2 to USB keyboard convertor cables were common, I've seen quite a few having trouble with keys not being correct for non-ASCII characters, especially when using Alt GR
Re:Text Editing Hates You Too by kps on Tuesday October 29, 2019 @01:29PM (#21389755)
There isn't text coding. The problem stems from the Microsoft-centric design of USB modifiers — there is no true AltGr code, so they have the convention (at the OS level) that left Alt is always Alt and right Alt is sometimes AltGr. A few early converters didn't grasp that left and right versions of the same modifier key could have different meanings, because nobody in their right mind would do that.
Re:Text Editing Hates You Too by ahje on Tuesday October 29, 2019 @05:34AM (#21385373)
He probably means using the ¨ modifier on a non-native keyboard. I do that daily after I picked up the habit of using Danish keyboards.

For the record, it's a habit you get used to rather fast; nowadays I use the ¨ modifier for ä and ö even when I'm using a Finnish keyboard.