aboutsummaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-09-20 00:26:56 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-10-05 16:54:05 +0200
commit2819343fcafdcfc9db4d9213031a6f790fa76f22 (patch)
treef8b7c280b7b813f6c332bafd678bd78692eaefa3 /editor.h
parentd638b9a1c3dc68accdc1f660851f0289b870c74d (diff)
downloadvis-2819343fcafdcfc9db4d9213031a6f790fa76f22.tar.gz
vis-2819343fcafdcfc9db4d9213031a6f790fa76f22.tar.xz
vis: introduce keyboard actions
This adds another level of indirection by defining keyboard actions which will likely eventually be used by a :map command.
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/editor.h b/editor.h
index 598cf0c..80fe844 100644
--- a/editor.h
+++ b/editor.h
@@ -28,11 +28,18 @@ typedef union {
} Arg;
typedef struct {
- const char *key;
+ const char *name;
+ const char *help;
const char* (*func)(const char *keys, const Arg*);
/* returns a pointer to the first not consumed character in keys
* or NULL if not enough input was available to complete the command */
const Arg arg;
+
+} KeyAction;
+
+typedef struct {
+ const char *key;
+ KeyAction *action;
const char *alias;
} KeyBinding;