diff options
Diffstat (limited to 'grc/gui')
-rw-r--r-- | grc/gui/Actions.py | 4 | ||||
-rw-r--r-- | grc/gui/PropsDialog.py | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/grc/gui/Actions.py b/grc/gui/Actions.py index d3d63f293..cacee22ce 100644 --- a/grc/gui/Actions.py +++ b/grc/gui/Actions.py @@ -98,7 +98,7 @@ _actions_key_list = ( ) _actions_key_dict = dict(((key_val, mod_mask), action_name) for action_name, key_val, mod_mask in _actions_key_list) -_all_mods_mask = reduce(lambda x, y: x | y, [mod_mask for action_name, key_val, mod_mask in _actions_key_list], NO_MODS_MASK) +_used_mods_mask = reduce(lambda x, y: x | y, [mod_mask for action_name, key_val, mod_mask in _actions_key_list], NO_MODS_MASK) def get_action_name_from_key_press(key_val, mod_mask=NO_MODS_MASK): """ Get the action name associated with the key value and mask. @@ -107,7 +107,7 @@ def get_action_name_from_key_press(key_val, mod_mask=NO_MODS_MASK): @param mod_mask the key press mask (shift, ctrl) 0 for none @return the action name or blank string """ - mod_mask &= _all_mods_mask #ignore irrelevant modifiers + mod_mask &= _used_mods_mask #ignore irrelevant modifiers key_val_mod_mask = (key_val, mod_mask) try: return _actions_key_dict[key_val_mod_mask] except KeyError: return '' diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py index 29b3c7b40..b295ba412 100644 --- a/grc/gui/PropsDialog.py +++ b/grc/gui/PropsDialog.py @@ -154,8 +154,9 @@ class PropsDialog(gtk.Dialog): Call the ok response when enter is pressed. @return false to forward the keypress """ - keyname = gtk.gdk.keyval_name(event.keyval) - if keyname == 'Return': self.response(gtk.RESPONSE_ACCEPT) + if event.keyval == gtk.keysyms.Return: + self.response(gtk.RESPONSE_ACCEPT) + return True #handled here return False #forward the keypress def run(self): |