I find lots of examples on how to set the mod key in xmonad, but how do I add a second mod key?
feedback
|
|
You can use xmodmap to add a second key to e.g. Mod1, so that pressing either would work with modMask = mod1Mask. | ||||
|
feedback
|
|
Just to expand on Daniel Schoepe's answer, I do this in xmonad using the super key (the windows key) but I don't set anyting in xmonad.hs (other than setting modMask = mod4Mask). Using xmodmap I've set the left control as a second super key with the following in my .Xmodmap file:
You can also use xmodmap to swap capslock and control, set right control to be super as well, etc, but mind that the changes will only work in X, not in virtual terminals. | |||
|
feedback
|
|
You may bind mod keys other mod1 by editing your xmonad.hs modMask value. An example, binding to the mod4 (often 'Win') key:
| |||||
feedback
|
|
You can just or the keys together... watch:
So as you can see you OR two key masks together to get the result that you desire. That's all it takes so you just use it like the last line there.
And that is all that there is to it. Edit: Ah wait, you want two different keys to independently act as the Mod key. That is currently impossible I think as the code currently stands. Solution: check out the source and edit it yourself and then cabal install it again; it would be a small change. | ||||
|
feedback
|