Open almson opened 8 years ago
Actually, Dell keyboards also sometimes don't have these keys. Dell didn't settle on a standard mapping. Looks like they're all over the place with different models. I would still adopt the Lenovo standard.
I would say we are making the driver a fully programmable one by adding more mapping options like this :smile:. Then definitely we should get the underlying remapping logic right first.
Well, I got the idea, but not sure if it is desired by people or not. Let this issue be a long term feature request.
The real reason for these keys is to use Magic SysRq. (Ie, we need at least SysRq.) Magic SysRq fixes OOM freezes and has other uses.
Hi!
For the Magic SysRq issue, I am using a workaround that mixes udev
, xmodmap
(I know that this won't work on Wayland but there are alternatives for that... but I don't use wayland, yet) and loadkeys
.
Basically what I do is:
1) I remap my CapsLock physical key to sysrq keycode using udev
. As far as I understand the kernel will know about this "mapping", so It can known when both "SysRq" (CapsLock) and "Alt" key are pressed in conjunction. It wil "take" the event and wont propagate it to the rest of the system (i.e. you can't use Alt+SysRq [CapsLock] for other actions).
2) I (re)remap sysrq xmodmap
keycode to Caps_Lock keysym. This is a mapping only know by the X environment.
3) I (re)remap sysrq loadkeys
keycode to Caps_Lock keysym. This is a mapping only know by the "consoles" (TTYs) environment.
So, CapsLock will continue acting as a normal CapsLock key without Alt being pressed. But with Alt pressed, CapsLock will act as SysRq. As far as you don't need to use the Alt-CapsLock combination for other things, then this workaround should be enough.
Recent Lenovo keyboards copy Apple by omitting Pause, Break, ScrLK, and SysRq keys. Since these keys are sometimes necessary for PCs (unlike for Macs), they're emulated using Fn+ combinations. I propose to support these same combinations in the driver without a configurable option, since I don't believe there exists a competing way to map them.
Reference: https://support.lenovo.com/ua/uk/documents/ht074004