diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-16 02:22:51 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-16 02:22:51 +0100 |
commit | 7b16df057ce5b8cd5ad1870d5188ee11140e73b5 (patch) | |
tree | f593584458b8737738f0d7767a1e9d41dc71efc0 /src/cmdline.h | |
parent | b08d5e7dad907493bc6946ab708640b567e2dffe (diff) | |
download | sciteco-7b16df057ce5b8cd5ad1870d5188ee11140e73b5.tar.gz |
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
Diffstat (limited to 'src/cmdline.h')
-rw-r--r-- | src/cmdline.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 |