-rw-r--r-- | apps/Opie-SH/microkbd.desktop | 20 | ||||
-rwxr-xr-x | noncore/tools/opie-sh/scripts/microkbd.sh | 87 | ||||
-rw-r--r-- | pics/opie-sh-scripts/kbdctrl.png | bin | 0 -> 149 bytes | |||
-rw-r--r-- | pics/opie-sh-scripts/keyz-cfg.png | bin | 0 -> 2761 bytes |
4 files changed, 107 insertions, 0 deletions
diff --git a/apps/Opie-SH/microkbd.desktop b/apps/Opie-SH/microkbd.desktop new file mode 100644 index 0000000..78e20f0 --- a/dev/null +++ b/apps/Opie-SH/microkbd.desktop | |||
@@ -0,0 +1,20 @@ | |||
1 | [Desktop Entry] | ||
2 | Exec=microkbd.sh | ||
3 | Icon=opie-sh-scripts/keyz-cfg | ||
4 | Type=Application | ||
5 | Name=Keyboard Control | ||
6 | Comment=Start/Stop Keyboard | ||
7 | Name[es]=Control MicroKbd | ||
8 | Comment[es]=Activa/desactiva teclado MicroKbd | ||
9 | Name[fr]=Control MicroKbd | ||
10 | Comment[fr]=Gestion du clavier MicroKbd | ||
11 | Name[it]=Controllo MicroKbd | ||
12 | Comment[it]=Attiva/disattiva tastiera MicroKbd | ||
13 | Name[pt]=Teclado MicroKbd | ||
14 | Comment[pt]=Gestor teclado MicroKbd | ||
15 | Name[pt_BR]=Teclado MicroKbd | ||
16 | Comment[pt_BR]=Gerenciador teclado MicroKbd | ||
17 | Name[sl]=MicroKbd kontrole | ||
18 | Comment[sl]=MicroKbd kontrole za tipkovnico | ||
19 | Name[nl]=MicroKbd Controle | ||
20 | Comment[nl]=Activeer MicroKbd toetsenborden | ||
diff --git a/noncore/tools/opie-sh/scripts/microkbd.sh b/noncore/tools/opie-sh/scripts/microkbd.sh new file mode 100755 index 0000000..d602ea5 --- a/dev/null +++ b/noncore/tools/opie-sh/scripts/microkbd.sh | |||
@@ -0,0 +1,87 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | #stowctrl.sh - modified usbnetctrl.sh from gonz by spiralman spiralman@softhome.net | ||
4 | # usbnetctrl.sh - a demonstration of opie-sh | ||
5 | # | ||
6 | # Copyright (C) 2002 gonz@directbox.com | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License as published by | ||
10 | # the Free Software Foundation; either version 2, or (at your option) | ||
11 | # any later version. | ||
12 | # | ||
13 | # This program is distributed in the hope that it will be useful, | ||
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | # GNU General Public License for more details. | ||
17 | # | ||
18 | # 20020524-1 - code beautification, added icons and reset | ||
19 | # 20020517-2 - bugfixed fullscreen, added info about ifconfig | ||
20 | # 20020517-1 - added about, fullscreen and icon | ||
21 | |||
22 | OPIE_SH=$OPIEDIR/bin/opie-sh | ||
23 | |||
24 | ###################################################################### | ||
25 | # subroutines | ||
26 | |||
27 | about() { | ||
28 | ( echo "<img src=opie-sh-scripts/kbdctrl>" | ||
29 | echo "<h3>About</h3>" | ||
30 | echo "This little App should make it easy for you to " | ||
31 | echo "activate / deactivate the micro keyboard (on ipaq)" | ||
32 | echo "<p>" | ||
33 | ) | $OPIE_SH -t "microkbd control" -f & | ||
34 | SCREENCLEAN=$! | ||
35 | sleep 1 | ||
36 | } | ||
37 | |||
38 | startup() { | ||
39 | echo "<img src=opie-sh-scripts/kbdctrl>" > /tmp/sout | ||
40 | echo "<h3>keyboard up</h3>" >> /tmp/sout | ||
41 | telinit 4 | ||
42 | modprobe h3600_microkbd >> /tmp/sout | ||
43 | cat /dev/microkbd/iconcepts & | ||
44 | echo $! > /tmp/kbdcatpid | ||
45 | $OPIE_SH -t Output -f /tmp/sout | ||
46 | rm /tmp/sout | ||
47 | qcop QPE/System 'suspend()' | ||
48 | } | ||
49 | |||
50 | stopit() { | ||
51 | ( echo "<img src=opie-sh-scripts/kbdctrl>" | ||
52 | echo "<h3>keyboard down</h3>" | ||
53 | read THECAT < /tmp/kbdcatpid | ||
54 | kill $THECAT | ||
55 | rmmod h3600_microkbd | ||
56 | telinit 2 | ||
57 | ) 2>&1 | $OPIE_SH -t Output -f | ||
58 | } | ||
59 | |||
60 | |||
61 | cleanup() { | ||
62 | kill $SCREENCLEAN | ||
63 | rm -f /tmp/qcop-msg-microkbd.sh | ||
64 | } | ||
65 | |||
66 | |||
67 | yesorno() { | ||
68 | $OPIE_SH -m -t "MicroKbd Up/Down" -M "What to do with the Micro Keyboard: " \ | ||
69 | -g -0 Up -1 Down -2 Restart | ||
70 | RETURNCODE=$? | ||
71 | |||
72 | case $RETURNCODE in | ||
73 | -1) echo error... | ||
74 | cleanup | ||
75 | exit ;; | ||
76 | 0) startup ;; | ||
77 | 1) stopit ;; | ||
78 | 2) stopit ; sleep 1 ; startup ;; | ||
79 | esac | ||
80 | } | ||
81 | |||
82 | ###################################################################### | ||
83 | # main | ||
84 | |||
85 | about | ||
86 | yesorno | ||
87 | cleanup | ||
diff --git a/pics/opie-sh-scripts/kbdctrl.png b/pics/opie-sh-scripts/kbdctrl.png new file mode 100644 index 0000000..6200ce1 --- a/dev/null +++ b/pics/opie-sh-scripts/kbdctrl.png | |||
Binary files differ | |||
diff --git a/pics/opie-sh-scripts/keyz-cfg.png b/pics/opie-sh-scripts/keyz-cfg.png new file mode 100644 index 0000000..2855f5f --- a/dev/null +++ b/pics/opie-sh-scripts/keyz-cfg.png | |||
Binary files differ | |||