Dwm’s documentation refers to Mod1 as the modifier key that you must press to issue commands to it. On most keyboards, Mod1 is mapped to the left Alt key. Most new keyboards now come equipped with the Windows key. Since no known UNIX/X applications are known to use the Windows key, it is an excellent alternative mapping to issue commands to dwm.
In config.h, under the comment
/* key definitions */, you can find the line
#define MODKEY Mod1Mask
In order to change dwm’s modifier key to the Windows key, you can simply change its value definition to Mod4Mask.
#define MODKEY Mod4Mask
The following patch also produces the same result:
Can I use any other modifier key?
Yes. There are 5 modifiers, Mod1Mask to Mod5Mask. They are associated to up-to three keysyms (keycodes) from the X window server. To show the current association on your keyboard, run
xmodmap with no arguments. It will show something like:
xev, a utility to show X events, such as key presses, we can quickly identify which keysym (keycode) combination a particular key has, and associate that to a modifier using
- Mono sound output in Ubuntu
- Howto: Linux Add or Remove a Linux Kernel Modules / Drivers
- How to test microphone with Audio Linux Sound Architecture ALSA
- How to display or show information about a Linux Kernel module or drivers
- How to chroot into linux distro on disk when you can't boot via grub