OBERHAG@DD0RUD81.BITNET (Ruediger Oberhage) (09/14/87)
Hello! In response to Giuseppe Fiusco's postings (id 9067) regarding key bindings. I'm not quit sure, but do I understand it correctly, that after applying your bindings to let's say an vt100-terminal, I can't use the ESC-key any longer as a META-key? And while in a vt100 there is a special sequence (ANSI- CSI: ESC '' ... ) for a vt52/z19 there is none, except for the ESC character. Using a SIRIUS 1/Victor 9000 microcomputer (with z19 escapes-sequences) for quite a while and being new to (Micro)EMACS (v3.8i), I do not want to loose the special, very well positioned ESC-key as META-key, although I also like to have (functioning) cursor-keys. My solution (not perfect, but it works) consists in a little modification in the get1key()-function. I'm using the same method as in the MS-DOS variant, only I'm asking for ESC (1b hex) instead of NUL (0 hex). Then I immediatly call the typadhead()-function to see, if another character has arrived. If not, the keystroke is taken as META-key ESC, else the next character is examined for a special function like CUP (ESC 'A' on my 'vt52') etc., which can be bound in the usual way, treating it as a special-function-key(!). This technique can be used on any vtxxx-like terminal. I said, the solution is not perfect, because if you do type ahead while some other lengthy function is performed (a search or something like it) and you really have to type-in (ahead) the META-key (ESC) and another one to execute a command, then it will be treated as a special-function key, and the command will not be executed. De facto, with me, this never actually happened. Is there anything I overlooked, taking this approach? Please tell me. On the other side, if you are interested in the modification (it really can be done in a minute), let me know, and I'll post it - well I'll try to, because we really still have some trouble with our mailing system here (Duesseldorf, Germany (West)). Greetings, +---- (attn mailers: missing 'E' !!!! behind 'G') Ruediger Oberhage v Uni Duesseldorf (OBERHAG@DD0RUD81)