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 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

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

@Szunti
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants