Accept Shift-M-0 through Shift-M-9 as well

This mostly just to accommodate my inverted keyboard layout.
master
C. McEnroe 2020-02-17 12:27:07 -05:00
parent cf83e95114
commit 079bbda246
1 changed files with 25 additions and 25 deletions

50
ui.c
View File

@ -217,33 +217,33 @@ static void errExit(void) {
} }
#define ENUM_KEY \ #define ENUM_KEY \
X(KeyMeta0, "\0330") \ X(KeyMeta0, "\0330", "\33)") \
X(KeyMeta1, "\0331") \ X(KeyMeta1, "\0331", "\33!") \
X(KeyMeta2, "\0332") \ X(KeyMeta2, "\0332", "\33@") \
X(KeyMeta3, "\0333") \ X(KeyMeta3, "\0333", "\33#") \
X(KeyMeta4, "\0334") \ X(KeyMeta4, "\0334", "\33$") \
X(KeyMeta5, "\0335") \ X(KeyMeta5, "\0335", "\33%") \
X(KeyMeta6, "\0336") \ X(KeyMeta6, "\0336", "\33^") \
X(KeyMeta7, "\0337") \ X(KeyMeta7, "\0337", "\33&") \
X(KeyMeta8, "\0338") \ X(KeyMeta8, "\0338", "\33*") \
X(KeyMeta9, "\0339") \ X(KeyMeta9, "\0339", "\33(") \
X(KeyMetaA, "\33a") \ X(KeyMetaA, "\33a", NULL) \
X(KeyMetaB, "\33b") \ X(KeyMetaB, "\33b", NULL) \
X(KeyMetaD, "\33d") \ X(KeyMetaD, "\33d", NULL) \
X(KeyMetaF, "\33f") \ X(KeyMetaF, "\33f", NULL) \
X(KeyMetaL, "\33l") \ X(KeyMetaL, "\33l", NULL) \
X(KeyMetaM, "\33m") \ X(KeyMetaM, "\33m", NULL) \
X(KeyMetaU, "\33u") \ X(KeyMetaU, "\33u", NULL) \
X(KeyMetaV, "\33v") \ X(KeyMetaV, "\33v", NULL) \
X(KeyMetaSlash, "\33/") \ X(KeyMetaSlash, "\33/", NULL) \
X(KeyFocusIn, "\33[I") \ X(KeyFocusIn, "\33[I", NULL) \
X(KeyFocusOut, "\33[O") \ X(KeyFocusOut, "\33[O", NULL) \
X(KeyPasteOn, "\33[200~") \ X(KeyPasteOn, "\33[200~", NULL) \
X(KeyPasteOff, "\33[201~") X(KeyPasteOff, "\33[201~", NULL)
enum { enum {
KeyMax = KEY_MAX, KeyMax = KEY_MAX,
#define X(id, seq) id, #define X(id, seq, alt) id,
ENUM_KEY ENUM_KEY
#undef X #undef X
}; };
@ -262,7 +262,7 @@ void uiInit(void) {
from_status_line = "\7"; from_status_line = "\7";
} }
#define X(id, seq) define_key(seq, id); #define X(id, seq, alt) define_key(seq, id); if (alt) define_key(alt, id);
ENUM_KEY ENUM_KEY
#undef X #undef X