Custom SK keyboard layout unable to type uppercase 'o' with circumflex (Ô)

0

The Slovak keyboard layout has a bizzarre amount of dead keys for typing all sorts of foreign symbols. These are unnecessary, since the entire Slovak language can be covered with just one dead key and its shift modifier... except two abnormalities, äÄ and ôÔ. The layout is also unusable for programming and system administration tasks, as it lacks many of the needed special characters. I wanted to make a custom layout that acts as en-US, but can also produce the full range of Slovak characters. And I succeeded, but the custom input sequence for Ô is not working.

The dead key for ¨ (DIAERESIS) is U+00a8, achieved with Ctrl+Alt+-.
The dead key for ˆ (CIRCUMFLEX ACCENT) is U+005e, achieved with Ctrl+Alt+3.

I have created a custom layout based on Slovak with the following changes:
Ctrl modifier added to U+00b4 (=,ACUTE ACCENT) and U+02c7 (Shift+=, CARON).
Modifier for U+00a8 (-,DIAERESIS) changed from Ctrl+Alt to Ctrl+Shift.
Characters ôÔ manually added to U+02c7 (CARON) as 006f/00f4 (o->ô) and 004f/00d4 (O->Ô).
All other dead keys removed.

Everything works fine, but when I try to produce Ô by entering the sequence Ctrl+Shift+= Shift+o, it is not recognized and comes out as ˇO. The lowercase version works, for some baffling reason. Could someone tell me if there's a simple way to fix this? Have I made a trivial mistake, or does the SK locale have some sort of hardcoded logic that prevents this sequence from working? I can remap U+005e as a last resort, but I would prefer my more compact version if possible.

EDIT:
Further testing has revealed more jank in the Slovak locale. Under some conditions, certain custom sequences will fail unless another is input first during the runtime of the program.

In addition, I discovered that the layout works properly on Windows 10. So it's possible this is a defect in Windows 7 that was never patched.

theultramage

Posted 2019-05-29T17:24:14.507

Reputation: 148

1Can you use the US-International keyboard layout? I routinely use it, and it handles everything I need for the multilingual text processing I do - but I don't have to handle Slavic languages, which seem to have the hacek (inverted circumflex) as an accent, and which the US-Int layout doesn't handle. – Jeff Zeitlin – 2019-05-29T18:39:06.160

You are right. WIth plain US as base, it's possible to enter all my desired sequence, including the one that's malfunctioning under SK. In fact, all I have to do is change the LOCALENAME/LOCALEID in the layout source file. – theultramage – 2019-05-30T06:25:04.753

Unfortunately, there is a snag. MSKLC warns that many of the characters, including the diacritics symbols themselves, cannot be expressed in the US locale's codepage, and that this can interfere with old non-unicode applications. And it does. I checked, and one or two old programs that I still use from time to time are affected. They're smart enough to look up the locale of your currently selected keyboard and switch codepages accordingly, but since the base is set to english, all diacritics are lost during codepage conversion when I type. Hm. – theultramage – 2019-05-30T06:36:03.123

Programs that rely on the older Windows "code page" mechanisms are likely to have problems if you are attempting to use characters that did not exist in the relevant "MS-DOS" code page, regardless of which code page it is, and what your current Windows language settings are. If possible, replace those programs with newer versions - or alternatives - that support Unicode. – Jeff Zeitlin – 2019-05-30T11:52:28.650

Unfortunately even the latest version still uses this system. Legacy codebases are hard to upgrade :) In addition, I installed my layout on a clean Windows 10 box and the Ô sequence worked just fine. So it's possible I discovered some sort of edge case in Windows 7 that was never fixed. No hard confirmation on that yet, though. – theultramage – 2019-05-30T13:14:46.377

No answers