aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2013-08-26 01:14:35 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2013-08-26 01:14:35 +0100
commita36648e1721367e3e423be7a567aeeafc25e3f54 (patch)
treeaa2893c988a77e49efd567b300e44c9f3bc57ac8 /termkey.c
parent24abb0c59e78c2b7a660ca05f5afb6c514555ca5 (diff)
downloadtermo-a36648e1721367e3e423be7a567aeeafc25e3f54.tar.gz
termo-a36648e1721367e3e423be7a567aeeafc25e3f54.tar.xz
termo-a36648e1721367e3e423be7a567aeeafc25e3f54.zip
Added TERMKEY_FORMAT_LOWERMOD
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/termkey.c b/termkey.c
index a45dc56..c8388df 100644
--- a/termkey.c
+++ b/termkey.c
@@ -1178,6 +1178,10 @@ modnames[] = {
{ "Shift", "Alt", "Ctrl" }, // LONGMOD
{ "S", "M", "C" }, // ALTISMETA
{ "Shift", "Meta", "Ctrl" }, // ALTISMETA+LONGMOD
+ { "s", "a", "c" }, // LOWERMOD
+ { "shift", "alt", "ctrl" }, // LOWERMOD+LONGMOD
+ { "s", "m", "c" }, // LOWERMOD+ALTISMETA
+ { "shift", "meta", "ctrl" }, // LOWERMOD+ALTISMETA+LONGMOD
};
size_t termkey_strfkey(TermKey *tk, char *buffer, size_t len, TermKeyKey *key, TermKeyFormat format)
@@ -1186,7 +1190,8 @@ size_t termkey_strfkey(TermKey *tk, char *buffer, size_t len, TermKeyKey *key, T
size_t l = 0;
struct modnames *mods = &modnames[!!(format & TERMKEY_FORMAT_LONGMOD) +
- !!(format & TERMKEY_FORMAT_ALTISMETA) * 2];
+ !!(format & TERMKEY_FORMAT_ALTISMETA) * 2 +
+ !!(format & TERMKEY_FORMAT_LOWERMOD) * 4];
int wrapbracket = (format & TERMKEY_FORMAT_WRAPBRACKET) &&
(key->type != TERMKEY_TYPE_UNICODE || key->modifiers != 0);
@@ -1302,7 +1307,8 @@ size_t termkey_strfkey(TermKey *tk, char *buffer, size_t len, TermKeyKey *key, T
const char *termkey_strpkey(TermKey *tk, const char *str, TermKeyKey *key, TermKeyFormat format)
{
struct modnames *mods = &modnames[!!(format & TERMKEY_FORMAT_LONGMOD) +
- !!(format & TERMKEY_FORMAT_ALTISMETA) * 2];
+ !!(format & TERMKEY_FORMAT_ALTISMETA) * 2 +
+ !!(format & TERMKEY_FORMAT_LOWERMOD) * 4];
key->modifiers = 0;