Can I send a keypress to Windows from Emacs?

前端 未结 2 1435
孤独总比滥情好
孤独总比滥情好 2021-01-21 17:27

There is a function \'w32-toggle-lock-key to, effectively, simulate a press of capslock, numlock, or scroll-lock key. Is there a si

2条回答
  •  灰色年华
    2021-01-21 18:13

    I believe the answer is no. For the same reasons discussed in this answer, namely that shift is a modifier, and Windows is swallowing the keypress.

    The easiest way to see if Emacs responds to a key is to ask for help on a key

    C-h k 
    

    If Emacs tells you what is bound to that key, you're golden. If Emacs seems to be waiting for more input (and after about 2 seconds shows you the key in the minibuffer), then you're still good - the key is just mapped to a prefix map (e.g. ESC or C-x). If Emacs does nothing and is still waiting for you to type something at the prompt

    Describe key (or click or menu item):
    

    then you know Emacs hasn't received an event. This is what happens when I press SHIFT.

提交回复
热议问题