From cbcee2935dd77ffd0403ec20ae5039054a937006 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Sat, 27 Aug 2011 03:16:49 +0200 Subject: [PATCH] command: add macro KEY_CTL() I copied it from tig[1], which is licensed under the GPLv2+, so we may use the code. [1] http://jonas.nitro.dk/tig/ --- src/command.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/command.c b/src/command.c index 0bb45bf..9ce7b0e 100644 --- a/src/command.c +++ b/src/command.c @@ -40,6 +40,8 @@ #define DK(x) #endif +#define KEY_CTL(x) ((x) & 0x1f) /* KEY_CTL(A) == ^A == \1 */ + #define BS KEY_BACKSPACE #define DEL KEY_DC #define UP KEY_UP -- 2.30.2