Print Alt/Meta before Ctrl
This commit is contained in:
parent
0b8680daa4
commit
e0671d1a01
12
termkey.c
12
termkey.c
|
@ -884,12 +884,6 @@ size_t termkey_snprint_key(termkey_t *tk, char *buffer, size_t len, termkey_key
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(key->modifiers & TERMKEY_KEYMOD_CTRL) {
|
|
||||||
l = snprintf(buffer + pos, len - pos, longmod ? "Ctrl-" : "C-");
|
|
||||||
if(l <= 0) return pos;
|
|
||||||
pos += l;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(key->modifiers & TERMKEY_KEYMOD_ALT) {
|
if(key->modifiers & TERMKEY_KEYMOD_ALT) {
|
||||||
int altismeta = format & TERMKEY_FORMAT_ALTISMETA;
|
int altismeta = format & TERMKEY_FORMAT_ALTISMETA;
|
||||||
|
|
||||||
|
@ -899,6 +893,12 @@ size_t termkey_snprint_key(termkey_t *tk, char *buffer, size_t len, termkey_key
|
||||||
pos += l;
|
pos += l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(key->modifiers & TERMKEY_KEYMOD_CTRL) {
|
||||||
|
l = snprintf(buffer + pos, len - pos, longmod ? "Ctrl-" : "C-");
|
||||||
|
if(l <= 0) return pos;
|
||||||
|
pos += l;
|
||||||
|
}
|
||||||
|
|
||||||
if(key->modifiers & TERMKEY_KEYMOD_SHIFT) {
|
if(key->modifiers & TERMKEY_KEYMOD_SHIFT) {
|
||||||
l = snprintf(buffer + pos, len - pos, longmod ? "Shift-" : "S-");
|
l = snprintf(buffer + pos, len - pos, longmod ? "Shift-" : "S-");
|
||||||
if(l <= 0) return pos;
|
if(l <= 0) return pos;
|
||||||
|
|
Loading…
Reference in New Issue