1

Summary: I want Xmonad to register keypresses like Mod-Shift-k as Mod-K. In other words, I don’t want the shift key to be registered similarly to how the Mod key is registered. (I use Super as the Mod key, while Alt is the default.)


What I am used to in most applications is that hotkeys are sensitive to the shift level of the key that I am pressing. For example, if I press Ctrl-k, this is treated differently than Ctrl-K. Further, the application does not care why the K is capital (majuscule); it acts the same whether it was produced due to Shift being held down, Caps Lock being triggered, or something else.

The way that Xmonad seems to work by default is that it registers shift keys like the regular shift key and the level 3 (AltGr on European keyboards) and level 5 as most applications treat keys like Ctrl and Alt. That is, it treats the keybinding “Super Shift and k” pressed at the same time as Super-Shift-k, not as Super-K. I want the latter behavior; I want Xmonad to only care about the key that was produced due to keys like Shift being depressed, not whether Shift was depressed.

The motivation for this is that I have a keymapping with the numerals located on one of the “shift levels” (i.e., not the first level) of some keys that are not the regular “number keys”. So in order to access them, I need to press some modifier keys. But this creates a problem when I want to change the workspace, as Xmonad seems to register things like Super-Shift3-k as “k with Super and Shift3 depressed” instead of Super-3 (assuming that Shift3-k produces the symbol 3).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.