[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does code exist to check if a key sequence is valid for Emacs runnin
From: |
Robert Pluim |
Subject: |
Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode? |
Date: |
Fri, 12 Jul 2024 16:45:20 +0200 |
>>>>> On Fri, 12 Jul 2024 10:35:49 -0400, Pierre Rouleau
>>>>> <prouleau001@gmail.com> said:
Pierre> It would therefore like to distinguish the 3 potential cases:
Pierre> - the key sequence is bound
Pierre> - the key sequence is not defined.
Pierre> Like "C-| is undefined" when tried in Emacs running in graphical
mode.
Pierre> - the key sequence is not defined, but reported via an error.
Pierre> Like "C-;" when tried under Emacs running in terminal mode
Pierre> inside a terminal that does not remap the C-; to some other
escape
Pierre> sequence.
In every terminal Iʼm aware of the way it works is that pressing Ctrl
and ; at the same time sends ';', so thereʼs no error case to detect
(maybe this is different with kitty with its extensions)
Plus `describe-key' happily works with key sequences that the current
terminal cannot produce:
(describe-key (kbd "A-C-H-M-s-S-;")) =>
#("A-C-H-M-S-s-; is undefined" 0 13 (face help-key-binding font-lock-face
help-key-binding))
Robert
--
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, (continued)
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, tomas, 2024/07/12
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, Pierre Rouleau, 2024/07/12
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, Pierre Rouleau, 2024/07/12
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, Yuri Khan, 2024/07/12
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, Pierre Rouleau, 2024/07/12
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, tomas, 2024/07/12
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, Pierre Rouleau, 2024/07/13
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, tomas, 2024/07/13
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, Emanuel Berg, 2024/07/12
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, Pierre Rouleau, 2024/07/13
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?,
Robert Pluim <=
- Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, Pierre Rouleau, 2024/07/12
Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?, Stefan Monnier, 2024/07/16