[orca] Tweaking the new key capturing code
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Tweaking the new key capturing code
- Date: Tue, 14 Feb 2012 21:52:36 +0000 (UTC)
commit 3c5d6087212fde447a461593607f7d208d75d846
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Feb 14 16:52:09 2012 -0500
Tweaking the new key capturing code
src/orca/orca_gui_prefs.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index b843335..c82038b 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -2804,7 +2804,8 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
eventState = keyPressedEvent.state
modifierKeys = ['Alt_L', 'Alt_R', 'Control_L', 'Control_R',
- 'Shift_L', 'Shift_R', 'Meta_L', 'Meta_R']
+ 'Shift_L', 'Shift_R', 'Meta_L', 'Meta_R',
+ 'Num_Lock', 'Caps_Lock']
if eventString in modifierKeys:
return False
@@ -2817,11 +2818,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self._capturedKey = ['', settings.ORCA_MODIFIER_MASK, 0]
return False
- if eventString.startswith("KP") and eventString != "KP_Enter":
- name = Gdk.keyval_name(entries[1])
- if name.startswith("KP"):
- eventString = name
-
if not self._capturedKey:
self._capturedKey = [eventString, eventState, 1]
return True
@@ -2889,6 +2885,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
# entered has already been bound to another command.
#
msg = _("The key entered is already bound to %s") % description
+ self._capturedKey = []
else:
# Translators: this is a spoken prompt letting the user know Orca
# know Orca has recorded a new key combination (e.g., Alt+Ctrl+g)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]