Emacs global-set-key to C-TAB

后端 未结 6 1683
遥遥无期
遥遥无期 2021-02-01 01:47

I\'m trying to set a key-binding to Ctrl+TAB in Emacs. I used the following call:

(global-set-key (read-kbd-macro \"C-TAB\") \'my-func)

Howeve

6条回答
  •  渐次进展
    2021-02-01 02:28

    It's because you are using read-kbd-macro incorrectly. When you see what is bound to a key:

    C-h k C-TAB
    

    Emacs tells you:

     is undefined.
    

    You need to include the <> in your invocation of read-kbd-macro.

    (global-set-key (read-kbd-macro "") 'my-func)
    

    And, I don't know how to generate , but it's not the same as .

    (equal (kbd "") (kbd ""))
    ->
    nil
    

提交回复
热议问题