tests/test_event_class.py
author Radek Brich <radek.brich@devl.cz>
Sun, 22 Feb 2015 09:53:13 +0100
changeset 119 dd91747504dd
parent 111 b055add74b18
permissions -rwxr-xr-x
Redraw widgets on request. Add scrollbar 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())