summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-03-30 16:16:49 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-03-30 16:16:49 +0000
commitc91e468f38403508130e714656d0c151152f0f13 (patch)
treee3645e4c09380aaf43877c659a2d495d8f63d89b /usr.bin
parent2426072ed28d5aa6f9b7e3a08a665f57715fe54e (diff)
Tweak key numbers to avoid some special keys crossing over with modifier bits.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/tmux.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 43227313398..6e20cfa3d85 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.966 2020/03/28 09:51:12 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.967 2020/03/30 16:16:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -102,24 +102,24 @@ struct winlink;
#define VISUAL_BOTH 2
/* Special key codes. */
-#define KEYC_NONE 0xffff00000000ULL
-#define KEYC_UNKNOWN 0xfffe00000000ULL
-#define KEYC_BASE 0x000010000000ULL
-#define KEYC_USER 0x000020000000ULL
+#define KEYC_NONE 0x00ff000000000ULL
+#define KEYC_UNKNOWN 0x00fe000000000ULL
+#define KEYC_BASE 0x0001000000000ULL
+#define KEYC_USER 0x0002000000000ULL
+
+/* Key modifier bits. */
+#define KEYC_ESCAPE 0x0100000000000ULL
+#define KEYC_CTRL 0x0200000000000ULL
+#define KEYC_SHIFT 0x0400000000000ULL
+#define KEYC_XTERM 0x0800000000000ULL
+#define KEYC_LITERAL 0x1000000000000ULL
/* Available user keys. */
#define KEYC_NUSER 1000
-/* Key modifier bits. */
-#define KEYC_ESCAPE 0x200000000000ULL
-#define KEYC_CTRL 0x400000000000ULL
-#define KEYC_SHIFT 0x800000000000ULL
-#define KEYC_XTERM 0x1000000000000ULL
-#define KEYC_LITERAL 0x2000000000000ULL
-
/* Mask to obtain key w/o modifiers. */
-#define KEYC_MASK_MOD (KEYC_ESCAPE|KEYC_CTRL|KEYC_SHIFT|KEYC_XTERM|KEYC_LITERAL)
-#define KEYC_MASK_KEY (~KEYC_MASK_MOD)
+#define KEYC_MASK_MOD 0xff00000000000ULL
+#define KEYC_MASK_KEY 0x00fffffffffffULL
/* Is this a mouse key? */
#define KEYC_IS_MOUSE(key) (((key) & KEYC_MASK_KEY) >= KEYC_MOUSE && \