summaryrefslogtreecommitdiff
path: root/testing.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing.py')
-rw-r--r--testing.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/testing.py b/testing.py
deleted file mode 100644
index dd6f3f8..0000000
--- a/testing.py
+++ /dev/null
@@ -1,34 +0,0 @@
-from Xlib.display import Display
-from Xlib import X
-import time
-import signal
-import sys
-
-disp=Display()
-screen=disp.screen()
-root=screen.root
-
-def handle_event(evt):
- print(evt)
-
-def main():
- inkscapes = [
- w for w in screen.root.query_tree().children
- if w.get_wm_class() and w.get_wm_class()[0] == 'inkscape'
- ]
-
- print(inkscapes)
-
- for inkscape in inkscapes:
- inkscape.grab_key(10, X.NONE, True,X.GrabModeAsync, X.GrabModeAsync)
-
- signal.signal(signal.SIGALRM, lambda a,b:sys.exit(1))
- signal.alarm(10)
- # grab_key(62, X.NONE)
- while True:
- evt=root.display.next_event()
- if evt.type in [X.KeyPress, X.KeyRelease]: #ignore X.MappingNotify(=34)
- handle_event(evt)
-
-if __name__ == '__main__':
- main()