Browse Source

Apple users can now finally use the command key instead of control.

merge-requests/365/head
eidheim 11 years ago
parent
commit
7149d416b8
  1. 11
      juci/config.cc

11
juci/config.cc

@ -82,8 +82,15 @@ void MainConfig::GenerateKeybindings() {
menu->ui+=line; menu->ui+=line;
} }
boost::property_tree::ptree keys_json = cfg_.get_child("keybindings"); boost::property_tree::ptree keys_json = cfg_.get_child("keybindings");
for (auto &i : keys_json) for (auto &i : keys_json) {
menu->key_map[i.first] = i.second.get_value<std::string>(); auto key=i.second.get_value<std::string>();
#ifdef __APPLE__
auto pos=key.find("<control>");
if(pos!=std::string::npos)
key.replace(pos, 9, "<meta>");
#endif
menu->key_map[i.first] = key;
}
DEBUG("Keybindings fetched"); DEBUG("Keybindings fetched");
} }

Loading…
Cancel
Save