Example #1
0
 def _edit_controls(self):
     edit_config = config.get(EDIT_CONFIG_ID, {})
     keybind_id = edit_config.get("keybind_group", DefaultKeybindGroupId)
     user_keybinds = edit_config.get("user_keybinds", {})
     key_config = KeyConfigDialog(self, keybind_id, KeybindKeys,
                                  PresetKeybinds, user_keybinds)
     if key_config.ShowModal() == wx.ID_OK:
         user_keybinds, keybind_id, keybinds = key_config.options
         edit_config["user_keybinds"] = user_keybinds
         edit_config["keybind_group"] = keybind_id
         config.put(EDIT_CONFIG_ID, edit_config)
         self._canvas.set_key_binds(keybinds)
Example #2
0
 def _edit_controls(self):
     edit_config = config.get(EDIT_CONFIG_ID, {})
     keybind_id = edit_config.get("keybind_group", DefaultKeybindGroupId)
     user_keybinds = edit_config.get("user_keybinds", {})
     key_config = KeyConfigDialog(self, keybind_id, KeybindKeys,
                                  PresetKeybinds, user_keybinds)
     if key_config.ShowModal() == wx.ID_OK:
         user_keybinds, keybind_id, keybinds = key_config.options
         edit_config["user_keybinds"] = user_keybinds
         edit_config["keybind_group"] = keybind_id
         config.put(EDIT_CONFIG_ID, edit_config)
         self._canvas.buttons.clear_registered_actions()
         for action, (modifier_keys, trigger_key) in keybinds.items():
             self._canvas.buttons.register_action(action, trigger_key,
                                                  modifier_keys)