Mapping *special* keys in KDE

For my purposes I used a utility “xev” run from a command shell. Then whatever happens to that window is echoed to the console… So, if you press a key in the window the console reports what key was pressed. In some cases a single physical keypress can resolve to multiple chars, I have a key that sends ctrl/alt/e which I have mapped to kspread.

Then, you can create a file called  .Xmodmap under ~ containing stuff like:

keycode 234 = F13

Where 234 is the value presented by whatever you saw associated with the key press, and F13 is the key you want it mapped to.

Then in KDE you do “xmodmap ~/.Xmodmap” and use control center keyboard shortcuts to map F13 to whatever you want….

Finally you create a script in ~/.kde/Autostart to run the xmodmap command on kde startup:

#!/bin/bash
xmodmap ~/.Xmodmap

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: