tests/test_event_class.py
author Radek Brich <radek.brich@devl.cz>
Sun, 15 Feb 2015 12:52:46 +0100
changeset 115 b4ff7392003a
parent 111 b055add74b18
permissions -rwxr-xr-x
GridLayout: basic implementation.
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())