summaryrefslogtreecommitdiff
path: root/src/keys.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-11-11 00:21:20 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-11-11 00:21:20 +0000
commit892c3647e44b98d5edf8ba0e92a67b68aa2e57c6 (patch)
treeb048b12335d3655efc1538cc53854ddef2fab0e8 /src/keys.cc
parent7bd3f4306ddb030d6f7c70f3bcb0fa4e9b6ac4b4 (diff)
Fix to_lower/to_upper handling to correctly support non unicode chars
require a proper unicode locale setup on the system Fixes #94
Diffstat (limited to 'src/keys.cc')
-rw-r--r--src/keys.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keys.cc b/src/keys.cc
index 4b9a83ec..3e0277e0 100644
--- a/src/keys.cc
+++ b/src/keys.cc
@@ -78,7 +78,7 @@ KeyList parse_keys(StringView str)
StringView desc{it.base()+1, end_it.base()};
if (desc.length() > 2 and desc[1_byte] == '-')
{
- switch(tolower(desc[0_byte]))
+ switch(to_lower(desc[0_byte]))
{
case 'c': modifier = Key::Modifiers::Control; break;
case 'a': modifier = Key::Modifiers::Alt; break;
@@ -94,7 +94,7 @@ KeyList parse_keys(StringView str)
result.push_back(canonicalize_ifn({ modifier, name_it->key }));
else if (desc.char_length() == 1)
result.push_back(Key{ modifier, desc[0_char] });
- else if (tolower(desc[0_byte]) == 'f' and desc.length() <= 3)
+ else if (to_lower(desc[0_byte]) == 'f' and desc.length() <= 3)
{
int val = str_to_int(desc.substr(1_byte));
if (val >= 1 and val <= 12)