Open kolAflash opened 4 years ago
This is gonna be kinda messy because whenever it sees LEFTCTRL pressed, it will have to delay emitting it until sees if the next code matches, this will delay emitting the LEFTCTRL until it knows known of the others have been pressed. That could be a long time. You'd need to add a timeout.
Originally posted here: https://github.com/philipl/evdevremapkeys/issues/4#issuecomment-639738690
@pronobis @philipl This is very much what I need! So I'd really like to see the changes from @pronobis merged. https://github.com/philipl/evdevremapkeys/issues/4
Just one thing is left for me: I need to handle keys which emit a unique scancode, plus additional scancodes which overlap with other keys.
I took some time to extend the changes made by @pronobis to fit my needs. Feel free to have a look at it and give me feedback: https://github.com/kolAflash/evdevremapkeys/commits/master
Background:
I got some strange keys on my HP EliteBook 735 G6 notebook. They emit multiple keycodes at the same time (less than 10 milliseconds):
I remapped those keys to HOME, END, PAGEUP and PAGEDOWN.
This works perfect, except I actually want to press LEFTCTRL + HOME. Sadly there's seems to be no indicator if the "real" LEFTCTRL has been pressed or not.
P.S. Only take the following into account if you want all details. It's mostly confusing and shouldn't be helpful to consider.
The third keycode is actually an unknown keycode. But I use
/etc/udev/hwdb.d/90-custom-keyboard.hwdb
to remap it to a known key.Side note: Find some related stuff here. https://h30434.www3.hp.com/t5/Business-Notebooks/remap-special-keys-with-Linux-presentation-start-call-end/td-p/7610721 https://h30434.www3.hp.com/t5/Business-Notebooks/left-CTRL-key-gets-logically-virtually-stuck-sometimes-Alt/m-p/7639737#M159561