From e0671d1a01dcac4d69087127122daa89188fab5e Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Mon, 6 Oct 2008 22:39:00 +0100 Subject: [PATCH] Print Alt/Meta before Ctrl --- termkey.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/termkey.c b/termkey.c index 4175ad0..023b3aa 100644 --- a/termkey.c +++ b/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) { 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; } + 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) { l = snprintf(buffer + pos, len - pos, longmod ? "Shift-" : "S-"); if(l <= 0) return pos;