39aldo39 / klfc

Keyboard Layout Files Creator
GNU General Public License v3.0
215 stars 13 forks source link

binding Extend to Alt_R produces Error #27

Closed logexp1 closed 4 years ago

logexp1 commented 4 years ago

If I use singletonKeys as follows "singletonKeys": [ [ "Alt_R", "Extend" ] ], It produces following error logs Error: Key <MDSW> added to map for multiple modifiers Using Mod3, ignoring Mod5.

If I bind to CapsLock instead of Alt_R, it works fine. I am generating XKB layout I still want to bind Extend to Alt_R, is there anything else I can try?

Thanks

DreymaR commented 4 years ago

Alt_R is tricky because it's used as AltGr. Often, the RAlt=AltGr behavior is included in a four-level layout. If you insist on using RAlt as your Extend (lvl5) modifier, you must ensure it isn't also used as AltGr (lvl3).

logexp1 commented 4 years ago

I want to use RAlt, but how do I ensure it's not also used as AltGr? is it possible using klfc? I tried to bind Extend to Control_R instead, but it gives me same error as it was for Alt_R

39aldo39 commented 4 years ago

Your definition should work, but I also noticed the same problem on Wayland. The definition just includes level5(ralt_switch) which does the mapping in a weird way. It does work for me on X11 though, but it still gives an error.

You can move the definition to the normal letters, so you add { "pos": "Alt_R", "letters": [ "Extend" ] } to it. This works fine for me on X11 without errors, but I haven't tried it on Wayland yet.

logexp1 commented 4 years ago

Thank you, it works!