tests/test_event_class.py
author Radek Brich <radek.brich@devl.cz>
Wed, 03 Sep 2014 21:56:20 +0200
changeset 113 6796adfdc7eb
parent 111 b055add74b18
permissions -rwxr-xr-x
Merge. Due to my schizophrenia, I've accidentally forked my own code. The other set of changes were found in another computer.
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())