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

后端 未结 6 1065
陌清茗
陌清茗 2020-12-08 04:49

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 b

6条回答
  •  春和景丽
    2020-12-08 04:59

    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)
    

提交回复
热议问题