X Tutup
The Wayback Machine - https://web.archive.org/web/20210106130911/https://github.com/python-xlib/python-xlib/issues/128
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Handling is don't work #128

Open
TheDeaX-Lab opened this issue Oct 24, 2018 · 2 comments
Open

Event Handling is don't work #128

TheDeaX-Lab opened this issue Oct 24, 2018 · 2 comments

Comments

@TheDeaX-Lab
Copy link

@TheDeaX-Lab TheDeaX-Lab commented Oct 24, 2018

from Xlib import display
from Xlib import X
import time
disp = display.Display()
root = disp.screen().root
root.change_attributes(event_mask=X.KeymapStateMask) 
while 1:
    a = disp.next_event()
    print(a)
    time.sleep(1)

This code is don't catch the event of KeymapNotify

@mstaniszczak
Copy link

@mstaniszczak mstaniszczak commented Feb 25, 2019

In my case it can't catch any event :(

@Szunti
Copy link

@Szunti Szunti commented Jun 20, 2019

I do get KeymapNotify events when I focus the root window. From the man page of XKeymapEvent(3):

generated on EnterWindow and FocusIn when KeymapState selected

It can be hard to move focus to the root window depending on your desktop environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.
X Tutup