summaryrefslogtreecommitdiff
path: root/keybinds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'keybinds.cpp')
-rw-r--r--keybinds.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/keybinds.cpp b/keybinds.cpp
index 2e4ebe2..c41452f 100644
--- a/keybinds.cpp
+++ b/keybinds.cpp
@@ -168,7 +168,7 @@ const Keybind KeybindsModule::emacsBindMode(string bindString)
Keybind bind;
bind.modifiers = 0;
- const std::regex keyRegex("^(?:([CMs])-)?(?:([CMs])-)?(?:([CMs])-)?([^\s]|(SPC|ESC|RET|))$");
+ const std::regex keyRegex("^(?:([CMs])-)?(?:([CMs])-)?(?:([CMs])-)?([^\\s]|(SPC|ESC|RET|))$");
std::smatch keyMatch;
if(std::regex_match(bindString, keyMatch, keyRegex))
{
@@ -203,10 +203,14 @@ const Keybind KeybindsModule::emacsBindMode(string bindString)
{
if(keyMatch[4].str() == "RET")
keySym = XK_Return;
- if(keyMatch[4].str() == "ESC")
+ else if(keyMatch[4].str() == "ESC")
keySym = XK_Escape;
- if(keyMatch[4].str() == "SPC")
+ else if(keyMatch[4].str() == "SPC")
keySym = XK_space;
+ else if(keyMatch[4].str() == "-")
+ keySym = XK_minus;
+ else if(keyMatch[4].str() == "+")
+ keySym = XK_plus;
else
throw Err(CFG_ERR_KEYBIND, "Keybind '" + bindString + "' is invalid");
}