help-gnu-emacs
[Top][All Lists]
Advanced

[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: tomas
Subject: Re: Does code exist to check if a key sequence is valid for Emacs running in terminal mode?
Date: Sat, 13 Jul 2024 22:06:16 +0200

On Sat, Jul 13, 2024 at 10:12:51AM -0400, Pierre Rouleau wrote:
> On Fri, Jul 12, 2024 at 3:30 PM <tomas@tuxteam.de> wrote:

[...]

> > That just means that the function needs also the frame as input param,
> > no?
> >
> >
> Interesting thought.
> In the scenario I have to deal with (described in a previous mail)
> I could use both display-graphic-p and the
> frame type inside a hook executing to
> check if the key clash exists for the buffer.
>  At the moment I only do that at initialization time.
> 
> That would allow identifying whether the key binding clash
> situation is real (in the graphical frame), or otherwise
> when the frame is a terminal based one.
> 
> But I still have the problem of being able to
> determine if the key binding is accessible
> or not when the frame is in terminal mode.

This is indeed the hard part. Compounded by the sad fact that some
(most? all?) terminal emulators can be configured to send arbitrary
stuff for a given key combo. For Xterm it's the Term.VT100.translations
X resource.

I fear you have no choice but to offer some heuristic which will work
most of the time (and be it: terminal? Only 32 CTRL chars for you!)
and a good instruction sheet for those users who are not the common
case.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]