toprekt2 / autokey

Automatically exported from code.google.com/p/autokey
GNU General Public License v3.0
0 stars 0 forks source link

keyboard.press_key triggers an "X protocol error" #182

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

This is the third issue I'm filing for the same bug and I hope this time there 
will be a possibility to discuss it a little before it is dismissed as 
"Invalid" or "Won't fix".

The bug report is here http://code.google.com/p/autokey/issues/detail?id=178 
and here http://code.google.com/p/autokey/issues/detail?id=179. I won't repeat 
it again.

I have 2 questions that haven't been answered yet:

- Why is there an error when I use keyboard.press_key ? (See the log below).

- If the Autokey maintainers have included a "press_key" method in the API, 
there must be some way in which it can be used. Could anyone tell me how to 
make it work before closing this issue?

2012-03-01 11:34:16,616 DEBUG - service - Raw key: u'<f12>', modifiers: [], 
Key: <f12>
2012-03-01 11:34:16,616 DEBUG - service - Window visible title: u'vianney : 
autokey-gtk', Window class: 'konsole.Konsole'
2012-03-01 11:34:16,616 INFO - service - Matched hotkey phrase/script with 
prompt=False
2012-03-01 11:34:16,616 DEBUG - service - Script runner executing: Script('a')
2012-03-01 11:34:16,617 DEBUG - service - Ignored locking error in 
handle_keypress
X protocol error:
<class 'Xlib.error.BadValue'>: code = 2, resource_id = 0, sequence_number = 
2800, major_opcode = 142, minor_opcode = 2
X protocol error:
<class 'Xlib.error.BadValue'>: code = 2, resource_id = 0, sequence_number = 
2807, major_opcode = 142, minor_opcode = 2

Regards,

Vianney

Original issue reported on code.google.com by vian...@likwid.fr on 1 Mar 2012 at 10:51

GoogleCodeExporter commented 8 years ago
1. The error is not necessarily related to keyboard.press_key. X errors are 
reported asynchronously so it was most likely caused by another operation prior 
to press_key.

2. press_key works, just not as a way of producing chords of keys and/or mouse 
clicks. Granted, it's use is therefore limited but this is the current 
functionality.

Original comment by cdekter on 4 Mar 2012 at 5:21