Remapping shift&ctrl keys kills key repetition
I have a laptop where the enter and up arrow keys are physically broken. I have been able to solve this with the following commands:
This code does work, but it has a minor flaw. When holding either of the keys, there are no repeated key presses. Is there any way to solve this through configuration alone? (Ie, not by modifying source code)
1) What is the best way to apply this configuration? Is there a configuration files for these mappings? (Right now I have a shell script that gets run on each X startup)
2) Any pointers as to how one can remap keys outside of X?
I actually managed to solve it myself. The solution was to use xset r for the relevant keycodes. I should also point out the commands above contain an error. The "up" line actually makes shift up produce the character 8. (I guess I copied it from the numpad 8 key definition :) ) So my final script looks like this:
The alternative to an xmodmap script is more complicated and only worth doing for major alterations. You'd need to alter
For running without X, there doesn't seem to be an alternative to altering files. Look in
/lib/kbd/keymaps/i386/qwerty/uk.map.gz (or ..us..., or whatever)
and it's all there somewhere.
|All times are GMT -5. The time now is 12:58 AM.|