This question already has an answer here:

I am using spacemacs and I am wondering how I can set TAB to Control Key inside of emacs only.

I have set TAB to CTRL on my laptop in the OS, but I want to use TAB in other applications. So, in only Emacs, I want to use TAB to be CTRL. How I can do that?

marked as duplicate by YoungFrog, Andrew Swann, zck, Drew, tarsius Apr 30 '16 at 10:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    My guess is that you can't. I think it would have to be implemented at the OS level, because of the fundamentally different behaviour of modifier keys and non-modifier keys. – Harald Hanche-Olsen Apr 25 '16 at 7:56
  • 1
    In OS X, you can use Karabiner to map TAB to CTRL only in specific apps, say Spacemacs. There are probably similar tools for Windows and Linux as well. – Stefan Mesken Apr 26 '16 at 3:27
  • Which OS are you on? – xuhdev Apr 27 '16 at 20:31

For TAB to CTRL just in Emacs, install Karabiner and configure TAB key under emacs mode.

Then for CTRL in all apps, goto OSX system preferences, keyboard, modifier keys, and then change it as needed.

For other operating systems, look into similar utilities.

Updated: some solutions may require using both solutions together. For example, you can re-assign TAB to be become Left Control key in Karabiner and then in system preferences enable/disable that Ctrl key's behavior as needed. This is one way to tweak laptop keyboards besides using any extended fn keys.

  • I don't see any option in system preferences → keyboard → modifier keys for changing the TAB key. Only caps lock, control, option, and command are listed. (OSX 10.11.4.) Do you have a modified prefence pane somehow, or are you on a different OS release? – Harald Hanche-Olsen Apr 29 '16 at 13:53
  • TAB is not a modifier key that's why you won't see there. I've clarified my response. – Emacs User Apr 29 '16 at 14:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.