tests/test_event_class.py
author Radek Brich <radek.brich@devl.cz>
Sat, 21 Feb 2015 12:01:57 +0100
changeset 118 8c7970520632
parent 111 b055add74b18
permissions -rwxr-xr-x
Add mouse events, event demo.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
111
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     1
#!/usr/bin/env python3
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     2
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     3
import sys
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     4
sys.path.append('..')
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     5
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     6
from tuikit.core.events import KeypressEvent
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     7
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     8
x = KeypressEvent('tab', '\t', set(['shift', 'ctrl']))
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     9
print(repr(x))
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    10
print(x.mod_key())
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    11
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    12
x = KeypressEvent(None, 'c', set(['shift', 'ctrl']))
b055add74b18 Refactor events.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    13
print(x.mod_key())