How do I bind a command to C-i without changing TAB?

Viewed 5774

In emacs, I want to bind a command to C-i. So I put (global-set-key "\C-i" 'forward-word)

in my .emacs file. This works, except now the TAB key is bound to 'forward-word as well.

How do I bind a command to C-i without changing TAB?

6 Answers

I found this solution, after much pain, lost in the messages archives. It's simple, avoids conflicts with other modes, and is the only which worked for me:

;; Translate the problematic keys to the function key Hyper:
(keyboard-translate ?\C-i ?\H-i)
(keyboard-translate ?\C-m ?\H-m)
;; Rebind then accordantly: 
(global-set-key [?\H-m] 'delete-backward-char)
(global-set-key [?\H-i] 'iswitchb-buffer)
Related