> So <Ctrl> and <Shift> are the only 'meta-keys' that can be used (and
Yes, they cause the generation of different ASCII characters by the
keyboard when they are pressed. For example, if you press the 'A' key
you get the character 97 ('a'), if you press shift, you get 65 ('A'),
and if you press control, you get 1 ('^A').
> combined)? What about F1 to F12 or any other keys not used for
The function keys are usually generated as escape sequences (system
You may take a look into "lib/term.l" in the PicoLisp distribution. It
defines some keys from the terminfo database (using 'tput').
> Would Emacs-like key-chords be possible? E.g. 'C-x u', i.e. type first
> '<Ctrl>x' and then 'u', using 'C-x' as a kind of prefix that can be
> combined with e.g. [a-zA-Z0-9].
Yes, all this must be handled as events (or sequences of events). Same
goes for mouse-clicks and -buttons.
> BTW - where are Ctrl-d and Ctrl-c defined? Could they be redefined to
> something else in one single place?
No, they are ASCII values. In general, a control character is the
corresponding uppercase character minus 64. For example, Ctrl-A is 1,
Ctrl-B is 2, Ctrl-C is 3 and so on.