keymapping not getting configured at startup

asked 2015-03-29 19:19:23 +0000

drpyser gravatar image

updated 2015-03-31 22:21:28 +0000

Hi.

I am running Ubuntu 14.04.

I am using Caps Lock as the mod key, so I put the following line in my .i3/config file:

 #maps caps lock to Mod4
 exec --no-startup-id xmodmap ~/.Xmodmap

The file .Xmodmap file referenced here contains the following lines:

clear Lock
keycode 66 = Hyper_L
add Mod4 = Hyper_L

I can manually set the mapping by executing 'xmodmap .Xmodmap' on the command line each time I start an i3 session. However, it is never configured automatically.

Is there a solution to this problem?

edit: if I can't use both setxkbmap and xmodmap at the same time, how can I set my keyboard to a particular layout, and have the Caps lock mapped to Mod4?

edit retag flag offensive close merge delete

Comments

Is it possible, that there is some other program started that makes keyboard settings? `setxkbmap`, `gnome-settings-daemon`, etc.? Like in [this question](https://faq.i3wm.org/question/5606/using-setxkbmap-to-disabple-capslock/)

Adaephon gravatar imageAdaephon ( 2015-03-31 19:35:49 +0000 )edit

Yep, thanks. However, is it possible for me to both set my keyboard to a particular layout (such as with setxkbmap), and modify the mapping of a particular key?

drpyser gravatar imagedrpyser ( 2015-03-31 22:18:44 +0000 )edit

Yes, it is possible. You just have to make sure to run `setxkbmap` before `xmodmap`. For that I would suggest putting everything into a script and than just run this single script from the i3 config.

Adaephon gravatar imageAdaephon ( 2015-04-02 00:01:54 +0000 )edit