Article View: news.software.readers
Article #40427Re: Slrn: binding same slang macro to multiple keys and posting failures
From: da... John E. Davis
Date: Sun, 26 Apr 1998 00:00
Date: Sun, 26 Apr 1998 00:00
172 lines
5525 bytes
5525 bytes
On 18 Apr 1998 10:13:55 GMT, Heikki Kantola <he...@iki.fi>
wrote:
>It was clear enough that I got idea what this "feature" is about:
>looks like if you try to bind key combinations with similar beginning
>(in my case it was two escape sequences which different terminals
>appear to generate from left arrow key) you can't bind them to same
>function...
If you use different terminals, whose keys generate conflicting
escape sequences, then you can do:
#if$TERM xterm
% xterm specific bindings here
#elif$TERM linux vt102
% put linux console or vt102 bindings here
#elif$TERM vt320
% put vt320 bindings here
#endif
If your terminfo/termcap files contain information about the escape
sequences that your arrow and function keys generate, then you can use
an escape sequence of the form "^(XX)" where XX indicates the
termcap/terminfo entry. For example, suppose you want to bind the
LEFT arrow key to some function in article mode. Then you can use:
setkey article some_function "^(kl)"
Similarly, `ESC F1' may be specified by "\e^(k1)". In these examples,
`kl' is the temcap cabibility name for the left arrow key, and `k1' is
the capability for the F1 function key.
Below, you will find a table of all the two character ^(XX)
combinations that the slang library recognizes. Keep in mind that
many termcap/terminfo files may lack this information, and most
terminals will not have the all the keys in the table. This table was
adapted form slang/src/sltermin.c.
#2 Key S-Home
#3 Key S-Insert
#4 Key S-Left
%0 redo key
%1 help key
%2 mark key
%3 message key
%4 move key
%5 next key
%6 open key
%7 options key
%8 previous key
%9 print key
%c Key S-Next
%e Key S-Previous
%i Key S-Right
&1 reference key
&2 refresh key
&3 replace key
&4 restart key
&5 resume key
&6 save key
&7 suspend key
&8 undo key
*4 Key S-Delete
*5 shifted key
*6 select key
*7 Key S-End
@0 find key
@1 begin key
@2 cancel key
@3 close key
@4 command key
@5 copy key
@6 create key
@7 Key End
@8 enter/send key
@9 exit key
F1 key_f11
F2 key_f12
F3 key_f13
F4 key_f14
F5 key_f15
F6 key_f16
F7 key_f17
F8 key_f18
F9 key_f19
FA key_f20
FB F21 function key
FC F22 function key
FD F23 function key
FE F24 function key
FF F25 function key
FG F26 function key
FH F27 function key
FI F28 function key
FJ F29 function key
FK F30 function key
FL F31 function key
FM F32 function key
FN F33 function key
FO F34 function key
FP F35 function key
FQ F36 function key
FR F37 function key
FS F38 function key
FT F39 function key
FU F40 function key
FV F41 function key
FW F42 function key
FX F43 function key
FY F44 function key
FZ F45 function key
Fa F46 function key
Fb F47 function key
Fc F48 function key
Fd F49 function key
Fe F50 function key
Ff F51 function key
Fg F52 function key
Fh F53 function key
Fi F54 function key
Fj F55 function key
Fk F56 function key
Fl F57 function key
Fm F58 function key
Fn F59 function key
Fo F60 function key
Fp F61 function key
Fq F62 function key
Fr F63 function key
K1 upper left of keypad
K2 center of keypad
K3 upper right of keypad
K4 lower left of keypad
K5 lower right of keypad
k0 F0 function key
k1 F1 function key
k2 F2 function key
k3 F3 function key
k4 F4 function key
k5 F5 function key
k6 F6 function key
k7 F7 function key
k8 F8 fucntion key
k9 F9 function key
k; F10 function key
kA insert-line key
kB back-tab key
kC clear-screen or erase key
kD delete-character key
kE clear-to-end-of-line key
kF scroll-forward key
kH last-line key
kI insert-character key
kL delete-line key
kN next-page key
kP prev-page key
kR scroll-backward key
kS clear-to-end-of-screen key
kT set-tab key
ka clear-all-tabs key
kb backspace key
kd down-arrow key
ke leave 'keyboard_transmit' mode
kh home key
kl left-arrow key
ko list of self-mapped keycaps
kr right-arrow key
ks enter 'keyboard_transmit' mode
kt clear-tab key
ku up-arrow key
Technical Details
Message-ID:
<slrn6k4beu.e1.davis@mygir.davis.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailReferences:
<slrn6jeftq.hqo.hezu@tuuri.ling.helsinki.fi> <slrn6jeqs0.jj9.lahvak@math.mps.ohio-state.edu> <slrn6jgv6l.127.hezu@tuuri.ling.helsinki.fi>Show Full Headers
Complete Article Headers
Message-ID: <slrn6k4beu.e1.davis@mygir.davis.net> Subject: Re: Slrn: binding same slang macro to multiple keys and posting failures Date: Sun, 26 Apr 1998 00:00:00 +0000 From: da...@space.mit.edu (John E. Davis) References: <slrn6jeftq.hqo.hezu@tuuri.ling.helsinki.fi> <slrn6jeqs0.jj9.lahvak@math.mps.ohio-state.edu> <slrn6jgv6l.127.hezu@tuuri.ling.helsinki.fi> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 347786218 Organization: Center for Space Research Newsgroups: news.software.readers,alt.lang.s-lang