summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/key-string.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-07-24 14:57:22 +0000
committernicm <nicm@openbsd.org>2009-07-24 14:57:22 +0000
commite65c658c0ef4c875daca9e4cd1384a7dbd981584 (patch)
treedb1c564af73dca340cae179252cad9e7884baacf /usr.bin/tmux/key-string.c
parentPermit commands to be bound to key presses without the prefix key first. The (diff)
downloadwireguard-openbsd-e65c658c0ef4c875daca9e4cd1384a7dbd981584.tar.xz
wireguard-openbsd-e65c658c0ef4c875daca9e4cd1384a7dbd981584.zip
Accept lowercase c- and m- prefix as well as C- and M-.
Diffstat (limited to 'usr.bin/tmux/key-string.c')
-rw-r--r--usr.bin/tmux/key-string.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/key-string.c b/usr.bin/tmux/key-string.c
index 73e6f983e2b..3d261a6aff0 100644
--- a/usr.bin/tmux/key-string.c
+++ b/usr.bin/tmux/key-string.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key-string.c,v 1.3 2009/07/21 17:57:29 nicm Exp $ */
+/* $OpenBSD: key-string.c,v 1.4 2009/07/24 14:57:22 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -108,7 +108,7 @@ key_string_lookup_string(const char *string)
return (string[0]);
ptr = NULL;
- if (string[0] == 'C' && string[1] == '-')
+ if ((string[0] == 'C' || string[0] == 'c') && string[1] == '-')
ptr = string + 2;
else if (string[0] == '^')
ptr = string + 1;
@@ -129,8 +129,8 @@ key_string_lookup_string(const char *string)
return (key | KEYC_CTRL);
return (KEYC_NONE);
}
-
- if (string[0] == 'M' && string[1] == '-') {
+
+ if ((string[0] == 'M' || string[0] == 'm') && string[1] == '-') {
ptr = string + 2;
if (ptr[0] == '\0')
return (KEYC_NONE);