From 7b16df057ce5b8cd5ad1870d5188ee11140e73b5 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 16 Feb 2013 02:22:51 +0100 Subject: function key support (keys without printable representation) using keyboard macros * if enabled, when a function key is pressed it is looked up in Q-Registers ^F... e.g. HOME key corresponds to register ^FHOME * the string if available is inserted as if it was entered by key-presses (later it may be entered as a single input token which may be removed in a single rubout) * only NCurses currently, key names directly correspond to Curses key names * on Curses if function keys are enabled ESCAPE will be inserted after a delay (because function keys are transmitted via escape sequences). A function key macro may be used to define an alternative escape character --- src/cmdline.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/cmdline.h') diff --git a/src/cmdline.h b/src/cmdline.h index 443158f..ca7dfc0 100644 --- a/src/cmdline.h +++ b/src/cmdline.h @@ -29,6 +29,14 @@ extern gint cmdline_pos; extern bool quit_requested; void cmdline_keypress(gchar key); +static inline void +cmdline_keypress(const gchar *keys) +{ + while (*keys) + cmdline_keypress(*keys++); +} + +void cmdline_fnmacro(const gchar *name); /* * Command states -- cgit v1.2.3