[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Input for TTY menus

From: Stefan Monnier
Subject: Re: Input for TTY menus
Date: Thu, 19 Sep 2013 15:21:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> read_char won't handle the arrow keys.  To handle the arrow keys you
>> need to use read_key_sequence
> Thanks.  This means I'll probably need to clone some small subset of
> the code in command_loop_1 after it calls read_key_sequence, in order
> to process the key sequence, right?

I don't think there's much to do there, but clearly you'll want to do
something with the sequence, indeed.  Although you might like to simply
setup your keymaps in such a way that you can just use
read_key_sequence_cmd (which should usually be the same as (key-binding
<keys>), except when the keymaps are dynamic and might change between
the time they were read by read_key_sequence and the call to
key-binding) to know what operation to perform.

>> (probably after setting up some overriding-terminal-local-map).
> What would be the purpose of overriding-terminal-local-map in this
> case?

The key sequences read by read_key_sequence depend on the currently
active keymaps to decide when a key sequence is complete (i.e. when to
stop reading subsequent events).


reply via email to

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