1# This is a sample key sequence definition file. It is used by Lynx when 2# built with ncurses or slang, to augment the definitions from your terminal's 3# termcap or terminfo description. 4 5# (Lynx implements this mechanism only if USE_KEYMAPS is defined during 6# compilation, which has nothing to do with the KEYMAP directives in lynx.cfg, 7# see source file LYCurses.h.) 8 9# Lines that start with a '#' are comment lines. Blank lines are ignored. 10 11# The 'setkey' function may be used in two ways: 12# 13# 1. setkey ESC-SEQUENCE KEYSYM 14# 2. setkey ESC-SEQUENCE KEYSYM_NAME 15# 16# where KEYSYM is an integer. A keysym is essentially with the lynx.cfg 17# file calls a 'keystroke', but I think that keysym is a more appropriate 18# name. The keysym is an integer and may be expressed in various ways: 19# 20# as a decimal integer: 97 21# hexadecimal: 0x61 22# Octal: 0141 23# as an ASCII character: 'a' 24# 25# Some keysyms may be expressed symbolically as a keysym name using the 26# second form. The currently recognized symbolic names are: 27# 28# UPARROW 29# DNARROW 30# RTARROW 31# LTARROW 32# PGDOWN 33# PGUP 34# HOME 35# END 36# F1 37# DO_KEY 38# FIND_KEY 39# SELECT_KEY 40# INSERT_KEY 41# REMOVE_KEY 42# DO_NOTHING 43# 44# It does not matter if your keyboard does not have some of the keys 45# implied by the above names. The fact is that lynx uses these keys as an 46# an intermediate representation. 47# 48# The ESC-SEQUENCE should be enclosed in double quotes. The '^' character 49# is special and indicates a control character, e.g., ^K is Ctrl-K. An ESC 50# character (ascii 27) may be represented as ^[. As an example, many 51# terminals have arrow keys that emit 'ESC [ A' for the UP arrow. This may 52# be represented as the escape sequence "^[[A". The default keymapping is 53# given below: 54# 55setkey "\033[A" UPARROW 56setkey "\033OA" UPARROW 57setkey "\033[B" DNARROW 58setkey "\033OB" DNARROW 59setkey "\033[C" RTARROW 60setkey "\033OC" RTARROW 61setkey "\033[D" LTARROW 62setkey "\033OD" LTARROW 63setkey "\033[1~" FIND_KEY 64setkey "\033[2~" INSERT_KEY 65setkey "\033[3~" REMOVE_KEY 66setkey "\033[4~" SELECT_KEY 67setkey "\033[5~" PGUP 68setkey "\033[6~" PGDOWN 69setkey "\033[8~" END 70setkey "\033[7~" HOME 71setkey "\033[28~" F1 72setkey "\033[29~" DO_KEY 73# 74# All other keys map to themselves, e.g, 75# 76setkey "a" 'a' 77# 78# Now suppose that your terminal produces different escape sequences for 79# HOME and END. In particular, suppose that the home key produces 'ESC [ 80# H' and that the end key produces 'ESC [ K'. Then these may be defined to 81# map to lynx HOME and END keys via 82# 83setkey "^[[H" HOME 84setkey "^[[K" END 85# 86# Similarly, we may map emacs-like sequences to these functions: 87# 88setkey "^[<" HOME 89setkey "^[>" END 90# 91# Note that it may be impossible to map several sequences to the same 92# keysym (NCURSES only?), in that case the mapping occurring last wins. 93# 94# The following maps a sequence commonly used for Shift+Tab to the 95# corresponding code. It should not be needed if the terminfo file 96# has the correct info for kcbt. 97# 98setkey "^[[Z" 0x10F 99# 100# Other special escapes: 101# \a bell 102# \b backspace 103# \f form-feed 104# \n newline (line-feed) 105# \r carriage-return 106# \t tab 107# \v vertical tab 108# \<number> octal number, up to 3 digits, e.g., "\033". 109# \d<number> decimal number, up to 3 digits, e.g., "\d99" 110# \x<number> hexadecimal number, up to 2 digits, e.g., "\xFF" 111# 112# For Unix-systems (which have termcap or terminfo) you may also use symbols 113# that refer to the termcap/terminfo, by referencing the name bracketed by 114# "^(" and ")", e.g., 115setkey "^(cuu1)" UPARROW 116setkey "^(up)" UPARROW 117# 118# The following extension, introduced after lynx2.8.2, allows to force 119# recognition of meta (ESC) prefixes - especially useful with the 120# "Bash-like" lineeditor binding. Its use is unnecessary in most 121# cases if Lynx was built with ncurses, but is probably necessary for 122# all keys that should recognize ESC as a prefix if Lynx was built with 123# slang. 124# 125# setkey ESC-SEQUENCE Meta-LETTER 126# setkey ESC-SEQUENCE Meta-KEYSYM 127# setkey ESC-SEQUENCE Meta-KEYSYM_NAME 128# 129# for example 130#setkey "\033b" Meta-b 131#setkey "\033e" Meta-'e' 132#setkey "\033\033[28~" Meta-F1 133# 134# The following extensions, introduced after lynx2.8.2, allow mapping 135# escape sequences directly to key commands (lynxactioncodes). 136# 137# setkey ESC-SEQUENCE LAC:LYNX_ACTION 138# setkey ESC-SEQUENCE LAC:LYNX_ACTION:LYNX_EDITACTION 139# 140# where LYNX_ACTION is a key command specified as for lynx.cfg KEYMAP 141# options and as listed on the KEYMAP ('K') screen, and LYNX_EDITACTION 142# is a line-editor action specified as for KEYMAP and as listed in Line 143# Editor help pages. Using this form makes remapping according to user 144# preference with KEYMAP impossible, and should thus be used sparingly 145# (in general, use KEYMAP with PASS instead, if the goal is to force 146# recognition of a key in form text fields). For example: 147# 148#setkey "\033e" LAC:EDITTEXTAREA:PASS 149