From 7149d416b82539a86283e0febb187d5e74c6ef8a Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 19 Jul 2015 19:11:19 +0200 Subject: [PATCH] Apple users can now finally use the command key instead of control. --- juci/config.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/juci/config.cc b/juci/config.cc index 4cd3b71..7302984 100644 --- a/juci/config.cc +++ b/juci/config.cc @@ -82,8 +82,15 @@ void MainConfig::GenerateKeybindings() { menu->ui+=line; } boost::property_tree::ptree keys_json = cfg_.get_child("keybindings"); - for (auto &i : keys_json) - menu->key_map[i.first] = i.second.get_value(); + for (auto &i : keys_json) { + auto key=i.second.get_value(); +#ifdef __APPLE__ + auto pos=key.find(""); + if(pos!=std::string::npos) + key.replace(pos, 9, ""); +#endif + menu->key_map[i.first] = key; + } DEBUG("Keybindings fetched"); }