Re: switch from ADB to linux keycodes ...
That is sort of what I did. However, the way the caps lock key works
makes it impracticle: The keypress event is sent when you first press
the key... The key release event is sent when the key is released the
second time. This leads to rather inconsistant behaivior. The
workaround would be to train oneself to simply release the key every
time, but I don't really like that, and it makes Emacs sequences a
pain (e.g., C-x-s becomes: C-x C-s).
Gregory P. Keeney
Albert D. Cahalan wrote:
I missed the beginning of this thread, but as I understand it:
1. the caps lock key does not generate a key-up event
2. you want to have a control key there
No problem, unless you intend to play Quake. You can fix the key
in software. When you get any key-up event, do this:
So for a Ctrl-A you get:
1. crummy key down
2. 'A' key down
3. 'A' key up
4. generate synthetic key-up event for the crummy key
This is a wee bit annoying if somebody taps the crummy key
while you are away from your keyboard, so one might also add
a 5-second timeout. You could also/alternately let a second
key-down for the crummy key cancel out of crummy-key-down mode.
You might not even need to hack the kernel. Linux already has
dead-key support which might do the job. Use the console tools
to adjust things as desired.