39aldo39/klfc

[macOS] `keylayout` generation does not take into account the top-left key on ANSI keyboards.

Opened this issue · 3 comments

As noted here: ysoftwareab/xkb-for-macos#3

Turns out KLFC doesn't assign anything to the top-left key in an ANSI keyboard (the one that in US layout has the symbols "`" and "~") when converting an XKB layout. Probably it does so with other formats, though I didn't try.

I don't remember the exact details, but when I looked at it the key does have a separate code in Mac OS for ANSI and ISO keyboards and no way to support both that was clear to me. Looking at the code, I think as a workaround you can change the 'Tilde' position to the 'Iso' position in the KLFC files. Or, by changing code="10" to code="50" directly in the keylayout files.

by changing code="10" to code="50" directly in the keylayout files.

Are there problems if the same assignment is made for both codes on MacOS?

Yes, as both keys are present on ISO keyboards. Essentially, the ANSI keyboard is the ISO keyboard, but with the Tilde and Iso keys swapped and then the Iso key removed.

Although it might be an option to do so if the Iso key itself is not defined.