accerciser r576 - in trunk/macaroon: . macaroon/playback
- From: eitani svn gnome org
- To: svn-commits-list gnome org
- Subject: accerciser r576 - in trunk/macaroon: . macaroon/playback
- Date: Thu, 5 Jun 2008 20:50:15 +0000 (UTC)
Author: eitani
Date: Thu Jun 5 20:50:15 2008
New Revision: 576
URL: http://svn.gnome.org/viewvc/accerciser?rev=576&view=rev
Log:
* macaroon/playback/keypress_actions.py (TypeAction._charType):
Query the default keymap for the proper keycode and level. If
the level is 1, press shift.
Modified:
trunk/macaroon/ChangeLog
trunk/macaroon/macaroon/playback/keypress_actions.py
Modified: trunk/macaroon/macaroon/playback/keypress_actions.py
==============================================================================
--- trunk/macaroon/macaroon/playback/keypress_actions.py (original)
+++ trunk/macaroon/macaroon/playback/keypress_actions.py Thu Jun 5 20:50:15 2008
@@ -255,26 +255,25 @@
'''
interval = 0
for char in string_to_type:
- key_code = utils.getKeyCodeFromVal(gtk.gdk.unicode_to_keyval(ord(char)))
- gobject.timeout_add(interval, self._charType, key_code, char.isupper())
+ gobject.timeout_add(interval, self._charType,
+ gtk.gdk.unicode_to_keyval(ord(char)))
interval += self.interval
gobject.timeout_add(interval, self.stepDone)
- def _charType(self, key_code, upper):
+ def _charType(self, keyval):
'''
Type a single character.
- @param key_code: Key code to type.
- @type key_code: intger
- @param upper: Is the character uppercase?
- @type upper:
+ @param keyval: Key code to type.
+ @type keyval: intger
'''
- if upper:
+ key_code, group, level = utils.keymap.get_entries_for_keyval(keyval)[0]
+ if level == 1:
pyatspi.Registry.generateKeyboardEvent(50, None,
pyatspi.KEY_PRESS)
pyatspi.Registry.generateKeyboardEvent(key_code, None,
pyatspi.KEY_PRESSRELEASE)
- if upper:
+ if level == 1:
pyatspi.Registry.generateKeyboardEvent(50, None,
pyatspi.KEY_RELEASE)
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]