tests/test_event_class.py
author Radek Brich <radek.brich@devl.cz>
Wed, 03 Sep 2014 19:17:04 +0200
changeset 112 ce2e67e7bbb8
parent 111 b055add74b18
permissions -rwxr-xr-x
Refactor cursor.
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())