What steps will reproduce the problem? 1. To reproduce the problem -- You has to have some event binded to <alt>+<capslock>. I had keyboard layout switch. 2. Make a AutoKey script: keyboard.fake_keypress("<alt>+<capslock>"). Bind it to some key. 3. Save it all and try calling this script - it won't switch the layout, while pressing <alt>+<capslock> manually - will.
Comment #1
Posted on Aug 12, 2011 by Grumpy BearAlso here's an error message:
File "/usr/lib/python2.7/dist-packages/autokey/service.py", line 406, in execute exec script.code in self.scope File "", line 2, in File "/usr/lib/python2.7/dist-packages/autokey/scripting.py", line 96, in fake_keypress self.mediator.fake_keypress(key.decode("utf-8")) File "/usr/lib/python2.7/dist-packages/autokey/iomediator.py", line 283, in fake_keypress self.interface.fake_keypress(keyName) File "/usr/lib/python2.7/dist-packages/autokey/interface.py", line 491, in fake_keypress keyCode = self.__lookupKeyCode(keyName) File "/usr/lib/python2.7/dist-packages/autokey/interface.py", line 660, in __lookupKeyCode return self.localDisplay.keysym_to_keycode(ord(char)) TypeError: ord() expected a character, but string of length 16 found
Comment #2
Posted on Sep 11, 2011 by Swift BirdThanks for this report - looks like a legitimate bug. Will try to fix for the next release.
Comment #3
Posted on Sep 12, 2011 by Swift BirdUser error - fake_keypress is designed for single keystrokes. If you want to do a chord, it should be done like this:
keyboard.press_key("") keyboard.press_key("") keyboard.release_key("") keyboard.release_key("")
Comment #4
Posted on Jan 2, 2014 by Helpful Wombatkeyboard.press_key("") keyboard.press_key("
Status: WontFix
Labels:
Type-Defect
Priority-Medium