1

I want CTRL to be my personal modifier for my bindings and CAPSLOCK to act as CTRL only in Emacs. Most of the material out there shows you how to swap these two modifiers. However, since I use CTRL outside of Emacs regularly, changing the meaning of CTRL in OS level is not something I desire.

Is there any way to do it?

OS: Debian Wheezy (amd64), Gnome 3.4.2

  • 1
    With e.g. gnome, you can change so caps lock works as an extra control. Maybe you can achieve that in your OS? Or do you specifically want caps lock to work as caps lock in other applications? – Meaningful Username Apr 16 '15 at 12:18
  • The problem is not changing the default button and meaning of CTRL in other application. But in Emacs, I want to move the function of CTRL to CAPSLOCK and use CTRL as an extra modifier. I hope I clarified my goal a bit clearly. – Cengiz Kandemir Apr 16 '15 at 12:23
  • Recent Emacs versions have focus-{in,out}-hook variables which perhaps can be used to switch the keyboard layout using xmodmap. – politza Apr 16 '15 at 19:29

1 Answers1

1

According to this you can not rebind the CAPSLOCK. However, with

setxkbmap -option caps:hyper

I remapped capslock to hyper modifier which effectively granted me an additional modifier that I could use to bind keys. I would prefer the location of CTRL instead of CAPSLOCK for personal bindings, but unfortunately, that may not be possible without altering default CTRL button behaviour.