From 0962ee4f85decab16bef85f467e79d163db9bbb3 Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Sun, 10 Feb 2008 20:39:22 +0000 Subject: Recognise full CSIfuncs list of F1 to F20 keys --- termkey.c | 12 ++++++++++++ termkey.h | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/termkey.c b/termkey.c index 2975f5a..2be6b8c 100644 --- a/termkey.c +++ b/termkey.c @@ -159,6 +159,10 @@ termkey_t *termkey_new_full(int fd, int flags, size_t buffsize, int waittime) termkey_register_csifunc(tk, TERMKEY_SYM_END, 4, "End"); termkey_register_csifunc(tk, TERMKEY_SYM_PAGEUP, 5, "PageUp"); termkey_register_csifunc(tk, TERMKEY_SYM_PAGEDOWN, 6, "PageDown"); + termkey_register_csifunc(tk, TERMKEY_SYM_F1, 11, "F1"); + termkey_register_csifunc(tk, TERMKEY_SYM_F2, 12, "F2"); + termkey_register_csifunc(tk, TERMKEY_SYM_F3, 13, "F3"); + termkey_register_csifunc(tk, TERMKEY_SYM_F4, 14, "F4"); termkey_register_csifunc(tk, TERMKEY_SYM_F5, 15, "F5"); termkey_register_csifunc(tk, TERMKEY_SYM_F6, 17, "F6"); termkey_register_csifunc(tk, TERMKEY_SYM_F7, 18, "F7"); @@ -167,6 +171,14 @@ termkey_t *termkey_new_full(int fd, int flags, size_t buffsize, int waittime) termkey_register_csifunc(tk, TERMKEY_SYM_F10, 21, "F10"); termkey_register_csifunc(tk, TERMKEY_SYM_F11, 23, "F11"); termkey_register_csifunc(tk, TERMKEY_SYM_F12, 24, "F12"); + termkey_register_csifunc(tk, TERMKEY_SYM_F13, 25, "F13"); + termkey_register_csifunc(tk, TERMKEY_SYM_F14, 26, "F14"); + termkey_register_csifunc(tk, TERMKEY_SYM_F15, 28, "F15"); + termkey_register_csifunc(tk, TERMKEY_SYM_F16, 29, "F16"); + termkey_register_csifunc(tk, TERMKEY_SYM_F17, 31, "F17"); + termkey_register_csifunc(tk, TERMKEY_SYM_F18, 32, "F18"); + termkey_register_csifunc(tk, TERMKEY_SYM_F19, 33, "F19"); + termkey_register_csifunc(tk, TERMKEY_SYM_F20, 34, "F20"); return tk; } diff --git a/termkey.h b/termkey.h index 077afdc..629c79c 100644 --- a/termkey.h +++ b/termkey.h @@ -45,6 +45,14 @@ typedef enum { TERMKEY_SYM_F10, TERMKEY_SYM_F11, TERMKEY_SYM_F12, + TERMKEY_SYM_F13, + TERMKEY_SYM_F14, + TERMKEY_SYM_F15, + TERMKEY_SYM_F16, + TERMKEY_SYM_F17, + TERMKEY_SYM_F18, + TERMKEY_SYM_F19, + TERMKEY_SYM_F20, // Numeric keypad special keys TERMKEY_SYM_KP0, -- cgit v1.2.3-70-g09d2