linux - Remapping keys system-wide on Unix-Like Operating Systems -


recently wanted make small utility allow me arbitrarily remap keys on keyboard correspond different character inputs.

how accomplished system programming perspective , should reference in order learn how this?

thanks!

i may mistaken, believe depends entirely on running (what window manager is). example, if running openbox (e.g. lubuntu), reference following:

http://openbox.org/wiki/help:bindings

there similar concepts gnome. if looking change gnome, may want go peak around how gnome-tweak-tool changes things (specifically @ keybindings -- tweak lot more!).

in both instances, suggest using python (gnome-tweak-tool great reference point how this) because convenient write guis , allow change necessary files :)

if using ubuntu, post may useful you:

https://askubuntu.com/questions/115333/how-do-i-disable-the-sleep-button-on-my-keyboard

their question 1 specific key, top 2 answers relevant. answer dconf-tools may better understanding of things located.

so in end, end needing configure files differently, files , how change them depends on window manager.


the above useful disabling caps_lock or swapping l_shift , l_ctrl or something. if asking generically changing keyboard input, there's lot more going on behind scenes. may want read article explanation of going on:

http://www.linuxjournal.com/article/1080

so if want remap things, switching 'a' , 'f' keys, need capture keyevent 'a', , send 'f' key event instead. there many ways see keys being pressed, may place start:

https://superuser.com/questions/248517/show-keys-pressed-in-linux

changing things @ level more difficult / dangerous, make sure careful!


hope helps little! if isn't trying do, please include more information in question actual goals of program are.


Comments