Question regarding KeyPress #151
Open
Labels
Comments
|
What you "get" depends on the window (application) receiving the event ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When sending a KeyPress event with below code I would assume the key stays pressed until ... well ... forever. But all I get is a single "a".
`from Xlib import display,protocol,X,XK
import time
display = display.Display()
focus= display.get_input_focus()
window = focus.focus
keysym=XK.string_to_keysym("a")
keycode=display.keysym_to_keycode(keysym)
send_event = protocol.event.KeyPress(
time=int(time.time()),
root=display.screen().root,
window=window,
child=X.NONE,
same_screen=0,
root_x=0, root_y=0, event_x=0, event_y=0,
state=0,
detail=keycode
)
window.send_event(send_event)
display.sync()`
How to achieve a held down button?
The text was updated successfully, but these errors were encountered: