Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OEM_102 not present #32

Open
gargle opened this issue Mar 11, 2021 · 4 comments
Open

OEM_102 not present #32

gargle opened this issue Mar 11, 2021 · 4 comments

Comments

@gargle
Copy link

gargle commented Mar 11, 2021

I had to do this after generating my klc file. This is a bug I think. The left | key didn't show up first. After modifying the second OEM_5 instance to OEM_102 everything worked as planned.

diff --git a/altgr-weur.klc b/altgr-weur.klc
index a093400..431bea8 100644
--- a/altgr-weur.klc
+++ b/altgr-weur.klc
@@ -59,7 +59,7 @@ LAYOUT
34 OEM_PERIOD 0 002e 003e 0153 0152 // QWERTY .: ., >, œ, Œ
35 OEM_2 0 002f 003f 00bf 002f@ // QWERTY /: /, ?, ¿, cdk:stroke
2b OEM_5 0 005c 007c e000@ 00a6 // QWERTY : , |, cdk:greek, ¦
-56 OEM_5 0 005c 007c e001@ 00a6 // QWERTY Iso: , |, cdk:greek, ¦
+56 OEM_102 0 005c 007c e001@ 00a6 // QWERTY Iso: , |, cdk:greek, ¦

DEADKEY 0060 // grave

@39aldo39
Copy link
Owner

39aldo39 commented May 1, 2021

This has to do with the shortcut positions (virtual keys in Windows), which OEM_5, OEM_102 etc. represent. To get the desired output you have to change

{ "pos": "Iso", "letters": ... }

to

{ "pos": "Iso", "shortcutPos": "Iso", "letters": ... }

in your JSON file. If this is not explicitly stated klfc guesses it based on the letters, which is why it maps it to the backslash key.

Nevertheless, I think it should still work, but with only shortcuts (and some others) affected. What exactly didn't work?

@gargle
Copy link
Author

gargle commented May 1, 2021

I used --from-xkb actually. OEM_102 was missing in the output. There were two OEM_5 entries. I changed the second OEM_5 entry. The diff output shows I only had to change OEM_5 into OEM_102. The other fields stayed the same.

-56 OEM_5 0 005c 007c e001@ 00a6 // QWERTY Iso: , |, cdk:greek, ¦
+56 OEM_102 0 005c 007c e001@ 00a6 // QWERTY Iso: , |, cdk:greek, ¦

@gargle
Copy link
Author

gargle commented May 1, 2021

This is what I did initially, as you can see I don't have an OEM_102 in the output. The input file is a bit different today than it was on the 11th of March, but the problem stays.

gargle@msi:/tmp/k$ ./klfc --from-xkb "/usr/share/X11/xkb/symbols/us(altgr-weur)" --klc .
klfc: warning: singleton keys are not supported in KLC.
gargle@msi:/tmp/k$ grep OEM us-altgr-weur.klc
29 OEM_3 0 0060 007e 0060@ 007e@ // QWERTY ~: `, ~, cdk:grave, cdk:tilde
0c OEM_MINUS 0 002d 005f 2013 2014 // QWERTY -: -, _, –, —
0d OEM_PLUS 0 003d 002b 00b0 02da@ // QWERTY +: =, +, °, cdk:abovering
1a OEM_4 0 005b 007b 00ab 2039 // QWERTY [: [, {, «, ‹
1b OEM_6 0 005d 007d 00bb 203a // QWERTY ]: ], }, », ›
27 OEM_1 0 003b 003a 00f4 00d4 // QWERTY ;: ;, :, ô, Ô
28 OEM_7 0 0027 0022 00b4@ 00a8@ // QWERTY ': ', ", cdk:acute, cdk:diaeresis
33 OEM_COMMA 0 002c 003c 00b8@ 02db@ // QWERTY ,: ,, <, cdk:cedilla, cdk:ogonek
34 OEM_PERIOD 0 002e 003e 0153 0152 // QWERTY .: ., >, œ, Œ
35 OEM_2 0 002f 003f 00bf 002f@ // QWERTY /: /, ?, ¿, cdk:stroke
2b OEM_5 0 005c 007c 0133 0132 // QWERTY : , |, ij, IJ

@gargle
Copy link
Author

gargle commented May 1, 2021

this is the altgr-weur part of the input file:

xkb_symbols "altgr-weur" {

   name[Group1]= "English (Western European AltGr dead keys)";

   key <TLDE> { [     grave, asciitilde,      dead_grave,        dead_tilde ] };
   key <AE01> { [         1,     exclam,      exclamdown,     dead_abovedot ] };
   key <AE02> { [         2,         at,     twosuperior,  dead_doubleacute ] };
   key <AE03> { [         3, numbersign,   threesuperior,       dead_macron ] };
   key <AE04> { [         4,     dollar,            cent,               yen ] };
   key <AE05> { [         5,    percent,        EuroSign,          sterling ] };
   key <AE06> { [         6,asciicircum, dead_circumflex,        dead_caron ] };
   key <AE07> { [ 7,      ampersand, doublelowquotemark, singlelowquotemark ] };
   key <AE08> { [ 8,           asterisk,          ssharp,        dead_greek ] };
   key <AE09> { [ 9, parenleft,   leftdoublequotemark,  leftsinglequotemark ] };
   key <AE10> { [ 0, parenright, rightdoublequotemark, rightsinglequotemark ] };
   key <AE11> { [     minus, underscore,          endash,            emdash ] };
   key <AE12> { [     equal,       plus,          degree,    dead_abovering ] };

   key <AD01> { [         q,          Q,           aring,             Aring ] };
   key <AD02> { [         w,          W,              ae,                AE ] };
   key <AD03> { [         e,          E,      ediaeresis,        Ediaeresis ] };
   key <AD04> { [         r,          R,          egrave,            Egrave ] };
   key <AD05> { [         t,          T,          oslash,            Oslash ] };
   key <AD06> { [         y,          Y,          ugrave,            Ugrave ] };
   key <AD07> { [         u,          U,      udiaeresis,        Udiaeresis ] };
   key <AD08> { [         i,          I,      idiaeresis,        Idiaeresis ] };
   key <AD09> { [         o,          O,      odiaeresis,        Odiaeresis ] };
   key <AD10> { [         p,          P,          ograve,            Ograve ] };
              // U203[9A]: single right/left-pointing angle quotation marks
   key <AD11> { [ bracketleft, braceleft,  guillemotleft,             U2039 ] };
   key <AD12> { [bracketright,braceright, guillemotright,             U203A ] };

   key <AC01> { [         a,          A,      adiaeresis,        Adiaeresis ] };
   key <AC02> { [         s,          S,          agrave,            Agrave ] };
   key <AC03> { [         d,          D,          eacute,            Eacute ] };
   key <AC04> { [         f,          F,     ecircumflex,       Ecircumflex ] };
   key <AC05> { [         g,          G,     icircumflex,       Icircumflex ] };
   key <AC06> { [         h,          H,     ucircumflex,       Ucircumflex ] };
   key <AC07> { [         j,          J,          uacute,            Uacute ] };
   key <AC08> { [         k,          K,          iacute,            Iacute ] };
   key <AC09> { [         l,          L,          oacute,            Oacute ] };
   key <AC10> { [ semicolon,      colon,     ocircumflex,       Ocircumflex ] };
   key <AC11> { [apostrophe,   quotedbl,      dead_acute,    dead_diaeresis ] };

   key <AB01> { [         z,          Z,          aacute,            Aacute ] };
   key <AB02> { [         x,          X,     acircumflex,       Acircumflex ] };
   key <AB03> { [         c,          C,        ccedilla,          Ccedilla ] };
   key <AB04> { [         v,          V,          atilde,            Atilde ] };
   key <AB05> { [         b,          B,          otilde,            Otilde ] };
   key <AB06> { [         n,          N,          ntilde,            Ntilde ] };
   key <AB07> { [         m,          M,          igrave,            Igrave ] };
   key <AB08> { [     comma,       less,    dead_cedilla,       dead_ogonek ] };
   key <AB09> { [    period,    greater,              oe,                OE ] };
   key <AB10> { [     slash,   question,    questiondown,       dead_stroke ] };
              //                             ij ligature        IJ ligature
   key <BKSL> { [ backslash,        bar,           U0133,             U0132 ] };

   include "level3(ralt_switch)"
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants