From 2819343fcafdcfc9db4d9213031a6f790fa76f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 20 Sep 2015 00:26:56 +0200 Subject: vis: introduce keyboard actions This adds another level of indirection by defining keyboard actions which will likely eventually be used by a :map command. --- editor.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'editor.h') 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; -- cgit v1.2.3