<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>i3 FAQ - Individual question feed</title><link>https://faq.i3wm.org/questions/</link><description>Frequently asked questions and answers about the i3 window manager</description><atom:link href="http://faq.i3wm.org/feeds/question/6430/" rel="self"></atom:link><language>en</language><copyright>Copyright i3, 2012</copyright><lastBuildDate>Fri, 14 Aug 2015 08:57:00 +0000</lastBuildDate><item><title>Remapping both caps lock and windows key</title><link>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/</link><description>I want to use both my caps lock key and windows key in my i3 config. In particular, I want caps lock to take the place of $mod in the config and I also want to be able to reference the windows key in bindsym. How would I do this?

Currently, my .Xmodmap is

    clear Lock 
    clear mod4

    keycode 66 = Hyper_L
    add mod4 = Hyper_L

and my i3 config has a line

    set $mod Mod4

With this configuration, my windows key behaves like the mod4 key, but I don't want this. I want to be able to press Windows+a and have it behave differently than Capslock+a.

</description><pubDate>Wed, 12 Aug 2015 02:45:00 +0000</pubDate><guid>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/</guid></item><item><title>Comment by zetanot for &lt;p&gt;I want to use both my caps lock key and windows key in my i3 config. In particular, I want caps lock to take the place of $mod in the config and I also want to be able to reference the windows key in bindsym. How would I do this?&lt;/p&gt;

&lt;p&gt;Currently, my .Xmodmap is&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;clear Lock 
clear mod4

keycode 66 = Hyper_L
add mod4 = Hyper_L
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and my i3 config has a line&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set $mod Mod4
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With this configuration, my windows key behaves like the mod4 key, but I don't want this. I want to be able to press Windows+a and have it behave differently than Capslock+a.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6443#comment-6443</link><description>I updated it.</description><pubDate>Fri, 14 Aug 2015 04:47:30 +0000</pubDate><guid>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6443#comment-6443</guid></item><item><title>Comment by Adaephon for &lt;p&gt;I want to use both my caps lock key and windows key in my i3 config. In particular, I want caps lock to take the place of $mod in the config and I also want to be able to reference the windows key in bindsym. How would I do this?&lt;/p&gt;

&lt;p&gt;Currently, my .Xmodmap is&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;clear Lock 
clear mod4

keycode 66 = Hyper_L
add mod4 = Hyper_L
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and my i3 config has a line&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set $mod Mod4
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With this configuration, my windows key behaves like the mod4 key, but I don't want this. I want to be able to press Windows+a and have it behave differently than Capslock+a.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6438#comment-6438</link><description>Could you edit the question to show how you got Caps Lock to work as modifier? It is not something i3 can do by default, so I assume you remapped it (with xmodmap?) to some other key. Then  would be the question if you want the Windows key to be the same modifier as Caps Lock or a different one.</description><pubDate>Thu, 13 Aug 2015 12:46:12 +0000</pubDate><guid>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6438#comment-6438</guid></item><item><title>Comment by zetanot for &lt;p&gt;I want to use both my caps lock key and windows key in my i3 config. In particular, I want caps lock to take the place of $mod in the config and I also want to be able to reference the windows key in bindsym. How would I do this?&lt;/p&gt;

&lt;p&gt;Currently, my .Xmodmap is&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;clear Lock 
clear mod4

keycode 66 = Hyper_L
add mod4 = Hyper_L
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and my i3 config has a line&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set $mod Mod4
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With this configuration, my windows key behaves like the mod4 key, but I don't want this. I want to be able to press Windows+a and have it behave differently than Capslock+a.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6436#comment-6436</link><description>the modifier</description><pubDate>Wed, 12 Aug 2015 17:56:50 +0000</pubDate><guid>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6436#comment-6436</guid></item><item><title>Comment by Adaephon for &lt;p&gt;I want to use both my caps lock key and windows key in my i3 config. In particular, I want caps lock to take the place of $mod in the config and I also want to be able to reference the windows key in bindsym. How would I do this?&lt;/p&gt;

&lt;p&gt;Currently, my .Xmodmap is&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;clear Lock 
clear mod4

keycode 66 = Hyper_L
add mod4 = Hyper_L
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and my i3 config has a line&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set $mod Mod4
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With this configuration, my windows key behaves like the mod4 key, but I don't want this. I want to be able to press Windows+a and have it behave differently than Capslock+a.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6434#comment-6434</link><description>Do you want to use the windows key as Modifier or as (the last) key?</description><pubDate>Wed, 12 Aug 2015 09:41:34 +0000</pubDate><guid>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6434#comment-6434</guid></item><item><title>Answer by Adaephon for &lt;p&gt;I want to use both my caps lock key and windows key in my i3 config. In particular, I want caps lock to take the place of $mod in the config and I also want to be able to reference the windows key in bindsym. How would I do this?&lt;/p&gt;

&lt;p&gt;Currently, my .Xmodmap is&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;clear Lock 
clear mod4

keycode 66 = Hyper_L
add mod4 = Hyper_L
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and my i3 config has a line&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set $mod Mod4
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With this configuration, my windows key behaves like the mod4 key, but I don't want this. I want to be able to press Windows+a and have it behave differently than Capslock+a.&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?answer=6445#post-id-6445</link><description>The issue here is that you are essentially removing the *Windows keys* from the modifier list with  `clear mod4`. In order to have *Caps Lock* available as an additional modifier instead as a replacement of the *Window keys*, you would have to set it to a different modifier. You can use modifiers `Mod1` through `Mod5` in addition to `Control`, `Shift` and `Mode_switch` with *i3*.

First check, if any modifiers are unused in the the layout you are using (without applying your `.Xmodmap`). You can get a list of the modifier settings with `xmodmap -pm`. For the `us` layout this returns (on my machine):
&lt;pre&gt;
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
&lt;/pre&gt;

As you can see `mod3` is currently unused. In order to use it you just have to put the following into your `.Xmodmap`:

&lt;pre&gt;
clear lock
keycode 66 = Hyper_R
add mod3 = Hyper_R
&lt;/pre&gt;

**Note:** In this case I used `Hyper_R` because `Hyper_L` was already bound to `mod4`. And 66 is the key code of *Caps Lock*. This may be different on your machine.

Now you can use this modifier with your *i3* keybindings. If you want to keep using the `$mod` variable with your configuration just set it to either `Mod3` or `Mod4` depending on if you want to use *Caps Lock* or the *Windows keys* for that. But There is no real need to actually use it (It is mainly convenience to ease up first time setup when choosing between *Alt* (`Mod1`) and *Windows keys* (`Mod4`).

Using the new Modifier is as simple as:

    bindsym Mod3+s exec something
    binysym Mod3+Mod4+s exec something_else
    </description><pubDate>Fri, 14 Aug 2015 08:57:00 +0000</pubDate><guid>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?answer=6445#post-id-6445</guid></item><item><title>Answer by i3convert for &lt;p&gt;I want to use both my caps lock key and windows key in my i3 config. In particular, I want caps lock to take the place of $mod in the config and I also want to be able to reference the windows key in bindsym. How would I do this?&lt;/p&gt;

&lt;p&gt;Currently, my .Xmodmap is&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;clear Lock 
clear mod4

keycode 66 = Hyper_L
add mod4 = Hyper_L
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and my i3 config has a line&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set $mod Mod4
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With this configuration, my windows key behaves like the mod4 key, but I don't want this. I want to be able to press Windows+a and have it behave differently than Capslock+a.&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?answer=6440#post-id-6440</link><description>You can run the following commands to make caps lock act like the windows key. (I'm assuming that $mod in your configuration is the windows key, i.e., Mod4.)

    xmodmap -e "remove lock = Caps_Lock"
    xmodmap -e "keycode 66 = Super_L"
</description><pubDate>Thu, 13 Aug 2015 17:21:48 +0000</pubDate><guid>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?answer=6440#post-id-6440</guid></item><item><title>Comment by zetanot for &lt;p&gt;You can run the following commands to make caps lock act like the windows key. (I'm assuming that $mod in your configuration is the windows key, i.e., Mod4.)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;xmodmap -e "remove lock = Caps_Lock"
xmodmap -e "keycode 66 = Super_L"
&lt;/code&gt;&lt;/pre&gt;
</title><link>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6444#comment-6444</link><description>I can already do that. I've updated my question to clarify.</description><pubDate>Fri, 14 Aug 2015 04:53:21 +0000</pubDate><guid>https://faq.i3wm.org/question/6430/remapping-both-caps-lock-and-windows-key/?comment=6444#comment-6444</guid></item></channel></rss>