summaryrefslogtreecommitdiffstats
path: root/sys-apps/kbd/files/kbd-1.14-ds-unicode.patch
blob: 9a2135288292296d36e1c2886b721c557acd434e (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff -dPNur kbd-1.14.1/src/unicode_start kbd-1.14.1-unicode/src/unicode_start
--- kbd-1.14.1/src/unicode_start	2008-03-24 17:03:56.000000000 +0100
+++ kbd-1.14.1-unicode/src/unicode_start	2008-07-04 23:20:41.000000000 +0200
@@ -3,7 +3,7 @@
 # 0. Check whether we're on a console
 TTY="`/usr/bin/tty`"
 case "$TTY" in
-	/dev/console|/dev/vc*|/dev/tty[0-9]*)
+	/dev/console|/dev/vc*|/dev/tty*|/dev/pts/*)
 		;;
 	*)
 		echo "unicode_start skipped on $TTY" >&2
diff -dPNur kbd-1.14.1/src/unicode_stop kbd-1.14.1-unicode/src/unicode_stop
--- kbd-1.14.1/src/unicode_stop	2008-03-24 17:03:56.000000000 +0100
+++ kbd-1.14.1-unicode/src/unicode_stop	2008-07-04 23:22:18.000000000 +0200
@@ -1,8 +1,13 @@
 #!/bin/sh
 
-TTY="`/usr/bin/tty`"
+if [ -z "$1" ]; then
+    TTY="`/usr/bin/tty`"
+else 
+    TTY=$1
+fi
+
 case "$TTY" in
-	/dev/console|/dev/vc*|/dev/tty[0-9]*)
+	/dev/console|/dev/vc*|/dev/tty*|/dev/pts/*)
 		;;
 	*)
 		echo "unicode_stop skipped on $TTY"
@@ -11,14 +16,23 @@
 esac
 
 # stop unicode
-kbd_mode -a
-if test -t ; then
+if [ -z "$1" ]; then
+    kbd_mode -a
+    if test -t ; then
 	printf '\033%%@'
+    fi
+    stty -iutf8
+else 
+    kbd_mode -a -C $TTY
+    if test -t ; then
+	printf '\033%%@' > $TTY
+    fi
+    stty -F $TTY -iutf8
 fi
-stty -iutf8
 
 uid="`id -u 2>/dev/null`" ||:
 if [ "$uid" = '0' ]; then
 	[ ! -r "$HOME/.kbd/.keymap_sv" ] ||
 		loadkeys "$HOME/.kbd/.keymap_sv"
 fi
+setfont
\ No newline at end of file