Yes, I am talking about Linux/XKB here. So, I have experimented a bit with this... but not very successfully. Something I don't really understand is going on.
I was thinking along the lines of using the function keys too. In fact, I did this in my AHK/Windows scripts, where I used F22 and F24 as my base mappings for Extend and AltGr layers, to make it easy to remap those functions to any arbitrary key. So doing something similar for Extend in XKB would be quite nice. To this end, my first attempt was just to see if Extend can be mapped OK to a function key. Taking this:
xkb_symbols "caps_switch_lock" {
include "level5(lock)"
key <CAPS> {
type[Group1] = "EIGHT_LEVEL",
symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
};
};
What I found is that you can use have like LALT and RWIN in place of CAPS, but for some reason it won't accept other keys. I tried FK12 for example, didn't work. Perhaps only special keys / modifiers are allowed there?
I then decided to just go with using RWIN as my Extend key, and then rebinding my physical LeftAlt key to be RWIN.
xkb_symbols "rwin_switch_lock" {
include "level5(lock)"
key <RWIN> {
type[Group1] = "EIGHT_LEVEL",
symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
};
};
As you'd expect, Extend works perfectly well. But if I go to Google Sheets, I can still reproduce the cell clearing problem. So it seems it doesn't really matter what the binding is, but I'm a bit confused about how the same effect is seen with both different physical keys AND different evdev mappings. Maybe it's something inherent with ISO_Level5_Lock?
Last edited by stevep99 (10-Sep-2020 16:11:20)