Got Compiz Fusion up and running today, sweet. Now I'm planning to dedicate the Caps Lock key to window management, thus turning it to a modifier key.
"Wait a minute", you say, "this has been answered like 10000 times before if not more!" And you are right, I apologize for brining such a common "trick"/question up again; I've search for a while, both here and using Google, but still haven't found a solution.
So what's the problem?
I don't want to switch keys or remap caps lock to an existing key. I want a
new modifier key. Obviously, xmodmap is the answer. I ran it and got
Code:
hans@localhost:~$ xmodmap
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Alt_L (0x7d), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)
After searching a while, I found Hyper_L. Using xev, I learned that the keycode of my caps lock key was 66.
Code:
xmodmap -e 'remove lock = Caps_Lock'
xmodmap -e 'keycode 66 = Hyper_L'
xmodmap -e 'add mod3 = Hyper_L'
Sure enough, when running xev again, it says keycode 66 (keysym 0xffed, Hyper_L). So far so good.
So why are you asking for help then?
Because, apparently, my applications don't like the new key. When trying to map a shortcut in KDE applications, it simply doesn't react when I press the caps lock key (which should have shown as "Hyper").
Better luck with CompizConfig Settings Manager (K version) then? Kind of. I can map actions to "Hyper+something", but when I press the combination, nothing happens.
That's how far I've gotten. It feels like I've made a stupid mistake somewhere, instead of trying for hours and finally realizing it I beg for your help instead.
If the Hyper key isn't any good, I've thought of another possible solution: map caps lock to <Control><Super><Shift><Alt>. Is that possible? So when I press the caps key, it's like pressing the four modifier keys, creating a "new" modifier key.
As always, thanks in advance.