File: test_input_pad.py

package info (click to toggle)
input-pad 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,172 kB
  • sloc: ansic: 11,118; makefile: 451; python: 206; sh: 103; xml: 8
file content (34 lines) | stat: -rwxr-xr-x 1,052 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/python

from input_pad import InputPadWindow, get_version, get_kbdui_name_list
import os, sys

def button_pressed_cb(window, str, type, keysym, keycode, state, data):
    print "str =", str
    print "type =", type
    print "keysym =", keysym
    print "keycode =", keycode
    print "state =", state
    print "data =", data

print "input-pad version:", get_version()
window = InputPadWindow()
# InputPadWindow() calls setlocale()
print "available kbdui modules:", get_kbdui_name_list()
window.new()
if len(sys.argv) > 1:
    if os.path.isdir(sys.argv[1]):
        print "paddir", sys.argv[1]
        window.set_paddir(sys.argv[1])
    elif os.path.isfile(sys.argv[1]):
        print "padfile", sys.argv[1]
        window.append_padfile(sys.argv[1])
#window.set_kbdui_name("eek-gtk")
window.show()
#window.set_show_table (0)
#window.set_show_layout (0)
window.set_char_button_sensitive(True)
window.connect("button-pressed", button_pressed_cb)
window.reorder_button_pressed()
print "input-pad visible?", window.get_visible()
window.main()