aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/keys.lua
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-08-21 15:20:51 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-08-21 15:20:51 -0400
commitf275e0054dbfc6d1604031d93ac08d376c9029fb (patch)
treec920c4f301d1c5d6b8f8d8df2a652346acbf6240 /core/keys.lua
parent3dbcac857858af49883d782f7d39f5394d8ea1f0 (diff)
Added `keys.KEYSYMS` representations to LuaDoc.
Diffstat (limited to 'core/keys.lua')
-rw-r--r--core/keys.lua31
1 files changed, 6 insertions, 25 deletions
diff --git a/core/keys.lua b/core/keys.lua
index ecf98eaa..da7be521 100644
--- a/core/keys.lua
+++ b/core/keys.lua
@@ -120,33 +120,14 @@ M.CLEAR = 'esc'
-- Lookup table for string representations of key codes higher than 255.
-- Key codes can be identified by temporarily uncommenting the `print()`
-- statements in *core/keys.lua*.
+-- Recognized codes are: esc, \b, \t, \n, down, up, left, right, home, end,
+-- pgup, pgdn, del, ins, and f1-f12.
+-- The GUI version also recognizes: kpenter, kphome, kpend, kpleft, kpup,
+-- kpright, kpdown, kppgup, kppgdn, kpmul, kpadd, kpsub, kpdiv, kpdec, and
+-- kp0-kp9.
-- @class table
-- @name KEYSYMS
-M.KEYSYMS = {
- -- From Scintilla.h for CURSES.
- [7] = 'esc', [8] = '\b', [9] = '\t', [13] = '\n',
- -- From curses.h.
- [263] = '\b', [343] = '\n',
- -- From Scintilla.h for CURSES.
- [300] = 'down', [301] = 'up', [302] = 'left', [303] = 'right', [304] = 'home',
- [305] = 'end', [306] = 'pgup', [307] = 'pgdn', [308] = 'del', [309] = 'ins',
- -- From <gdk/gdkkeysyms.h>.
- [0xFE20] = '\t', -- backtab; will be 'shift'ed
- [0xFF08] = '\b', [0xFF09] = '\t', [0xFF0D] = '\n', [0xFF1B] = 'esc',
- [0xFFFF] = 'del', [0xFF50] = 'home', [0xFF51] = 'left', [0xFF52] = 'up',
- [0xFF53] = 'right', [0xFF54] = 'down', [0xFF55] = 'pgup', [0xFF56] = 'pgdn',
- [0xFF57] = 'end', [0xFF63] = 'ins', [0xFF8D] = 'kpenter', [0xFF95] = 'kphome',
- [0xFF9C] = 'kpend', [0xFF96] = 'kpleft', [0xFF97] = 'kpup',
- [0xFF98] = 'kpright', [0xFF99] = 'kpdown', [0xFF9A] = 'kppgup',
- [0xFF9B] = 'kppgdn', [0xFFAA] = 'kpmul', [0xFFAB] = 'kpadd',
- [0xFFAD] = 'kpsub', [0xFFAF] = 'kpdiv', [0xFFAE] = 'kpdec', [0xFFB0] = 'kp0',
- [0xFFB1] = 'kp1', [0xFFB2] = 'kp2', [0xFFB3] = 'kp3', [0xFFB4] = 'kp4',
- [0xFFB5] = 'kp5', [0xFFB6] = 'kp6', [0xFFB7] = 'kp7', [0xFFB8] = 'kp8',
- [0xFFB9] = 'kp9', [0xFFBE] = 'f1', [0xFFBF] = 'f2', [0xFFC0] = 'f3',
- [0xFFC1] = 'f4', [0xFFC2] = 'f5', [0xFFC3] = 'f6', [0xFFC4] = 'f7',
- [0xFFC5] = 'f8', [0xFFC6] = 'f9', [0xFFC7] = 'f10', [0xFFC8] = 'f11',
- [0xFFC9] = 'f12',
-}
+M.KEYSYMS = {--[[From Scintilla.h for CURSES]][7]='esc',[8]='\b',[9]='\t',[13]='\n',--[[From curses.h]][263]='\b',[343]='\n',--[[From Scintilla.h for CURSES]][300]='down',[301]='up',[302]='left',[303]='right',[304]='home',[305]='end',[306]='pgup',[307]='pgdn',[308]='del',[309]='ins',--[[From <gdk/gdkkeysyms.h>]][0xFE20]='\t'--[[backtab; will be 'shift'ed]],[0xFF08]='\b',[0xFF09]='\t',[0xFF0D]='\n',[0xFF1B]='esc',[0xFFFF]='del',[0xFF50]='home',[0xFF51]='left',[0xFF52]='up',[0xFF53]='right',[0xFF54]='down',[0xFF55]='pgup',[0xFF56]='pgdn',[0xFF57]='end',[0xFF63]='ins',[0xFF8D]='kpenter',[0xFF95]='kphome',[0xFF9C]='kpend',[0xFF96]='kpleft',[0xFF97]='kpup',[0xFF98]='kpright',[0xFF99]='kpdown',[0xFF9A]='kppgup',[0xFF9B]='kppgdn',[0xFFAA]='kpmul',[0xFFAB]='kpadd',[0xFFAD]='kpsub',[0xFFAF]='kpdiv',[0xFFAE]='kpdec',[0xFFB0]='kp0',[0xFFB1]='kp1',[0xFFB2]='kp2',[0xFFB3]='kp3',[0xFFB4]='kp4',[0xFFB5]='kp5',[0xFFB6]='kp6',[0xFFB7]='kp7',[0xFFB8]='kp8',[0xFFB9]='kp9',[0xFFBE]='f1',[0xFFBF]='f2',[0xFFC0]='f3',[0xFFC1]='f4',[0xFFC2]='f5',[0xFFC3]='f6',[0xFFC4]='f7',[0xFFC5]='f8',[0xFFC6]='f9',[0xFFC7]='f10',[0xFFC8]='f11',[0xFFC9]='f12'}
-- The current key sequence.
local keychain = {}