Can Emacs differentiate between ctrl-r and ctrl-shift-r?

前端 未结 2 656
无人及你
无人及你 2021-01-03 22:04

I\'d like to bind Ctrl + R to \'isearch-backward and bind Ctrl + Shift + R to \'tags-apropos

2条回答
  •  醉酒成梦
    2021-01-03 22:46

    Yes.

    (global-set-key (kbd "C-r") 'isearch-backward)
    (global-set-key (kbd "C-S-r") 'tags-apropos)
    

    The way to figure out the answer to this kind of question is to do help on a key C-h k, and type the keystrokes you're interested in. What Emacs shows in the Help buffer is the string you can pass to the macro 'kbd.

提交回复
热议问题