This commit is contained in:
commit
045bafa9e2
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
83
README.SuSE
Normal file
83
README.SuSE
Normal file
@ -0,0 +1,83 @@
|
||||
Release info on the kbd utils
|
||||
=============================
|
||||
Fri Feb 27 18:39:59 CET 2004, jw
|
||||
|
||||
SuSE upgraded the kbd utils to 1.12 for the release of SuSE Linux 9.1.
|
||||
|
||||
The choose-tty patch has been accepted upstream. Note that we used -c
|
||||
for selecting the console device, now it is -C
|
||||
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
SuSE upgraded the kbd utils to 1.08 for the release of SuSE Linux 9.0.
|
||||
|
||||
Some of our patches to 1.06 have been integrated.
|
||||
|
||||
Most of the changes from us to 1.03wip (SL 7.1 and 7.0) and 1.05 (SL 7.2,
|
||||
7.3) have been incorporated, so we can finally go with an almost unpatched
|
||||
kbd again.
|
||||
|
||||
Since 1.03a, there is support for fonts that have a width larger than
|
||||
8 pixels. This will only work with framebuffer support on most architectures
|
||||
though. Some fonts with 12x22 size are available as well, check
|
||||
/usr/share/kbd/consolefonts/.
|
||||
You probably want to use higher resolutions with such a large font, like
|
||||
1152x858. If you use fbset don't forget to set -vyres to a large value,
|
||||
otherwise your framebuffer's speed will be lower than it could.
|
||||
|
||||
setfont has been patched to allow specifing the tty with -c where the
|
||||
changes should be applied to. This is used in the setup scripts.
|
||||
|
||||
Your SuSE team <feedback@suse.de>
|
||||
|
||||
New handling of composition of characters
|
||||
=========================================
|
||||
Most of the fonts have much more characters than you can reach directly
|
||||
through the keyboard. To access all of them you may use showconsolefont,
|
||||
deduce the decimal code and enter it by holding down <alt> and entering
|
||||
the code via the keypad. There's a much better way, though:
|
||||
Most characters may be entered via composition. Many characters are just
|
||||
consisting of a standard character with some sort of accent or change.
|
||||
Such characters can be composed by composition. Just press the <compose>
|
||||
key, let it go again, enter the accent and then the letter.
|
||||
Some examples: (Assuming Iso-Latin-1/9 character set:)
|
||||
<compose> " a => ä
|
||||
<compose> , c => ç
|
||||
<compose> | S => $
|
||||
|
||||
Support for composition is unfortunately not contained in most keymaps.
|
||||
Most lack two things:
|
||||
(a) The <compose> key is not mapped
|
||||
(b) The compose tables are not included
|
||||
|
||||
In previous versions of SuSE Linux, some keytables have been hacked to
|
||||
include support for the <compose> key and to include compose tables.
|
||||
This has now been replaced by a more general solution:
|
||||
The kbd setup scripts uses another /etc/sysconfig/keyboard variable to
|
||||
determine which compose tables should be loaded and whether the compose key
|
||||
should be mapped: COMPOSETABLE.
|
||||
For all words listed there, loadkeys will be called with the argument
|
||||
compose.word. (Except for clear which sets a flag to clear the compose
|
||||
table.) Look at the compose.* files in /usr/share/kbd/keymaps/include/:
|
||||
(a) You find there two files for having the <compose> key mapped.
|
||||
(b) You find there compose tables which are suitable for different
|
||||
character sets.
|
||||
|
||||
ad (a): winkeys: The compose key will be mapped on the W*n menu key
|
||||
shiftctrl: The compose key will be mapped to Shift Ctrl.
|
||||
You can use both, if you like.
|
||||
ad (b): latin, latinX, latin1.add, 8859_X: Contains the compose
|
||||
combinations suitable for the respective character set.
|
||||
Many people will want to use latin1 or latin1.add. Just
|
||||
using latin is also sort of an acceptable compromise for
|
||||
many Latin character sets.
|
||||
YOU MAY ONLY USE ONE OF THOSE.
|
||||
If you want the combination of more than one table, you
|
||||
have to create a file which includes what you want.
|
||||
|
||||
Example: (/etc/sysconfig/keyboard)
|
||||
COMPOSETABLE="clear winkeys shiftctrl latin1.add"
|
||||
|
||||
Please keep in mind, that all these settings only affect the console,
|
||||
i.e. text mode.
|
||||
|
||||
Your SuSE team <feedback@suse.de>
|
102
convert-kbd-mac.sed
Normal file
102
convert-kbd-mac.sed
Normal file
@ -0,0 +1,102 @@
|
||||
# vim: syntax=sed
|
||||
s#keycode[[:blank:]]*122[[:blank:]]*=[[:blank:]]*#keycode 59 = #;t 1;
|
||||
s#keycode[[:blank:]]*121[[:blank:]]*=[[:blank:]]*#keycode 109 = #;t 1;
|
||||
s#keycode[[:blank:]]*120[[:blank:]]*=[[:blank:]]*#keycode 60 = #;t 1;
|
||||
s#keycode[[:blank:]]*119[[:blank:]]*=[[:blank:]]*#keycode 107 = #;t 1;
|
||||
s#keycode[[:blank:]]*118[[:blank:]]*=[[:blank:]]*#keycode 62 = #;t 1;
|
||||
s#keycode[[:blank:]]*117[[:blank:]]*=[[:blank:]]*#keycode 111 = #;t 1;
|
||||
s#keycode[[:blank:]]*116[[:blank:]]*=[[:blank:]]*#keycode 104 = #;t 1;
|
||||
s#keycode[[:blank:]]*115[[:blank:]]*=[[:blank:]]*#keycode 102 = #;t 1;
|
||||
s#keycode[[:blank:]]*114[[:blank:]]*=[[:blank:]]*#keycode 110 = #;t 1;
|
||||
s#keycode[[:blank:]]*113[[:blank:]]*=[[:blank:]]*#keycode 101 = #;t 1;
|
||||
s#keycode[[:blank:]]*111[[:blank:]]*=[[:blank:]]*#keycode 88 = #;t 1;
|
||||
s#keycode[[:blank:]]*109[[:blank:]]*=[[:blank:]]*#keycode 68 = #;t 1;
|
||||
s#keycode[[:blank:]]*107[[:blank:]]*=[[:blank:]]*#keycode 70 = #;t 1;
|
||||
s#keycode[[:blank:]]*103[[:blank:]]*=[[:blank:]]*#keycode 87 = #;t 1;
|
||||
s#keycode[[:blank:]]*101[[:blank:]]*=[[:blank:]]*#keycode 67 = #;t 1;
|
||||
s#keycode[[:blank:]]*100[[:blank:]]*=[[:blank:]]*#keycode 66 = #;t 1;
|
||||
s#keycode[[:blank:]]*99[[:blank:]]*=[[:blank:]]*#keycode 61 = #;t 1;
|
||||
s#keycode[[:blank:]]*98[[:blank:]]*=[[:blank:]]*#keycode 65 = #;t 1;
|
||||
s#keycode[[:blank:]]*97[[:blank:]]*=[[:blank:]]*#keycode 64 = #;t 1;
|
||||
s#keycode[[:blank:]]*96[[:blank:]]*=[[:blank:]]*#keycode 63 = #;t 1;
|
||||
s#keycode[[:blank:]]*92[[:blank:]]*=[[:blank:]]*#keycode 73 = #;t 1;
|
||||
s#keycode[[:blank:]]*91[[:blank:]]*=[[:blank:]]*#keycode 72 = #;t 1;
|
||||
s#keycode[[:blank:]]*89[[:blank:]]*=[[:blank:]]*#keycode 71 = #;t 1;
|
||||
s#keycode[[:blank:]]*88[[:blank:]]*=[[:blank:]]*#keycode 77 = #;t 1;
|
||||
s#keycode[[:blank:]]*87[[:blank:]]*=[[:blank:]]*#keycode 76 = #;t 1;
|
||||
s#keycode[[:blank:]]*86[[:blank:]]*=[[:blank:]]*#keycode 75 = #;t 1;
|
||||
s#keycode[[:blank:]]*85[[:blank:]]*=[[:blank:]]*#keycode 81 = #;t 1;
|
||||
s#keycode[[:blank:]]*84[[:blank:]]*=[[:blank:]]*#keycode 80 = #;t 1;
|
||||
s#keycode[[:blank:]]*83[[:blank:]]*=[[:blank:]]*#keycode 79 = #;t 1;
|
||||
s#keycode[[:blank:]]*82[[:blank:]]*=[[:blank:]]*#keycode 82 = #;t 1;
|
||||
s#keycode[[:blank:]]*81[[:blank:]]*=[[:blank:]]*#keycode 117 = #;t 1;
|
||||
s#keycode[[:blank:]]*78[[:blank:]]*=[[:blank:]]*#keycode 74 = #;t 1;
|
||||
s#keycode[[:blank:]]*76[[:blank:]]*=[[:blank:]]*#keycode 96 = #;t 1;
|
||||
s#keycode[[:blank:]]*75[[:blank:]]*=[[:blank:]]*#keycode 98 = #;t 1;
|
||||
s#keycode[[:blank:]]*71[[:blank:]]*=[[:blank:]]*#keycode 69 = #;t 1;
|
||||
s#keycode[[:blank:]]*69[[:blank:]]*=[[:blank:]]*#keycode 78 = #;t 1;
|
||||
s#keycode[[:blank:]]*67[[:blank:]]*=[[:blank:]]*#keycode 55 = #;t 1;
|
||||
s#keycode[[:blank:]]*65[[:blank:]]*=[[:blank:]]*#keycode 83 = #;t 1;
|
||||
s#keycode[[:blank:]]*62[[:blank:]]*=[[:blank:]]*#keycode 103 = #;t 1;
|
||||
s#keycode[[:blank:]]*61[[:blank:]]*=[[:blank:]]*#keycode 108 = #;t 1;
|
||||
s#keycode[[:blank:]]*60[[:blank:]]*=[[:blank:]]*#keycode 106 = #;t 1;
|
||||
s#keycode[[:blank:]]*59[[:blank:]]*=[[:blank:]]*#keycode 105 = #;t 1;
|
||||
s#keycode[[:blank:]]*58[[:blank:]]*=[[:blank:]]*#keycode 56 = #;t 1;
|
||||
s#keycode[[:blank:]]*57[[:blank:]]*=[[:blank:]]*#keycode 58 = #;t 1;
|
||||
s#keycode[[:blank:]]*56[[:blank:]]*=[[:blank:]]*#keycode 42 = #;t 1;
|
||||
s#keycode[[:blank:]]*55[[:blank:]]*=[[:blank:]]*#keycode 125 = #;t 1;
|
||||
s#keycode[[:blank:]]*54[[:blank:]]*=[[:blank:]]*#keycode 29 = #;t 1;
|
||||
s#keycode[[:blank:]]*53[[:blank:]]*=[[:blank:]]*#keycode 1 = #;t 1;
|
||||
s#keycode[[:blank:]]*51[[:blank:]]*=[[:blank:]]*#keycode 14 = #;t 1;
|
||||
s#keycode[[:blank:]]*50[[:blank:]]*=[[:blank:]]*#keycode 41 = #;t 1;
|
||||
s#keycode[[:blank:]]*49[[:blank:]]*=[[:blank:]]*#keycode 57 = #;t 1;
|
||||
s#keycode[[:blank:]]*48[[:blank:]]*=[[:blank:]]*#keycode 15 = #;t 1;
|
||||
s#keycode[[:blank:]]*47[[:blank:]]*=[[:blank:]]*#keycode 52 = #;t 1;
|
||||
s#keycode[[:blank:]]*46[[:blank:]]*=[[:blank:]]*#keycode 50 = #;t 1;
|
||||
s#keycode[[:blank:]]*45[[:blank:]]*=[[:blank:]]*#keycode 49 = #;t 1;
|
||||
s#keycode[[:blank:]]*44[[:blank:]]*=[[:blank:]]*#keycode 53 = #;t 1;
|
||||
s#keycode[[:blank:]]*43[[:blank:]]*=[[:blank:]]*#keycode 51 = #;t 1;
|
||||
s#keycode[[:blank:]]*42[[:blank:]]*=[[:blank:]]*#keycode 43 = #;t 1;
|
||||
s#keycode[[:blank:]]*41[[:blank:]]*=[[:blank:]]*#keycode 39 = #;t 1;
|
||||
s#keycode[[:blank:]]*40[[:blank:]]*=[[:blank:]]*#keycode 37 = #;t 1;
|
||||
s#keycode[[:blank:]]*39[[:blank:]]*=[[:blank:]]*#keycode 40 = #;t 1;
|
||||
s#keycode[[:blank:]]*38[[:blank:]]*=[[:blank:]]*#keycode 36 = #;t 1;
|
||||
s#keycode[[:blank:]]*37[[:blank:]]*=[[:blank:]]*#keycode 38 = #;t 1;
|
||||
s#keycode[[:blank:]]*36[[:blank:]]*=[[:blank:]]*#keycode 28 = #;t 1;
|
||||
s#keycode[[:blank:]]*35[[:blank:]]*=[[:blank:]]*#keycode 25 = #;t 1;
|
||||
s#keycode[[:blank:]]*34[[:blank:]]*=[[:blank:]]*#keycode 23 = #;t 1;
|
||||
s#keycode[[:blank:]]*33[[:blank:]]*=[[:blank:]]*#keycode 26 = #;t 1;
|
||||
s#keycode[[:blank:]]*32[[:blank:]]*=[[:blank:]]*#keycode 22 = #;t 1;
|
||||
s#keycode[[:blank:]]*31[[:blank:]]*=[[:blank:]]*#keycode 24 = #;t 1;
|
||||
s#keycode[[:blank:]]*30[[:blank:]]*=[[:blank:]]*#keycode 27 = #;t 1;
|
||||
s#keycode[[:blank:]]*29[[:blank:]]*=[[:blank:]]*#keycode 11 = #;t 1;
|
||||
s#keycode[[:blank:]]*28[[:blank:]]*=[[:blank:]]*#keycode 9 = #;t 1;
|
||||
s#keycode[[:blank:]]*27[[:blank:]]*=[[:blank:]]*#keycode 12 = #;t 1;
|
||||
s#keycode[[:blank:]]*26[[:blank:]]*=[[:blank:]]*#keycode 8 = #;t 1;
|
||||
s#keycode[[:blank:]]*25[[:blank:]]*=[[:blank:]]*#keycode 10 = #;t 1;
|
||||
s#keycode[[:blank:]]*24[[:blank:]]*=[[:blank:]]*#keycode 13 = #;t 1;
|
||||
s#keycode[[:blank:]]*23[[:blank:]]*=[[:blank:]]*#keycode 6 = #;t 1;
|
||||
s#keycode[[:blank:]]*22[[:blank:]]*=[[:blank:]]*#keycode 7 = #;t 1;
|
||||
s#keycode[[:blank:]]*21[[:blank:]]*=[[:blank:]]*#keycode 5 = #;t 1;
|
||||
s#keycode[[:blank:]]*20[[:blank:]]*=[[:blank:]]*#keycode 4 = #;t 1;
|
||||
s#keycode[[:blank:]]*19[[:blank:]]*=[[:blank:]]*#keycode 3 = #;t 1;
|
||||
s#keycode[[:blank:]]*18[[:blank:]]*=[[:blank:]]*#keycode 2 = #;t 1;
|
||||
s#keycode[[:blank:]]*17[[:blank:]]*=[[:blank:]]*#keycode 20 = #;t 1;
|
||||
s#keycode[[:blank:]]*16[[:blank:]]*=[[:blank:]]*#keycode 21 = #;t 1;
|
||||
s#keycode[[:blank:]]*15[[:blank:]]*=[[:blank:]]*#keycode 19 = #;t 1;
|
||||
s#keycode[[:blank:]]*14[[:blank:]]*=[[:blank:]]*#keycode 18 = #;t 1;
|
||||
s#keycode[[:blank:]]*13[[:blank:]]*=[[:blank:]]*#keycode 17 = #;t 1;
|
||||
s#keycode[[:blank:]]*12[[:blank:]]*=[[:blank:]]*#keycode 16 = #;t 1;
|
||||
s#keycode[[:blank:]]*11[[:blank:]]*=[[:blank:]]*#keycode 48 = #;t 1;
|
||||
s#keycode[[:blank:]]*10[[:blank:]]*=[[:blank:]]*#keycode 86 = #;t 1;
|
||||
s#keycode[[:blank:]]*9[[:blank:]]*=[[:blank:]]*#keycode 47 = #;t 1;
|
||||
s#keycode[[:blank:]]*8[[:blank:]]*=[[:blank:]]*#keycode 46 = #;t 1;
|
||||
s#keycode[[:blank:]]*7[[:blank:]]*=[[:blank:]]*#keycode 45 = #;t 1;
|
||||
s#keycode[[:blank:]]*6[[:blank:]]*=[[:blank:]]*#keycode 44 = #;t 1;
|
||||
s#keycode[[:blank:]]*5[[:blank:]]*=[[:blank:]]*#keycode 34 = #;t 1;
|
||||
s#keycode[[:blank:]]*4[[:blank:]]*=[[:blank:]]*#keycode 35 = #;t 1;
|
||||
s#keycode[[:blank:]]*3[[:blank:]]*=[[:blank:]]*#keycode 33 = #;t 1;
|
||||
s#keycode[[:blank:]]*2[[:blank:]]*=[[:blank:]]*#keycode 32 = #;t 1;
|
||||
s#keycode[[:blank:]]*1[[:blank:]]*=[[:blank:]]*#keycode 31 = #;t 1;
|
||||
s#keycode[[:blank:]]*0[[:blank:]]*=[[:blank:]]*#keycode 30 = #;t 1;
|
||||
:1;
|
37
earlykbd.init
Normal file
37
earlykbd.init
Normal file
@ -0,0 +1,37 @@
|
||||
#! /bin/sh
|
||||
# Copyright (c) 1995-2005 SUSE LINUX Products AG, Nuernberg, Germany.
|
||||
#
|
||||
# Author: Werner Fink <werner@suse.de>
|
||||
#
|
||||
# Please send feedback to http://www.suse.de/feedback
|
||||
#
|
||||
# /etc/init.d/earlykbd
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: earlykbd
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# X-SuSE-Should-Start: fbset setserial
|
||||
# X-SuSE-Should-Stop:
|
||||
# Default-Start: 5
|
||||
# Default-Stop:
|
||||
# Description: Keyboard settings (don't disable!)
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/rc.status
|
||||
|
||||
function check ()
|
||||
{
|
||||
# kbd can initialize if at least one of
|
||||
# defkeymap or /usr/share is available.
|
||||
|
||||
test -s /etc/defkeymap.map && return 0
|
||||
test -d /usr/share/ && return 0
|
||||
return 1;
|
||||
}
|
||||
|
||||
rc_reset
|
||||
check || exit 0
|
||||
|
||||
exec /etc/init.d/kbd ${1+"$@"}
|
||||
|
1048
kbd-1.12-Meta-Tab.diff
Normal file
1048
kbd-1.12-Meta-Tab.diff
Normal file
File diff suppressed because it is too large
Load Diff
208
kbd-1.12-be-nice-to-kdm.diff
Normal file
208
kbd-1.12-be-nice-to-kdm.diff
Normal file
@ -0,0 +1,208 @@
|
||||
--- kbd-1.12/src/setfont.c.orig 2005-03-03 19:17:42.000000000 +0000
|
||||
+++ kbd-1.12/src/setfont.c 2005-03-04 15:19:13.000000000 +0000
|
||||
@@ -189,6 +189,20 @@
|
||||
|
||||
fd = getfd(console);
|
||||
|
||||
+ int kd_mode = -1;
|
||||
+ if (!ioctl(fd, KDGETMODE, &kd_mode) && (kd_mode == KD_GRAPHICS))
|
||||
+ {
|
||||
+ /*
|
||||
+ * PIO_FONT will fail on a console which is in foreground and in KD_GRAPHICS mode.
|
||||
+ * 2005-03-03, jw@suse.de.
|
||||
+ */
|
||||
+ if (verbose)
|
||||
+ printf("setfont: graphics console %s skipped\n", console?console:"");
|
||||
+ close(fd);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
if (!ifilct && !mfil && !ufil &&
|
||||
!Ofil && !ofil && !omfil && !oufil && !restore)
|
||||
/* reset to some default */
|
||||
--- kbd-1.12/src/kdfontop.c.orig 2005-03-03 19:14:27.000000000 +0000
|
||||
+++ kbd-1.12/src/kdfontop.c 2005-03-03 19:42:28.000000000 +0000
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h> /* free() */
|
||||
+#include <unistd.h> /* usleep() */
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/kd.h>
|
||||
#include "kdfontop.h"
|
||||
@@ -275,7 +276,19 @@
|
||||
|
||||
/* Third attempt: PIO_FONT */
|
||||
/* This will load precisely 256 chars, independent of count */
|
||||
- i = ioctl(fd, PIO_FONT, buf);
|
||||
+ int loop = 0;
|
||||
+
|
||||
+ /* we allow ourselves to hang here for ca 5 seconds, xdm may be playing tricks on us. */
|
||||
+ while ((loop++ < 20) && (i = ioctl(fd, PIO_FONT, buf)))
|
||||
+ {
|
||||
+ if (loop <= 1)
|
||||
+ fprintf(stderr, "putfont: PIO_FONT trying ...\n");
|
||||
+ else
|
||||
+ fprintf(stderr, ".");
|
||||
+ usleep(250000);
|
||||
+ }
|
||||
+ fprintf(stderr, "\n");
|
||||
+
|
||||
if (i) {
|
||||
fprintf(stderr, "%s: putfont: %d,%dx%d: failed: %d\n", progname, count, width, height, i);
|
||||
perror("putfont: PIO_FONT");
|
||||
--- kbd-1.12/man/man1/loadkeys.1.in.orig 2005-03-04 19:10:30.000000000 +0000
|
||||
+++ kbd-1.12/man/man1/loadkeys.1.in 2005-03-04 19:11:13.000000000 +0000
|
||||
@@ -7,6 +7,10 @@
|
||||
[
|
||||
.I -c --clearcompose
|
||||
] [
|
||||
+.I -C '<cons1 cons2 ...>'
|
||||
+|
|
||||
+.I --console=cons1,cons2,...
|
||||
+] [
|
||||
.I -d --default
|
||||
] [
|
||||
.I -h --help
|
||||
@@ -28,6 +32,11 @@
|
||||
reads the file or files specified by
|
||||
.IR filename... .
|
||||
Its main purpose is to load the kernel keymap for the console.
|
||||
+The affected console device or devices can be specified using the
|
||||
+.I -C
|
||||
+(or
|
||||
+.I --console
|
||||
+) option. This option supports a list of device names
|
||||
.SH "RESET TO DEFAULT"
|
||||
If the
|
||||
.I -d
|
||||
--- kbd-1.12/src/loadkeys.y.orig 2005-03-08 17:55:08.000000000 +0000
|
||||
+++ kbd-1.12/src/loadkeys.y 2005-03-08 17:10:06.000000000 +0000
|
||||
@@ -62,7 +62,7 @@
|
||||
static void compose(int diacr, int base, int res);
|
||||
static void do_constant(void);
|
||||
static void do_constant_key (int, u_short);
|
||||
-static void loadkeys(void);
|
||||
+static void loadkeys(char *console, int *warned);
|
||||
static void mktable(void);
|
||||
static void strings_as_usual(void);
|
||||
static void keypad_as_usual(char *keyboard);
|
||||
@@ -250,6 +250,8 @@
|
||||
"valid options are:\n"
|
||||
"\n"
|
||||
" -c --clearcompose clear kernel compose table\n"
|
||||
+" -C <cons1,cons2,...>\n"
|
||||
+" --console=<...> Indicate console device(s) to be used.\n"
|
||||
" -d --default load \"" DEFMAP "\"\n"
|
||||
" -h --help display this help text\n"
|
||||
" -m --mktable output a \"defkeymap.c\" to stdout\n"
|
||||
@@ -269,9 +271,10 @@
|
||||
|
||||
int
|
||||
main(unsigned int argc, char *argv[]) {
|
||||
- const char *short_opts = "cdhmsuqvV";
|
||||
+ const char *short_opts = "cC:dhmsuqvV";
|
||||
const struct option long_opts[] = {
|
||||
{ "clearcompose", no_argument, NULL, 'c' },
|
||||
+ { "console", 1, NULL, 'C' },
|
||||
{ "default", no_argument, NULL, 'd' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ "mktable", no_argument, NULL, 'm' },
|
||||
@@ -283,6 +286,8 @@
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
int c;
|
||||
+ char *console = NULL;
|
||||
+ int warned = 0;
|
||||
|
||||
set_progname(argv[0]);
|
||||
|
||||
@@ -292,6 +297,9 @@
|
||||
case 'c':
|
||||
nocompose = 1;
|
||||
break;
|
||||
+ case 'C':
|
||||
+ console = optarg;
|
||||
+ break;
|
||||
case 'd':
|
||||
optd = 1;
|
||||
break;
|
||||
@@ -330,8 +338,26 @@
|
||||
do_constant();
|
||||
if(optm)
|
||||
mktable();
|
||||
+ else if (console)
|
||||
+ {
|
||||
+ char *buf = strdup(console); /* make writable */
|
||||
+ char *e, *s = buf;
|
||||
+ while (*s)
|
||||
+ {
|
||||
+ while ( *s == ' ' || *s == '\t' || *s == ',') s++;
|
||||
+ e = s;
|
||||
+ while (*e && *e != ' ' && *e != '\t' && *e != ',') e++;
|
||||
+ char c = *e;
|
||||
+ *e = '\0';
|
||||
+ if (verbose) printf("%s\n", s);
|
||||
+ loadkeys(s, &warned);
|
||||
+ *e = c;
|
||||
+ s = e;
|
||||
+ }
|
||||
+ free(buf);
|
||||
+ }
|
||||
else
|
||||
- loadkeys();
|
||||
+ loadkeys(NULL, &warned);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -760,7 +786,7 @@
|
||||
}
|
||||
|
||||
static int
|
||||
-defkeys(int fd) {
|
||||
+defkeys(int fd, char *cons, int *warned) {
|
||||
struct kbentry ke;
|
||||
int ct = 0;
|
||||
int i,j,fail;
|
||||
@@ -845,9 +871,21 @@
|
||||
fprintf(stderr, _("%s: failed to restore keyboard mode\n"),
|
||||
progname);
|
||||
}
|
||||
- fprintf(stderr, _("%s: warning: this map uses Unicode symbols\n"
|
||||
- " (perhaps you want to do `kbd_mode -u'?)\n"),
|
||||
- progname);
|
||||
+
|
||||
+ if (!warned++)
|
||||
+ {
|
||||
+ int kd_mode = -1;
|
||||
+ if (ioctl(fd, KDGETMODE, &kd_mode) || (kd_mode != KD_GRAPHICS))
|
||||
+ {
|
||||
+ /*
|
||||
+ * It is okay for the graphics console to have a non-unicode mode.
|
||||
+ * only talk about other consoles
|
||||
+ */
|
||||
+ fprintf(stderr, _("%s: warning: this map uses Unicode symbols, %s mode=%d\n"
|
||||
+ " (perhaps you want to do `kbd_mode -u'?)\n"),
|
||||
+ progname, cons ? cons : "NULL", kd_mode);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
return ct;
|
||||
}
|
||||
@@ -981,12 +1019,12 @@
|
||||
}
|
||||
|
||||
static void
|
||||
-loadkeys (void) {
|
||||
+loadkeys (char *console, int *warned) {
|
||||
int fd;
|
||||
int keyct, funcct, diacct;
|
||||
|
||||
- fd = getfd(NULL);
|
||||
- keyct = defkeys(fd);
|
||||
+ fd = getfd(console);
|
||||
+ keyct = defkeys(fd, console, &warned);
|
||||
funcct = deffuncs(fd);
|
||||
if (accent_table_size > 0 || nocompose)
|
||||
diacct = defdiacs(fd);
|
21
kbd-1.12-cz-us-qwertz.diff
Normal file
21
kbd-1.12-cz-us-qwertz.diff
Normal file
@ -0,0 +1,21 @@
|
||||
diff -Nur kbd-1.12-12/data/keymaps/i386/qwertz/cz-us-qwertz.map kbd-1.12-13/data/keymaps/i386/qwertz/cz-us-qwertz.map
|
||||
--- kbd-1.12-12/data/keymaps/i386/qwertz/cz-us-qwertz.map 2004-02-27 17:19:23.000000000 +0100
|
||||
+++ kbd-1.12-13/data/keymaps/i386/qwertz/cz-us-qwertz.map 2004-02-27 17:23:00.000000000 +0100
|
||||
@@ -35,7 +35,7 @@
|
||||
keycode 18 = e
|
||||
keycode 19 = r
|
||||
keycode 20 = t
|
||||
-keycode 21 = z
|
||||
+keycode 21 = z Z y Y
|
||||
keycode 22 = u
|
||||
keycode 23 = i
|
||||
keycode 24 = o
|
||||
@@ -61,7 +61,7 @@
|
||||
keycode 41 = grave semicolon grave asciitilde nul VoidSymbol nul VoidSymbol Meta_grave VoidSymbol Meta_grave VoidSymbol
|
||||
keycode 42 = Shift
|
||||
keycode 43 = backslash bar backslash bar Control_backslash VoidSymbol Control_backslash VoidSymbol Meta_backslash VoidSymbol Meta_backslash VoidSymbol
|
||||
-keycode 44 = y
|
||||
+keycode 44 = y Y z Z
|
||||
keycode 45 = x
|
||||
keycode 46 = c
|
||||
keycode 47 = v
|
33
kbd-1.12-docu-X11R6-xorg.diff
Normal file
33
kbd-1.12-docu-X11R6-xorg.diff
Normal file
@ -0,0 +1,33 @@
|
||||
--- kbd-1.12/doc/kbd.FAQ-15.html.orig 2003-09-24 23:01:40.000000000 +0200
|
||||
+++ kbd-1.12/doc/kbd.FAQ-15.html 2006-08-11 12:10:06.000000000 +0200
|
||||
@@ -188,7 +188,7 @@
|
||||
<P>XFree86 also supports Slow Keys, Repeat Keys, Bounce Keys and an
|
||||
audible bell. <CODE>xkbcomp</CODE> can be used to generate a <CODE>.xkm</CODE> file
|
||||
to enable these. The appropriate <CODE>xkbcomp</CODE> commands are listed in
|
||||
-<CODE>/usr/X11R6/lib/X11/xkb/compat/accessx</CODE>.
|
||||
+<CODE>/usr/{X11R6/lib,share}/X11/xkb/compat/accessx</CODE>.
|
||||
Unfortunately, the exact process is still undocumented.
|
||||
<P>
|
||||
<HR>
|
||||
--- kbd-1.12/doc/kbd.FAQ.txt.orig 1999-10-08 22:46:24.000000000 +0200
|
||||
+++ kbd-1.12/doc/kbd.FAQ.txt 2006-08-11 12:10:16.000000000 +0200
|
||||
@@ -1253,7 +1253,7 @@
|
||||
1. The Linux keyboard driver mechanism, used in conjunction with
|
||||
loadkeys.
|
||||
2. The X mechanism - see X386keybd(1), later XFree86kbd(1). Under
|
||||
- X11R6: edit /usr/X11R6/lib/X11/locale/iso8859-1/Compose.
|
||||
+ X11R6: edit /usr/{X11R6/lib,/usr/share}/X11/locale/iso8859-1/Compose.
|
||||
|
||||
See also Andrew D. Balsa's comments at
|
||||
http://wauug.erols.com/~balsa/linux/deadkeys/index.html.
|
||||
--- kbd-1.12/doc/kbd.FAQ-8.html.orig 2003-09-24 23:01:40.000000000 +0200
|
||||
+++ kbd-1.12/doc/kbd.FAQ-8.html 2006-08-11 12:09:53.000000000 +0200
|
||||
@@ -154,7 +154,7 @@
|
||||
<OL>
|
||||
<LI>The Linux keyboard driver mechanism, used in conjunction with loadkeys.</LI>
|
||||
<LI>The X mechanism - see X386keybd(1), later XFree86kbd(1).
|
||||
-Under X11R6: edit <CODE>/usr/X11R6/lib/X11/locale/iso8859-1/Compose</CODE>.<P>See also Andrew D. Balsa's comments at
|
||||
+Under X11R6: edit <CODE>/usr/{X11R6/lib,share}/X11/locale/iso8859-1/Compose</CODE>.<P>See also Andrew D. Balsa's comments at
|
||||
<A HREF="http://wauug.erols.com/~balsa/linux/deadkeys/index.html">http://wauug.erols.com/~balsa/linux/deadkeys/index.html</A>.
|
||||
</LI>
|
||||
<LI>The emacs mechanism obtained by loading "iso-insert.el" or
|
34
kbd-1.12-dumpkeys-full.diff
Normal file
34
kbd-1.12-dumpkeys-full.diff
Normal file
@ -0,0 +1,34 @@
|
||||
diff -Nur kbd-1.12-7/src/dumpkeys.c kbd-1.12-8/src/dumpkeys.c
|
||||
--- kbd-1.12-7/src/dumpkeys.c 2004-02-26 22:56:09.000000000 +0100
|
||||
+++ kbd-1.12-8/src/dumpkeys.c 2004-02-26 23:00:23.000000000 +0100
|
||||
@@ -126,6 +126,7 @@
|
||||
int t;
|
||||
int v;
|
||||
const char *p;
|
||||
+ int plus;
|
||||
|
||||
printf(" ");
|
||||
t = KTYP(code);
|
||||
@@ -138,18 +139,20 @@
|
||||
printf("U+%04x ", code);
|
||||
return;
|
||||
}
|
||||
+ plus = 0;
|
||||
if (t == KT_LETTER) {
|
||||
t = KT_LATIN;
|
||||
printf("+");
|
||||
+ plus++;
|
||||
}
|
||||
if (!numeric && t < syms_size && v < syms[t].size &&
|
||||
(p = syms[t].table[v])[0])
|
||||
- printf("%-16s", p);
|
||||
+ printf("%-*s", 16 - plus, p);
|
||||
else if (!numeric && t == KT_META && v < 128 && v < syms[0].size &&
|
||||
(p = syms[0].table[v])[0])
|
||||
printf("Meta_%-11s", p);
|
||||
else
|
||||
- printf("0x%04x ", code);
|
||||
+ printf("0x%04x %s", code, plus ? "" : " ");
|
||||
}
|
||||
|
||||
static char
|
52
kbd-1.12-dumpkeys-ppc.diff
Normal file
52
kbd-1.12-dumpkeys-ppc.diff
Normal file
@ -0,0 +1,52 @@
|
||||
diff -Nur kbd-1.12-8/src/dumpkeys.c kbd-1.12-9/src/dumpkeys.c
|
||||
--- kbd-1.12-8/src/dumpkeys.c 2004-02-26 23:00:23.000000000 +0100
|
||||
+++ kbd-1.12-9/src/dumpkeys.c 2004-02-26 23:07:51.000000000 +0100
|
||||
@@ -163,6 +163,10 @@
|
||||
ke.kb_index = 0;
|
||||
ke.kb_table = 0;
|
||||
ke.kb_value = K(t, 0);
|
||||
+#if defined(__mc68000__) || defined(__powerpc__)
|
||||
+ /* Keycode 0 is a valid keycode, do not clobber it. */
|
||||
+ ioctl(fd, KDGKBENT, (unsigned long)&ke);
|
||||
+#endif
|
||||
status = (ioctl(fd, KDSKBENT, (unsigned long)&ke) == 0);
|
||||
return status;
|
||||
}
|
||||
@@ -245,8 +249,13 @@
|
||||
show_short_info(void) {
|
||||
int i;
|
||||
|
||||
+#if !defined(__mc68000__) && !defined(__powerpc__)
|
||||
printf(_("keycode range supported by kernel: 1 - %d\n"),
|
||||
nr_keys - 1);
|
||||
+#else
|
||||
+ printf(_("keycode range supported by kernel: 0 - %d\n"),
|
||||
+ NR_KEYS - 1);
|
||||
+#endif
|
||||
printf(_("max number of actions bindable to a key: %d\n"),
|
||||
MAX_NR_KEYMAPS);
|
||||
get_keymaps();
|
||||
@@ -358,7 +367,11 @@
|
||||
for (j = 0; j < MAX_NR_KEYMAPS; j++) {
|
||||
int ja = (j | M_ALT);
|
||||
if (j != ja && keymap_index[j] >= 0 && keymap_index[ja] >= 0)
|
||||
+#if !defined(__mc68000__) && !defined(__powerpc__)
|
||||
for (i = 1; i < nr_keys; i++) {
|
||||
+#else
|
||||
+ for (i = 0; i < nr_keys; i++) {
|
||||
+#endif
|
||||
int buf0, buf1, type;
|
||||
|
||||
buf0 = get_bind(i, j);
|
||||
@@ -384,7 +397,11 @@
|
||||
not_alt_is_meta:
|
||||
|
||||
no_shorthands:
|
||||
+#if !defined(__mc68000__) && !defined(__powerpc__)
|
||||
for (i = 1; i < nr_keys; i++) {
|
||||
+#else
|
||||
+ for (i = 0; i < nr_keys; i++) {
|
||||
+#endif
|
||||
for (j = 0; j < keymapnr; j++)
|
||||
buf[j] = get_bind(i, good_keymap[j]);
|
||||
|
39
kbd-1.12-handle-small-table.diff
Normal file
39
kbd-1.12-handle-small-table.diff
Normal file
@ -0,0 +1,39 @@
|
||||
diff -Nur kbd-1.12-10/src/dumpkeys.c kbd-1.12-11/src/dumpkeys.c
|
||||
--- kbd-1.12-10/src/dumpkeys.c 2004-02-26 23:10:19.000000000 +0100
|
||||
+++ kbd-1.12-11/src/dumpkeys.c 2004-02-27 17:18:15.000000000 +0100
|
||||
@@ -113,10 +113,13 @@
|
||||
ke.kb_index = index;
|
||||
ke.kb_table = table;
|
||||
if (ioctl(fd, KDGKBENT, (unsigned long)&ke)) {
|
||||
- perror("KDGKBENT");
|
||||
- fprintf(stderr, _("KDGKBENT error at index %d in table %d\n"),
|
||||
- index, table);
|
||||
- exit(1);
|
||||
+ if (index < 128) {
|
||||
+ perror("KDGKBENT");
|
||||
+ fprintf(stderr, _("KDGKBENT error at index %d in table %d\n"),
|
||||
+ index, table);
|
||||
+ exit(1);
|
||||
+ } else
|
||||
+ return -1;
|
||||
}
|
||||
return ke.kb_value;
|
||||
}
|
||||
@@ -375,6 +378,8 @@
|
||||
int buf0, buf1, type;
|
||||
|
||||
buf0 = get_bind(i, j);
|
||||
+ if (buf0 == -1)
|
||||
+ break;
|
||||
type = KTYP(buf0);
|
||||
if ((type == KT_LATIN || type == KT_LETTER)
|
||||
&& KVAL(buf0) < 128) {
|
||||
@@ -404,6 +409,8 @@
|
||||
#endif
|
||||
for (j = 0; j < keymapnr; j++)
|
||||
buf[j] = get_bind(i, good_keymap[j]);
|
||||
+ if (buf[0] == -1)
|
||||
+ break;
|
||||
|
||||
if (table_shape == FULL_TABLE) {
|
||||
printf("keycode %3d =", i);
|
146
kbd-1.12-happy-abuild.diff
Normal file
146
kbd-1.12-happy-abuild.diff
Normal file
@ -0,0 +1,146 @@
|
||||
--- kbd-1.12/src/psffontop.c.orig 2005-07-07 15:00:50.547440043 +0200
|
||||
+++ kbd-1.12/src/psffontop.c 2005-07-07 15:02:49.642520578 +0200
|
||||
@@ -465,7 +465,7 @@
|
||||
writepsffontheader(ofil, width, height, fontlen, &psftype, flags);
|
||||
utf8 = (psftype == 2);
|
||||
|
||||
- fwrite(fontbuf, charsize, fontlen, ofil);
|
||||
+ (void)fwrite(fontbuf, charsize, fontlen, ofil);
|
||||
/* unimaps: -1 => do nothing: caller will append map */
|
||||
if (uclistheads != NULL && uclistheads != (struct unicode_list*)-1) {
|
||||
struct unicode_list *ul;
|
||||
--- kbd-1.12/src/loadkeys.y.orig 2005-07-07 15:00:50.891379623 +0200
|
||||
+++ kbd-1.12/src/loadkeys.y 2005-07-07 15:02:19.174871991 +0200
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/kd.h>
|
||||
#include <linux/keyboard.h>
|
||||
+#include <unistd.h> /* readlink */
|
||||
#include "paths.h"
|
||||
#include "getfd.h"
|
||||
#include "findfile.h"
|
||||
@@ -65,9 +66,9 @@
|
||||
static void loadkeys(char *console, int *warned);
|
||||
static void mktable(void);
|
||||
static void strings_as_usual(void);
|
||||
-static void keypad_as_usual(char *keyboard);
|
||||
-static void function_keys_as_usual(char *keyboard);
|
||||
-static void consoles_as_usual(char *keyboard);
|
||||
+/* static void keypad_as_usual(char *keyboard); */
|
||||
+/* static void function_keys_as_usual(char *keyboard); */
|
||||
+/* static void consoles_as_usual(char *keyboard); */
|
||||
static void compose_as_usual(char *charset);
|
||||
static void lkfatal0(const char *, int);
|
||||
extern int set_charset(const char *charset);
|
||||
@@ -559,7 +560,6 @@
|
||||
|
||||
void
|
||||
open_include(char *s) {
|
||||
- char *t, *te;
|
||||
|
||||
if (verbose)
|
||||
/* start reading include file */
|
||||
@@ -713,7 +713,6 @@
|
||||
int alttable = table | M_ALT;
|
||||
int type = KTYP(keycode);
|
||||
int val = KVAL(keycode);
|
||||
- char *p;
|
||||
if (alttable != table && defining[alttable] &&
|
||||
(!keymap_was_set[alttable] ||
|
||||
!(keymap_was_set[alttable])[index]) &&
|
||||
@@ -1021,7 +1020,7 @@
|
||||
static void
|
||||
loadkeys (char *console, int *warned) {
|
||||
int fd;
|
||||
- int keyct, funcct, diacct;
|
||||
+ int keyct, funcct, diacct = 0;
|
||||
|
||||
fd = getfd(console);
|
||||
keyct = defkeys(fd, console, &warned);
|
||||
@@ -1156,7 +1155,6 @@
|
||||
mktable () {
|
||||
int i, imax, j;
|
||||
|
||||
- struct kbsentry kbs;
|
||||
u_char *p;
|
||||
int maxfunc;
|
||||
unsigned int keymap_count = 0;
|
||||
--- kbd-1.12/src/mapscrn.c.orig 2005-07-07 15:00:50.869383487 +0200
|
||||
+++ kbd-1.12/src/mapscrn.c 2005-07-07 15:02:19.190869181 +0200
|
||||
@@ -126,7 +126,7 @@
|
||||
FILE *fp;
|
||||
struct stat stbuf;
|
||||
int u = 0;
|
||||
- int lineno;
|
||||
+ int lineno = 0;
|
||||
|
||||
if ((fp = findfile(mfil, mapdirpath, mapsuffixes)) == NULL) {
|
||||
fprintf(stderr, _("mapscrn: cannot open map file _%s_\n"),
|
||||
@@ -215,18 +215,18 @@
|
||||
|
||||
if ((strncmp(s,"0x",2) == 0) &&
|
||||
(strspn(s+2,"0123456789abcdefABCDEF") == strlen(s+2)))
|
||||
- sscanf(s+2,"%x",&i);
|
||||
+ (void)sscanf(s+2,"%x",&i);
|
||||
|
||||
else if ((*s == '0') &&
|
||||
(strspn(s,"01234567") == strlen(s)))
|
||||
- sscanf(s,"%o",&i);
|
||||
+ (void)sscanf(s,"%o",&i);
|
||||
|
||||
else if (strspn(s,"0123456789") == strlen(s))
|
||||
- sscanf(s,"%d",&i);
|
||||
+ (void)sscanf(s,"%d",&i);
|
||||
|
||||
else if ((strncmp(s,"U+",2) == 0) && strlen(s) == 6 &&
|
||||
(strspn(s+2,"0123456789abcdefABCDEF") == 4))
|
||||
- sscanf(s+2,"%x",&i);
|
||||
+ (void)sscanf(s+2,"%x",&i);
|
||||
|
||||
else if ((strlen(s) == 3) && (s[0] == '\'') && (s[2] == '\''))
|
||||
i=s[1];
|
||||
--- kbd-1.12/src/outpsfheader.c.orig 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12/src/outpsfheader.c 2005-07-07 15:02:19.205866546 +0200
|
||||
@@ -1,6 +1,7 @@
|
||||
/* outpsfheader - auxiliary fn - not to be installed */
|
||||
/* assumes a little-endian machine */
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h> /* exit */
|
||||
#include "psf.h"
|
||||
|
||||
void
|
||||
--- kbd-1.12/src/spawn_console.c.orig 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12/src/spawn_console.c 2005-07-07 15:02:19.220863912 +0200
|
||||
@@ -12,6 +12,10 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <linux/kd.h>
|
||||
+#include <stdlib.h> /* system */
|
||||
+#include <fcntl.h> /* open */
|
||||
+#include <sys/ioctl.h> /* ioctl */
|
||||
+#include <unistd.h> /* sleep */
|
||||
|
||||
void
|
||||
sighup(){
|
||||
--- kbd-1.12/src/setleds.c.orig 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12/src/setleds.c 2005-07-07 15:01:56.377876261 +0200
|
||||
@@ -149,7 +149,7 @@
|
||||
int optL = 0, optD = 0, optF = 0, verbose = 0;
|
||||
char oleds, nleds, oflags, nflags, odefflags, ndefflags;
|
||||
char nval, ndef, sign;
|
||||
- char osunleds, nsunleds, nsunval, nsundef;
|
||||
+ char osunleds = 0, nsunleds, nsunval, nsundef;
|
||||
char *ap;
|
||||
struct led *lp;
|
||||
|
||||
--- kbd-1.12/openvt/Makefile.orig 2004-01-03 15:44:41.000000000 +0100
|
||||
+++ kbd-1.12/openvt/Makefile 2005-07-07 15:02:19.235861278 +0200
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
CC=gcc
|
||||
-CFLAGS=-O2 -Wall -ansi
|
||||
+RPM_OPT_FLAGS=-O2 -Wall -ansi
|
||||
+CFLAGS=$(RPM_OPT_FLAGS)
|
||||
LDFLAGS=$(CFLAGS) -s
|
||||
|
||||
SRC=openvt.c
|
99
kbd-1.12-kbd_mode.diff
Normal file
99
kbd-1.12-kbd_mode.diff
Normal file
@ -0,0 +1,99 @@
|
||||
diff -ru kbd-1.12.orig/src/kbd_mode.c kbd-1.12/src/kbd_mode.c
|
||||
--- kbd-1.12.orig/src/kbd_mode.c 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12/src/kbd_mode.c 2004-03-30 18:02:49.976870814 +0200
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/kd.h>
|
||||
@@ -15,13 +16,14 @@
|
||||
|
||||
static void
|
||||
usage(void){
|
||||
- fprintf(stderr, _("usage: kbd_mode [-a|-u|-k|-s]\n"));
|
||||
+ fprintf(stderr, _("usage: kbd_mode [-a|-u|-k|-s] [-C device]\n"));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]){
|
||||
- int fd, mode;
|
||||
+ int fd, mode, c, n = 0;
|
||||
+ char *console = NULL;
|
||||
|
||||
set_progname(argv[0]);
|
||||
|
||||
@@ -32,9 +34,45 @@
|
||||
if (argc == 2 && !strcmp(argv[1], "-V"))
|
||||
print_version_and_exit();
|
||||
|
||||
- fd = getfd(NULL);
|
||||
+ while ((c = getopt(argc, argv, "auskC:")) != EOF) {
|
||||
+ switch (c) {
|
||||
+ case 'a':
|
||||
+ if (n > 0)
|
||||
+ usage ();
|
||||
+ mode = K_XLATE;
|
||||
+ n++;
|
||||
+ break;
|
||||
+ case 'u':
|
||||
+ if (n > 0)
|
||||
+ usage ();
|
||||
+ mode = K_UNICODE;
|
||||
+ n++;
|
||||
+ break;
|
||||
+ case 's':
|
||||
+ if (n > 0)
|
||||
+ usage ();
|
||||
+ mode = K_RAW;
|
||||
+ n++;
|
||||
+ break;
|
||||
+ case 'k':
|
||||
+ if (n > 0)
|
||||
+ usage ();
|
||||
+ mode = K_MEDIUMRAW;
|
||||
+ n++;
|
||||
+ break;
|
||||
+ case 'C':
|
||||
+ if (!optarg || !optarg[0])
|
||||
+ usage ();
|
||||
+ console = optarg;
|
||||
+ break;
|
||||
+ default:
|
||||
+ usage();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ fd = getfd(console);
|
||||
|
||||
- if (argc == 1) {
|
||||
+ if (n == 0) {
|
||||
/* report mode */
|
||||
if (ioctl(fd, KDGKBMODE, &mode)) {
|
||||
perror("KDGKBMODE");
|
||||
@@ -57,20 +95,9 @@
|
||||
default:
|
||||
printf(_("The keyboard is in some unknown mode\n"));
|
||||
}
|
||||
- exit(1);
|
||||
+ exit(0);
|
||||
}
|
||||
- if (argc != 2)
|
||||
- usage();
|
||||
- if (!strcmp(argv[1], "-a"))
|
||||
- mode = K_XLATE;
|
||||
- else if (!strcmp(argv[1], "-u"))
|
||||
- mode = K_UNICODE;
|
||||
- else if (!strcmp(argv[1], "-s"))
|
||||
- mode = K_RAW;
|
||||
- else if (!strcmp(argv[1], "-k"))
|
||||
- mode = K_MEDIUMRAW;
|
||||
- else
|
||||
- usage();
|
||||
+
|
||||
if (ioctl(fd, KDSKBMODE, mode)) {
|
||||
perror("KDSKBMODE");
|
||||
fprintf(stderr, _("%s: error setting keyboard mode\n"), progname);
|
23
kbd-1.12-loadkeys-repstdout.diff
Normal file
23
kbd-1.12-loadkeys-repstdout.diff
Normal file
@ -0,0 +1,23 @@
|
||||
diff -Nur kbd-1.12-5/src/loadkeys.y kbd-1.12-6/src/loadkeys.y
|
||||
--- kbd-1.12-5/src/loadkeys.y 2004-02-26 22:49:25.000000000 +0100
|
||||
+++ kbd-1.12-6/src/loadkeys.y 2004-02-26 22:52:44.000000000 +0100
|
||||
@@ -537,7 +537,7 @@
|
||||
|
||||
if (verbose)
|
||||
/* start reading include file */
|
||||
- fprintf(stderr, _("switching to %s\n"), s);
|
||||
+ fprintf(stdout, _("switching to %s\n"), s);
|
||||
|
||||
lk_push();
|
||||
|
||||
@@ -613,8 +613,8 @@
|
||||
*/
|
||||
gotf:
|
||||
filename = xstrdup(pathname);
|
||||
- if (!quiet)
|
||||
- fprintf(stderr, _("Loading %s\n"), pathname);
|
||||
+ if (!quiet && !optm)
|
||||
+ fprintf(stdout, _("Loading %s\n"), pathname);
|
||||
if (first_file) {
|
||||
yyin = f;
|
||||
first_file = 0;
|
99
kbd-1.12-mac-de.diff
Normal file
99
kbd-1.12-mac-de.diff
Normal file
@ -0,0 +1,99 @@
|
||||
---
|
||||
data/keymaps/mac/all/mac-de-latin1-nodeadkeys.map | 2 -
|
||||
data/keymaps/mac/all/mac-de-latin1.map | 38 ++++++++++++----------
|
||||
data/keymaps/mac/include/mac-euro2.map | 6 +++
|
||||
3 files changed, 28 insertions(+), 18 deletions(-)
|
||||
|
||||
Index: kbd-1.12/data/keymaps/mac/all/mac-de-latin1-nodeadkeys.map
|
||||
===================================================================
|
||||
--- kbd-1.12.orig/data/keymaps/mac/all/mac-de-latin1-nodeadkeys.map
|
||||
+++ kbd-1.12/data/keymaps/mac/all/mac-de-latin1-nodeadkeys.map
|
||||
@@ -7,7 +7,7 @@ include "mac-de-latin1.map"
|
||||
keycode 24 = apostrophe grave
|
||||
keycode 30 = plus asterisk asciitilde
|
||||
keycode 50 = asciicircum degree
|
||||
- alt keycode 45 = asciitilde
|
||||
+ altgr keycode 45 = asciitilde
|
||||
|
||||
# corresponding keys in mac-de-latin1.map:
|
||||
# keycode 24 = dead_acute dead_grave
|
||||
Index: kbd-1.12/data/keymaps/mac/all/mac-de-latin1.map
|
||||
===================================================================
|
||||
--- kbd-1.12.orig/data/keymaps/mac/all/mac-de-latin1.map
|
||||
+++ kbd-1.12/data/keymaps/mac/all/mac-de-latin1.map
|
||||
@@ -11,22 +11,23 @@ include "mac-qwerty-layout"
|
||||
#include "linux-with-alt-and-altgr"
|
||||
include "mac-linux-keys-bare.inc"
|
||||
plain keycode 65 = KP_Comma
|
||||
-include "mac-euro.map"
|
||||
+include "mac-euro2.map"
|
||||
compose as usual for "iso-8859-1"
|
||||
strings as usual
|
||||
|
||||
-# Normal Shift AltGr Strg
|
||||
-# Normal Shift AltGr Shift+AltGr Ctrl Shift+Ctrl AltGr+Ctrl Shift+AltGr+Ctrl Alt Shift+Alt AltGr+Alt Shift+AltGr+Alt
|
||||
-keycode 26 = seven slash braceleft a b c d e f g h i j k
|
||||
+# Normal Shift AltGr Shift+AltGr Ctrl Shift+Ctrl AltGr+Ctrl Shift+AltGr+Ctrl Alt Shift+Alt AltGr+Alt Shift+AltGr+Alt
|
||||
keycode 18 = one exclam
|
||||
shift altgr keycode 18 = at
|
||||
-keycode 19 = two quotedbl twosuperior nul
|
||||
-keycode 20 = three section threesuperior Escape
|
||||
+keycode 19 = two quotedbl twosuperior
|
||||
+ control keycode 19 = nul
|
||||
+keycode 20 = three section threesuperior
|
||||
+ control keycode 29 = Escape
|
||||
keycode 21 = four dollar
|
||||
-keycode 23 = five percent
|
||||
-keycode 22 = six ampersand
|
||||
-keycode 28 = eight parenleft bracketleft
|
||||
-keycode 25 = nine parenright bracketright
|
||||
+keycode 23 = five percent bracketleft
|
||||
+keycode 22 = six ampersand bracketright
|
||||
+keycode 26 = seven slash bar
|
||||
+keycode 28 = eight parenleft braceleft
|
||||
+keycode 25 = nine parenright braceright
|
||||
control altgr keycode 25 = Control_bracketright
|
||||
keycode 29 = zero equal braceright
|
||||
keycode 27 = ssharp question backslash
|
||||
@@ -38,20 +39,23 @@ keycode 33 = +udiaeresis +Udiaere
|
||||
keycode 30 = plus asterisk dead_tilde
|
||||
keycode 41 = +odiaeresis +Odiaeresis
|
||||
keycode 39 = +adiaeresis +Adiaeresis
|
||||
-keycode 10 = dead_circumflex degree Meta_asciicircum Control_asciicircum
|
||||
+keycode 50 = dead_circumflex degree
|
||||
+ alt keycode 50 = Meta_asciicircum
|
||||
+ control keycode 50 = Control_asciicircum
|
||||
keycode 42 = numbersign apostrophe
|
||||
keycode 43 = comma semicolon
|
||||
keycode 47 = period colon
|
||||
-keycode 44 = minus underscore Meta_minus
|
||||
+keycode 44 = minus underscore
|
||||
shift control keycode 44 = Control_underscore
|
||||
-keycode 49 = space space Meta_space nul
|
||||
+keycode 49 = space space
|
||||
+ control keycode 49 = nul
|
||||
keycode 10 = less greater bar
|
||||
|
||||
keycode 16 = z
|
||||
keycode 6 = y
|
||||
|
||||
- alt keycode 12 = at
|
||||
- alt keycode 50 = bar
|
||||
+ altgr keycode 12 = at
|
||||
+ altgr keycode 37 = at
|
||||
+ altgr keycode 42 = bar
|
||||
# altgr keycode 26 = bar
|
||||
- alt keycode 30 = dead_tilde
|
||||
- alt keycode 45 = dead_tilde
|
||||
+ altgr keycode 45 = dead_tilde
|
||||
Index: kbd-1.12/data/keymaps/mac/include/mac-euro2.map
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ kbd-1.12/data/keymaps/mac/include/mac-euro2.map
|
||||
@@ -0,0 +1,6 @@
|
||||
+# Euro and cent
|
||||
+# [Say: "loadkeys mac-euro2" to get Euro and cent with AltGr (Option key)
|
||||
+# on the positions where many keyboards have E and C.
|
||||
+# To get it displayed, use a latin0 (i.e., latin9) font.]
|
||||
+altgr keycode 14 = currency
|
||||
+altgr keycode 8 = cent
|
26
kbd-1.12-mac-dk.diff
Normal file
26
kbd-1.12-mac-dk.diff
Normal file
@ -0,0 +1,26 @@
|
||||
diff -Nur kbd-1.12-6/data/keymaps/mac/all/mac-dk-latin1.map kbd-1.12-7/data/keymaps/mac/all/mac-dk-latin1.map
|
||||
--- kbd-1.12-6/data/keymaps/mac/all/mac-dk-latin1.map 2004-02-26 22:52:20.000000000 +0100
|
||||
+++ kbd-1.12-7/data/keymaps/mac/all/mac-dk-latin1.map 2004-02-26 22:57:47.000000000 +0100
|
||||
@@ -23,18 +23,20 @@
|
||||
keycode 25 = nine parenright bracketright
|
||||
keycode 29 = zero equal
|
||||
keycode 27 = plus question
|
||||
-keycode 24 = acute grave
|
||||
+keycode 24 = acute grave at
|
||||
keycode 33 = aring Aring
|
||||
keycode 30 = diaeresis circumflex asciitilde
|
||||
keycode 41 = ae AE adiaeresis Adiaeresis
|
||||
keycode 39 = oslash Oslash odiaeresis Odiaeresis
|
||||
-keycode 42 = apostrophe asterisk
|
||||
+keycode 42 = apostrophe asterisk at
|
||||
keycode 43 = comma semicolon
|
||||
keycode 47 = period colon
|
||||
keycode 44 = minus underscore Meta_minus
|
||||
shift control keycode 44 = Control_underscore
|
||||
keycode 49 = space space Meta_space nul
|
||||
keycode 10 = less greater bar
|
||||
+# odd
|
||||
+keycode 34 = i I bar
|
||||
|
||||
|
||||
alt keycode 12 = at
|
24
kbd-1.12-noclaudio.diff
Normal file
24
kbd-1.12-noclaudio.diff
Normal file
@ -0,0 +1,24 @@
|
||||
diff -Nur kbd-1.12-3/data/keymaps/mac/all/mac-de_CH.map kbd-1.12-4/data/keymaps/mac/all/mac-de_CH.map
|
||||
--- kbd-1.12-3/data/keymaps/mac/all/mac-de_CH.map 2004-02-26 22:39:18.000000000 +0100
|
||||
+++ kbd-1.12-4/data/keymaps/mac/all/mac-de_CH.map 2004-02-26 22:48:31.000000000 +0100
|
||||
@@ -11,7 +11,7 @@
|
||||
! CtrlR 128 not used
|
||||
|
||||
! plain,shift,command,control,alt,ctrl-alt
|
||||
-# from http://www.claudio.ch/Etc/pb-sg.kmap
|
||||
+# from Claudio Nieder
|
||||
# modified by olh@suse.de
|
||||
|
||||
alt_is_meta
|
||||
diff -Nur kbd-1.12-3/data/keymaps/mac/all/mac-fr_CH-latin1.map kbd-1.12-4/data/keymaps/mac/all/mac-fr_CH-latin1.map
|
||||
--- kbd-1.12-3/data/keymaps/mac/all/mac-fr_CH-latin1.map 2004-02-26 22:39:18.000000000 +0100
|
||||
+++ kbd-1.12-4/data/keymaps/mac/all/mac-fr_CH-latin1.map 2004-02-26 22:48:31.000000000 +0100
|
||||
@@ -11,7 +11,7 @@
|
||||
! CtrlR 128 not used
|
||||
|
||||
! plain,shift,command,control,alt,ctrl-alt
|
||||
-# from http://www.claudio.ch/Etc/pb-sg.kmap
|
||||
+# from Claudio Nieder
|
||||
# modified by olh@suse.de from mac-de_CH
|
||||
|
||||
alt_is_meta
|
44
kbd-1.12-nohang-kbdrate2.diff
Normal file
44
kbd-1.12-nohang-kbdrate2.diff
Normal file
@ -0,0 +1,44 @@
|
||||
diff -Nur kbd-1.12-4/src/kbdrate.c kbd-1.12-5/src/kbdrate.c
|
||||
--- kbd-1.12-4/src/kbdrate.c 2004-02-26 22:46:55.000000000 +0100
|
||||
+++ kbd-1.12-5/src/kbdrate.c 2004-02-26 22:50:19.000000000 +0100
|
||||
@@ -90,6 +90,8 @@
|
||||
};
|
||||
#endif
|
||||
|
||||
+#include <signal.h>
|
||||
+
|
||||
#include "nls.h"
|
||||
#include "version.h"
|
||||
|
||||
@@ -185,6 +187,12 @@
|
||||
#endif /* KIOCSRATE */
|
||||
}
|
||||
|
||||
+void
|
||||
+sigalrmhandler( int sig ) {
|
||||
+ fprintf( stderr, "kbdrate: Failed waiting for kbd controller!\n" );
|
||||
+ raise( SIGINT );
|
||||
+}
|
||||
+
|
||||
int
|
||||
main( int argc, char **argv ) {
|
||||
#ifdef __sparc__
|
||||
@@ -260,6 +268,9 @@
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
+ signal( SIGALRM, sigalrmhandler );
|
||||
+ alarm( 3 );
|
||||
+
|
||||
do {
|
||||
lseek( fd, 0x64, 0 );
|
||||
read( fd, &data, 1 );
|
||||
@@ -274,6 +285,8 @@
|
||||
read( fd, &data, 1 );
|
||||
} while ((data & 2) == 2 ); /* wait */
|
||||
|
||||
+ alarm( 0 );
|
||||
+
|
||||
lseek( fd, 0x60, 0 );
|
||||
sleep( 1 );
|
||||
write( fd, &value, 1 );
|
40
kbd-1.12-nounicode-nontty.diff
Normal file
40
kbd-1.12-nounicode-nontty.diff
Normal file
@ -0,0 +1,40 @@
|
||||
diff -Nur kbd-1.12-13/src/unicode_start kbd-1.12-14/src/unicode_start
|
||||
--- kbd-1.12-13/src/unicode_start 2004-02-27 17:22:32.000000000 +0100
|
||||
+++ kbd-1.12-14/src/unicode_start 2004-02-27 17:24:51.000000000 +0100
|
||||
@@ -1,6 +1,17 @@
|
||||
#!/bin/sh
|
||||
# Enables Unicode processing in the current console.
|
||||
-#
|
||||
+
|
||||
+# 0. Check whether we're on a console
|
||||
+TTY=`/usr/bin/tty`
|
||||
+case $TTY in
|
||||
+ /dev/console|/dev/tty[0-9]*)
|
||||
+ ;;
|
||||
+ *)
|
||||
+ echo "unicode_start skipped on $TTY"
|
||||
+ exit 0
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
# 1. The input side: the keyboard driver.
|
||||
|
||||
# Set the keyboard driver in Unicode mode. (Default is ASCII mode.)
|
||||
diff -Nur kbd-1.12-13/src/unicode_stop kbd-1.12-14/src/unicode_stop
|
||||
--- kbd-1.12-13/src/unicode_stop 2004-02-27 17:22:32.000000000 +0100
|
||||
+++ kbd-1.12-14/src/unicode_stop 2004-02-27 17:24:51.000000000 +0100
|
||||
@@ -1,5 +1,14 @@
|
||||
#!/bin/sh
|
||||
# stop unicode
|
||||
+TTY=`/usr/bin/tty`
|
||||
+case $TTY in
|
||||
+ /dev/console|/dev/tty[0-9]*)
|
||||
+ ;;
|
||||
+ *)
|
||||
+ echo "unicode_stop skipped on $TTY"
|
||||
+ exit 0
|
||||
+ ;;
|
||||
+esac
|
||||
kbd_mode -a
|
||||
echo -n -e '\033%@'
|
||||
|
285
kbd-1.12-prtscr_no_sigquit.diff
Normal file
285
kbd-1.12-prtscr_no_sigquit.diff
Normal file
@ -0,0 +1,285 @@
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/azerty/fr-latin9.map kbd-1.12-1/data/keymaps/i386/azerty/fr-latin9.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/azerty/fr-latin9.map 2002-10-13 01:47:01.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/azerty/fr-latin9.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -417,6 +417,7 @@
|
||||
# La touche Ctrl+Pause = Attn = 101 a un code pour elle-męme
|
||||
#
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
|
||||
keycode 102 = Home
|
||||
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/fgGIod/tr_f-latin5.map kbd-1.12-1/data/keymaps/i386/fgGIod/tr_f-latin5.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/fgGIod/tr_f-latin5.map 2002-10-13 02:21:12.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/fgGIod/tr_f-latin5.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -217,6 +217,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/bg-cp1251.map kbd-1.12-1/data/keymaps/i386/qwerty/bg-cp1251.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/bg-cp1251.map 2004-01-03 18:07:57.000000000 +0100
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/bg-cp1251.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -311,6 +311,7 @@
|
||||
altgr alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/bg_bds-cp1251.map kbd-1.12-1/data/keymaps/i386/qwerty/bg_bds-cp1251.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/bg_bds-cp1251.map 2002-10-14 01:39:32.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/bg_bds-cp1251.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -636,6 +636,7 @@
|
||||
keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/br-abnt.map kbd-1.12-1/data/keymaps/i386/qwerty/br-abnt.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/br-abnt.map 2002-10-13 02:10:14.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/br-abnt.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -197,6 +197,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/by.map kbd-1.12-1/data/keymaps/i386/qwerty/by.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/by.map 2002-10-13 02:10:31.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/by.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -529,6 +529,7 @@
|
||||
Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash
|
||||
keycode 100 = Alt
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up Up Up \
|
||||
KeyboardSignal Up Up \
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/cz-cp1250.map kbd-1.12-1/data/keymaps/i386/qwerty/cz-cp1250.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/cz-cp1250.map 2002-10-13 02:12:14.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/cz-cp1250.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -138,6 +138,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/cz-lat2-prog.map kbd-1.12-1/data/keymaps/i386/qwerty/cz-lat2-prog.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/cz-lat2-prog.map 2002-10-13 02:02:58.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/cz-lat2-prog.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -141,6 +141,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior Scroll_Backward Prior Scroll_Backward VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/cz-lat2.map kbd-1.12-1/data/keymaps/i386/qwerty/cz-lat2.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/cz-lat2.map 2002-10-13 02:03:21.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/cz-lat2.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -138,6 +138,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior Scroll_Backward Prior Scroll_Backward VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/cz.map kbd-1.12-1/data/keymaps/i386/qwerty/cz.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/cz.map 2002-10-11 13:08:50.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/cz.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -1083,13 +1083,13 @@
|
||||
keycode 100 = AltGr
|
||||
#
|
||||
#keycode 101 = Break
|
||||
-keycode 101 = Break Break VoidSymbol VoidSymbol VoidSymbol \
|
||||
- VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
|
||||
+keycode 101 = Break Break VoidSymbol VoidSymbol Control_c \
|
||||
+ Control_c VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
|
||||
VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
|
||||
VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
|
||||
VoidSymbol \
|
||||
- Break Break VoidSymbol VoidSymbol VoidSymbol \
|
||||
- VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
|
||||
+ Break Break VoidSymbol VoidSymbol Control_c \
|
||||
+ Control_c VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
|
||||
VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
|
||||
VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
|
||||
VoidSymbol
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/defkeymap.map kbd-1.12-1/data/keymaps/i386/qwerty/defkeymap.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/defkeymap.map 2004-02-27 19:03:48.000000000 +0100
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/defkeymap.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -222,6 +222,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/defkeymap_V1.0.map kbd-1.12-1/data/keymaps/i386/qwerty/defkeymap_V1.0.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/defkeymap_V1.0.map 2002-10-13 02:05:31.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/defkeymap_V1.0.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -185,6 +185,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/lt.baltic.map kbd-1.12-1/data/keymaps/i386/qwerty/lt.baltic.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/lt.baltic.map 2002-10-13 02:09:50.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/lt.baltic.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -171,6 +171,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/lt.l4.map kbd-1.12-1/data/keymaps/i386/qwerty/lt.l4.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/lt.l4.map 2002-10-13 01:59:51.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/lt.l4.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -463,6 +463,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break # 101=Control-Pause
|
||||
+ control keycode 101 = Control_c
|
||||
string F102 = "\033[7$"
|
||||
keycode 102 = Find # =Home
|
||||
shift keycode 102 = F102
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/lt.map kbd-1.12-1/data/keymaps/i386/qwerty/lt.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/lt.map 2002-10-13 02:00:25.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/lt.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -462,6 +462,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break # 101=Control-Pause
|
||||
+ control keycode 101 = Control_c
|
||||
string F102 = "\033[7$"
|
||||
keycode 102 = Find # =Home
|
||||
shift keycode 102 = F102
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/pl2.map kbd-1.12-1/data/keymaps/i386/qwerty/pl2.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/pl2.map 2002-10-13 02:06:29.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/pl2.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -241,6 +241,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
control keycode 102 = F106
|
||||
keycode 103 = Up
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/sk-prog-qwerty.map kbd-1.12-1/data/keymaps/i386/qwerty/sk-prog-qwerty.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/sk-prog-qwerty.map 2002-10-13 02:09:26.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/sk-prog-qwerty.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -122,6 +122,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/ua-utf-ws.map kbd-1.12-1/data/keymaps/i386/qwerty/ua-utf-ws.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/ua-utf-ws.map 2002-10-13 02:07:56.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/ua-utf-ws.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -1526,6 +1526,7 @@
|
||||
ctrlr keycode 100 = CtrlR_Lock
|
||||
ctrll ctrlr keycode 100 = CtrlR_Lock
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/ua-utf.map kbd-1.12-1/data/keymaps/i386/qwerty/ua-utf.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/ua-utf.map 2002-10-13 02:08:07.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/ua-utf.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -1516,6 +1516,7 @@
|
||||
ctrlr keycode 100 = CtrlR_Lock
|
||||
ctrll ctrlr keycode 100 = CtrlR_Lock
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/ua-ws.map kbd-1.12-1/data/keymaps/i386/qwerty/ua-ws.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/ua-ws.map 2002-10-13 02:08:19.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/ua-ws.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -1521,6 +1521,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = Alt
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/ua.map kbd-1.12-1/data/keymaps/i386/qwerty/ua.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/ua.map 2002-10-13 02:08:31.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/ua.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -1515,6 +1515,7 @@
|
||||
ctrlr keycode 100 = CtrlR_Lock
|
||||
ctrll ctrlr keycode 100 = CtrlR_Lock
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwerty/us-acentos.map kbd-1.12-1/data/keymaps/i386/qwerty/us-acentos.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwerty/us-acentos.map 2002-10-13 02:10:02.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwerty/us-acentos.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -193,6 +193,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwertz/cz-us-qwertz.map kbd-1.12-1/data/keymaps/i386/qwertz/cz-us-qwertz.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwertz/cz-us-qwertz.map 2002-10-13 01:56:20.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwertz/cz-us-qwertz.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -135,6 +135,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior Scroll_Backward Prior Scroll_Backward VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwertz/sk-prog-qwertz.map kbd-1.12-1/data/keymaps/i386/qwertz/sk-prog-qwertz.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwertz/sk-prog-qwertz.map 2002-10-13 01:57:30.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwertz/sk-prog-qwertz.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -122,6 +122,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
||||
diff -ur kbd-1.12-0/data/keymaps/i386/qwertz/sk-qwertz.map kbd-1.12-1/data/keymaps/i386/qwertz/sk-qwertz.map
|
||||
--- kbd-1.12-0/data/keymaps/i386/qwertz/sk-qwertz.map 2002-10-13 01:56:48.000000000 +0200
|
||||
+++ kbd-1.12-1/data/keymaps/i386/qwertz/sk-qwertz.map 2004-02-27 19:04:47.000000000 +0100
|
||||
@@ -123,6 +123,7 @@
|
||||
alt keycode 99 = Control_backslash
|
||||
keycode 100 = AltGr
|
||||
keycode 101 = Break
|
||||
+ control keycode 101 = Control_c
|
||||
keycode 102 = Find
|
||||
keycode 103 = Up
|
||||
keycode 104 = Prior
|
29
kbd-1.12-setfont-fpclose.diff
Normal file
29
kbd-1.12-setfont-fpclose.diff
Normal file
@ -0,0 +1,29 @@
|
||||
--- kbd-1.12/src/setfont.c.orig 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12/src/setfont.c 2006-06-21 17:28:56.999867425 +0200
|
||||
@@ -398,8 +398,10 @@
|
||||
fprintf(stderr, _("When loading several fonts, all "
|
||||
"must be psf fonts - %s isn't\n"),
|
||||
pathname);
|
||||
+ fpclose(fpi);
|
||||
exit(EX_DATAERR);
|
||||
}
|
||||
+ fpclose(fpi); // avoid zombies, jw@suse.de (#88501)
|
||||
bytewidth = (width+7) / 8;
|
||||
height = fontbuflth / (bytewidth * fontsize);
|
||||
if (verbose)
|
||||
@@ -483,6 +485,7 @@
|
||||
if(readpsffont(fpi, &inbuf, &inputlth, &fontbuf, &fontbuflth,
|
||||
&width, &fontsize, 0,
|
||||
no_u ? NULL : &uclistheads) == 0) {
|
||||
+ fpclose(fpi);
|
||||
/* we've got a psf font */
|
||||
bytewidth = (width+7) / 8;
|
||||
height = fontbuflth / (bytewidth * fontsize);
|
||||
@@ -497,6 +500,7 @@
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
+ fpclose(fpi); // avoid zombies, jw@suse.de (#88501)
|
||||
|
||||
/* instructions to combine fonts? */
|
||||
{ char *combineheader = "# combine partial fonts\n";
|
113
kbd-1.12-showconsolefont-info.diff
Normal file
113
kbd-1.12-showconsolefont-info.diff
Normal file
@ -0,0 +1,113 @@
|
||||
--- kbd-1.12/src/kdfontop.c.orig 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12/src/kdfontop.c 2006-07-26 18:14:55.000000000 +0200
|
||||
@@ -142,8 +142,11 @@
|
||||
return h;
|
||||
}
|
||||
|
||||
-/* may be called with buf==NULL if we only want info */
|
||||
-/* must not exit - we may have cleanup to do */
|
||||
+/*
|
||||
+ * May be called with buf==NULL if we only want info.
|
||||
+ * May be called with width==NULL and height==NULL.
|
||||
+ * Must not exit - we may have cleanup to do.
|
||||
+ */
|
||||
int
|
||||
getfont(int fd, char *buf, int *count, int *width, int *height) {
|
||||
struct consolefontdesc cfd;
|
||||
@@ -193,6 +196,11 @@
|
||||
fprintf(stderr, _("bug: getfont called with count<256\n"));
|
||||
return -1;
|
||||
}
|
||||
+ if (!buf)
|
||||
+ {
|
||||
+ fprintf(stderr, _("bug: getfont using GIO_FONT needs buf.\n"));
|
||||
+ return -1;
|
||||
+ }
|
||||
i = ioctl(fd, GIO_FONT, buf);
|
||||
if (i) {
|
||||
perror("getfont: GIO_FONT");
|
||||
@@ -208,11 +216,11 @@
|
||||
|
||||
int
|
||||
getfontsize(int fd) {
|
||||
- int count, width, height;
|
||||
+ int count;
|
||||
int i;
|
||||
|
||||
- count = width = height = 0;
|
||||
- i = getfont(fd, NULL, &count, &width, &height);
|
||||
+ count = 0;
|
||||
+ i = getfont(fd, NULL, &count, NULL, NULL);
|
||||
return (i == 0) ? count : 256;
|
||||
}
|
||||
|
||||
--- kbd-1.12/src/showconsolefont.c.orig 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12/src/showconsolefont.c 2006-07-26 18:40:31.000000000 +0200
|
||||
@@ -101,8 +101,15 @@
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr,
|
||||
- _("usage: showconsolefont [-v|-V]\n"
|
||||
- "(probably after loading a font with `setfont font')\n"));
|
||||
+ _("usage: showconsolefont -V|--version\n"
|
||||
+ " showconsolefont [-C tty] [-v] [-i]\n"
|
||||
+ "(probably after loading a font with `setfont font')\n"
|
||||
+ "\n"
|
||||
+ "Valid options are:\n"
|
||||
+ " -C tty Device to read the font from. Default: current tty.\n"
|
||||
+ " -v Be more verbose.\n"
|
||||
+ " -i Don't print out the font table, just show\n"
|
||||
+ " ROWSxCOLSxCOUNT and exit.\n"));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -110,7 +117,7 @@
|
||||
main (int argc, char **argv) {
|
||||
int c, n, cols, rows, nr, i, j, k;
|
||||
char *sep, *console = NULL;
|
||||
- int list[64], lth, verbose = 0;
|
||||
+ int list[64], lth, info = 0, verbose = 0;
|
||||
|
||||
set_progname(argv[0]);
|
||||
|
||||
@@ -122,8 +129,11 @@
|
||||
(!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")))
|
||||
print_version_and_exit();
|
||||
|
||||
- while ((c = getopt(argc, argv, "vC:")) != EOF) {
|
||||
+ while ((c = getopt(argc, argv, "ivC:")) != EOF) {
|
||||
switch (c) {
|
||||
+ case 'i':
|
||||
+ info = 1;
|
||||
+ break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
@@ -135,9 +145,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (argc != 1)
|
||||
+ if (optind != argc)
|
||||
usage();
|
||||
|
||||
+ if (info)
|
||||
+ {
|
||||
+ nr = rows = cols = 0;
|
||||
+ n = getfont(fd, NULL, &nr, &rows, &cols);
|
||||
+ if (n != 0)
|
||||
+ leave(1);
|
||||
+ if (verbose)
|
||||
+ {
|
||||
+ printf("Character count: %d\n", nr);
|
||||
+ printf("Font width : %d\n", rows);
|
||||
+ printf("Font height : %d\n", cols);
|
||||
+ }
|
||||
+ else
|
||||
+ printf("%dx%dx%d\n", rows, cols, nr);
|
||||
+ leave(0);
|
||||
+ }
|
||||
+
|
||||
fd = getfd(console);
|
||||
|
||||
settrivialscreenmap();
|
48
kbd-1.12-strip.diff
Normal file
48
kbd-1.12-strip.diff
Normal file
@ -0,0 +1,48 @@
|
||||
openvt/Makefile | 2 +-
|
||||
src/Makefile.in | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: kbd-1.12/src/Makefile.in
|
||||
===================================================================
|
||||
--- kbd-1.12.orig/src/Makefile.in 2006-01-13 15:03:29.000000000 +0100
|
||||
+++ kbd-1.12/src/Makefile.in 2006-01-13 15:04:24.000000000 +0100
|
||||
@@ -56,7 +56,7 @@ WARN = -Wall -Wmissing-prototypes -Wstri
|
||||
DEFS = -DDATADIR=\"$(DATA_DIR)\"
|
||||
RPM_OPT_FLAGS = -O2 -Wall
|
||||
CFLAGS = $(RPM_OPT_FLAGS)
|
||||
-LDFLAGS = -s
|
||||
+LDFLAGS =
|
||||
|
||||
CC = gcc
|
||||
YACC = bison -y
|
||||
@@ -73,14 +73,14 @@ old: $(OLDPROGS)
|
||||
|
||||
install: all
|
||||
install -d -m 0755 $(BINDIR) $(LOADKEYS_BINDIR)
|
||||
- install -s -m 0755 $(setowner) $(PROGS) $(OLDPROGS) $(BINDIR)
|
||||
-# install -s -m 0755 $(setowner) $(MISC) $(BINDIR)
|
||||
+ install -m 0755 $(setowner) $(PROGS) $(OLDPROGS) $(BINDIR)
|
||||
+# install -m 0755 $(setowner) $(MISC) $(BINDIR)
|
||||
install -c -m 0755 $(setowner) $(SHCMDS) $(BINDIR)
|
||||
for i in psfaddtable psfgettable psfstriptable; do \
|
||||
rm -f $(BINDIR)/$$i; ln -s psfxtable $(BINDIR)/$$i; \
|
||||
done
|
||||
rm -f $(BINDIR)/loadkeys
|
||||
- install -s -m 0755 $(setowner) loadkeys $(LOADKEYS_BINDIR)
|
||||
+ install -m 0755 $(setowner) loadkeys $(LOADKEYS_BINDIR)
|
||||
@echo "You may also want to add psf.magic to /usr/lib/magic"
|
||||
|
||||
|
||||
Index: kbd-1.12/openvt/Makefile
|
||||
===================================================================
|
||||
--- kbd-1.12.orig/openvt/Makefile 2006-01-13 15:03:29.000000000 +0100
|
||||
+++ kbd-1.12/openvt/Makefile 2006-01-13 15:09:53.000000000 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
CC=gcc
|
||||
RPM_OPT_FLAGS=-O2 -Wall -ansi
|
||||
CFLAGS=$(RPM_OPT_FLAGS)
|
||||
-LDFLAGS=$(CFLAGS) -s
|
||||
+LDFLAGS=$(CFLAGS)
|
||||
|
||||
SRC=openvt.c
|
||||
OBJ=openvt.o getfd.o
|
73
kbd-1.12-swiss.diff
Normal file
73
kbd-1.12-swiss.diff
Normal file
@ -0,0 +1,73 @@
|
||||
diff -Nur kbd-1.12-1/data/keymaps/i386/qwertz/fr_CH-latin1.map kbd-1.12-2/data/keymaps/i386/qwertz/fr_CH-latin1.map
|
||||
--- kbd-1.12-1/data/keymaps/i386/qwertz/fr_CH-latin1.map 2004-02-26 22:12:57.000000000 +0100
|
||||
+++ kbd-1.12-2/data/keymaps/i386/qwertz/fr_CH-latin1.map 2004-02-26 22:37:52.000000000 +0100
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
keycode 1 = Escape Escape
|
||||
alt keycode 1 = Meta_Escape
|
||||
-keycode 2 = one plus
|
||||
+keycode 2 = one plus bar
|
||||
alt keycode 2 = Meta_one
|
||||
keycode 3 = two quotedbl at
|
||||
control keycode 3 = nul
|
||||
@@ -15,10 +15,10 @@
|
||||
keycode 4 = three asterisk numbersign
|
||||
control keycode 4 = Escape
|
||||
alt keycode 4 = Meta_three
|
||||
-keycode 5 = four ccedilla
|
||||
+keycode 5 = four ccedilla degree
|
||||
control keycode 5 = Control_backslash
|
||||
alt keycode 5 = Meta_four
|
||||
-keycode 6 = five percent
|
||||
+keycode 6 = five percent section
|
||||
control keycode 6 = Control_bracketright
|
||||
alt keycode 6 = Meta_five
|
||||
keycode 7 = six ampersand notsign
|
||||
@@ -81,3 +81,6 @@
|
||||
keycode 86 = less greater backslash
|
||||
alt keycode 86 = Meta_less
|
||||
keycode 97 = Control
|
||||
+# adapted to X11 keymap
|
||||
+altgr keycode 18 = currency
|
||||
+#altgr keycode 46 = cent
|
||||
diff -Nur kbd-1.12-1/data/keymaps/i386/qwertz/sg-latin1.map kbd-1.12-2/data/keymaps/i386/qwertz/sg-latin1.map
|
||||
--- kbd-1.12-1/data/keymaps/i386/qwertz/sg-latin1.map 2002-10-12 21:57:22.000000000 +0200
|
||||
+++ kbd-1.12-2/data/keymaps/i386/qwertz/sg-latin1.map 2004-02-26 22:37:52.000000000 +0100
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
keycode 1 = Escape Escape
|
||||
alt keycode 1 = Meta_Escape
|
||||
-keycode 2 = one plus bar
|
||||
+keycode 2 = one plus bar
|
||||
alt keycode 2 = Meta_one
|
||||
keycode 3 = two quotedbl at
|
||||
control keycode 3 = nul
|
||||
@@ -13,10 +13,10 @@
|
||||
keycode 4 = three asterisk numbersign
|
||||
control keycode 4 = Escape
|
||||
alt keycode 4 = Meta_three
|
||||
-keycode 5 = four ccedilla
|
||||
+keycode 5 = four ccedilla degree
|
||||
control keycode 5 = Control_backslash
|
||||
alt keycode 5 = Meta_four
|
||||
-keycode 6 = five percent
|
||||
+keycode 6 = five percent section
|
||||
control keycode 6 = Control_bracketright
|
||||
alt keycode 6 = Meta_five
|
||||
keycode 7 = six ampersand notsign
|
||||
@@ -44,7 +44,7 @@
|
||||
keycode 26 = udiaeresis egrave bracketleft
|
||||
control keycode 26 = Escape
|
||||
alt keycode 26 = Meta_bracketleft
|
||||
-keycode 27 = dead_diaeresis exclam bracketright
|
||||
+keycode 27 = dead_diaeresis exclam bracketright
|
||||
control keycode 27 = Control_bracketright
|
||||
alt keycode 27 = Meta_bracketright
|
||||
keycode 28 = Return
|
||||
@@ -85,3 +85,6 @@
|
||||
keycode 86 = less greater backslash
|
||||
alt keycode 86 = Meta_less
|
||||
keycode 97 = Control
|
||||
+# adapted to X11 keymap
|
||||
+altgr keycode 18 = currency
|
||||
+#altgr keycode 46 = cent
|
79
kbd-1.12-unicode_scripts.diff
Normal file
79
kbd-1.12-unicode_scripts.diff
Normal file
@ -0,0 +1,79 @@
|
||||
diff -Nur kbd-1.12-11/src/unicode_start kbd-1.12-12/src/unicode_start
|
||||
--- kbd-1.12-11/src/unicode_start 2004-02-27 17:14:14.000000000 +0100
|
||||
+++ kbd-1.12-12/src/unicode_start 2004-02-27 17:21:41.000000000 +0100
|
||||
@@ -18,7 +18,19 @@
|
||||
# produce UTF-8 encoded multibyte sequences, instead of single bytes
|
||||
# >= 0x80 in a legacy 8-bit encoding.
|
||||
|
||||
-dumpkeys | loadkeys --unicode
|
||||
+# There is no way of reverting the effect of "dumpkeys | loadkeys --unicode",
|
||||
+# the memory of the earlier keymap is lost. Therefore, try
|
||||
+# to save a copy of the original keymap to be able to reload it in unicode_stop.
|
||||
+# (see also http://mail.nl.linux.org/linux-utf8/2003-08/msg00053.html):
|
||||
+
|
||||
+test -z "$HOME" -o "/" == "$HOME" && HOME=/root
|
||||
+test -d $HOME/.kbd || mkdir $HOME/.kbd
|
||||
+dumpkeys > $HOME/.kbd/.keymap_sv
|
||||
+
|
||||
+# redirect stderr and stdout of loadkeys to /dev/null to avoid the confusing
|
||||
+# "plus before udiaeresis ignored" warnings.
|
||||
+
|
||||
+dumpkeys | loadkeys --unicode > /dev/null 2>&1
|
||||
|
||||
# 2. The output side: the console screen.
|
||||
|
||||
@@ -35,6 +47,14 @@
|
||||
DEFAULT_UNICODE_FONT=LatArCyrHeb-16
|
||||
# Also drdos8x16 is a good candidate.
|
||||
|
||||
+# Fonts with 512 glyphs like LatArCyrHeb-16 make it impossible to use bold
|
||||
+# on the console, which makes YaST2 unusable. To be able to use bold,
|
||||
+# only fonts with 256 glyphs can be used. Therefore we prefer
|
||||
+# the font specified in /etc/sysconfig/console. This should be OK because
|
||||
+# the default font written to /etc/sysconfig/console by YaST2
|
||||
+# is currently always a font with 256 glyphs and a Unicode map
|
||||
+# which is suitable for the language used during the installation.
|
||||
+
|
||||
case $# in
|
||||
2)
|
||||
setfont $1 -u $2
|
||||
@@ -43,7 +63,24 @@
|
||||
setfont $1
|
||||
;;
|
||||
0)
|
||||
- setfont $DEFAULT_UNICODE_FONT
|
||||
+ if [ -f /etc/sysconfig/console ] ; then
|
||||
+ . /etc/sysconfig/console
|
||||
+ fi
|
||||
+ if [ -n "$CONSOLE_FONT" ] ; then
|
||||
+ SETFONT_ARGS="$CONSOLE_FONT"
|
||||
+ if [ -n "$CONSOLE_UNICODEMAP" ] ; then
|
||||
+ SETFONT_ARGS="$SETFONT_ARGS -u $CONSOLE_UNICODEMAP"
|
||||
+ fi
|
||||
+ if [ -n "$CONSOLE_SCREENMAP" ] ; then
|
||||
+ SETFONT_ARGS="$SETFONT_ARGS -m $CONSOLE_SCREENMAP"
|
||||
+ fi
|
||||
+ setfont $SETFONT_ARGS
|
||||
+ if [ -n "$CONSOLE_MAGIC" -a "$CONSOLE_MAGIC" != "none" ] ; then
|
||||
+ echo -en "\033$CONSOLE_MAGIC"
|
||||
+ fi
|
||||
+ else
|
||||
+ setfont $DEFAULT_UNICODE_FONT
|
||||
+ fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: unicode_start [font [unicode map]]"
|
||||
diff -Nur kbd-1.12-11/src/unicode_stop kbd-1.12-12/src/unicode_stop
|
||||
--- kbd-1.12-11/src/unicode_stop 2004-02-27 17:14:14.000000000 +0100
|
||||
+++ kbd-1.12-12/src/unicode_stop 2004-02-27 17:21:41.000000000 +0100
|
||||
@@ -2,3 +2,10 @@
|
||||
# stop unicode
|
||||
kbd_mode -a
|
||||
echo -n -e '\033%@'
|
||||
+
|
||||
+# "dumpkeys | loadkeys --unicode" which is called in "unicode_start"
|
||||
+# cannot be reverted, therefore we have to load the keyboard mapping again
|
||||
+# if it could be sucessfully saved in "unicode_start":
|
||||
+
|
||||
+test -r $HOME/.kbd/.keymap_sv && loadkeys $HOME/.kbd/.keymap_sv
|
||||
+
|
399
kbd-1.12.diff
Normal file
399
kbd-1.12.diff
Normal file
@ -0,0 +1,399 @@
|
||||
diff -ur kbd-1.12.orig/data/keymaps/i386/include/ctrl.map kbd-1.12-0/data/keymaps/i386/include/ctrl.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/include/ctrl.map 2002-10-11 13:08:50.000000000 +0200
|
||||
+++ kbd-1.12-0/data/keymaps/i386/include/ctrl.map 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -1,3 +1,6 @@
|
||||
keycode 29 = Caps_Lock
|
||||
keycode 58 = Control
|
||||
keycode 97 = Compose
|
||||
+# keycode 97 = Control
|
||||
+# Shift keycode 97 = Compose is also popular
|
||||
+# (Right Ctrl + Shift for Compose)
|
||||
diff -ur kbd-1.12.orig/data/keymaps/i386/qwerty/defkeymap.map kbd-1.12-0/data/keymaps/i386/qwerty/defkeymap.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/defkeymap.map 2002-10-13 02:03:56.000000000 +0200
|
||||
+++ kbd-1.12-0/data/keymaps/i386/qwerty/defkeymap.map 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -251,9 +251,9 @@
|
||||
keycode 122 =
|
||||
keycode 123 =
|
||||
keycode 124 =
|
||||
-keycode 125 =
|
||||
-keycode 126 =
|
||||
-keycode 127 =
|
||||
+keycode 125 = Decr_Console Last_Console Incr_Console Compose
|
||||
+keycode 126 = Incr_Console Last_Console Decr_Console Compose
|
||||
+keycode 127 = Compose Decr_Console Incr_Console Last_Console
|
||||
string F1 = "\033[[A"
|
||||
string F2 = "\033[[B"
|
||||
string F3 = "\033[[C"
|
||||
diff -ur kbd-1.12.orig/data/keymaps/i386/qwertz/fr_CH-latin1.map kbd-1.12-0/data/keymaps/i386/qwertz/fr_CH-latin1.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwertz/fr_CH-latin1.map 2002-10-11 13:08:48.000000000 +0200
|
||||
+++ kbd-1.12-0/data/keymaps/i386/qwertz/fr_CH-latin1.map 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -3,7 +3,6 @@
|
||||
keymaps 0-2,4-6,8,12
|
||||
include "qwertz-layout"
|
||||
include "linux-with-alt-and-altgr"
|
||||
- plain keycode 83 = KP_Comma
|
||||
strings as usual
|
||||
|
||||
keycode 1 = Escape Escape
|
||||
diff -ur kbd-1.12.orig/data/keymaps/i386/qwertz/fr_CH.map kbd-1.12-0/data/keymaps/i386/qwertz/fr_CH.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwertz/fr_CH.map 2002-10-11 13:08:48.000000000 +0200
|
||||
+++ kbd-1.12-0/data/keymaps/i386/qwertz/fr_CH.map 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -3,7 +3,6 @@
|
||||
keymaps 0-2,4-6,8,12
|
||||
include "qwertz-layout"
|
||||
include "linux-with-alt-and-altgr"
|
||||
- plain keycode 83 = KP_Comma
|
||||
strings as usual
|
||||
|
||||
keycode 1 = Escape Escape
|
||||
diff -ur kbd-1.12.orig/data/keymaps/mac/all/mac-de_CH.map kbd-1.12-0/data/keymaps/mac/all/mac-de_CH.map
|
||||
--- kbd-1.12.orig/data/keymaps/mac/all/mac-de_CH.map 2002-10-11 13:08:52.000000000 +0200
|
||||
+++ kbd-1.12-0/data/keymaps/mac/all/mac-de_CH.map 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -43,3 +43,5 @@
|
||||
keycode 44 = minus underscore backslash Control_underscore Meta_minus Meta_Control_underscore
|
||||
keycode 47 = period colon
|
||||
keycode 10 = less greater
|
||||
+keycode 16 = z
|
||||
+keycode 6 = y
|
||||
diff -ur kbd-1.12.orig/data/keymaps/mac/all/mac-dk-latin1.map kbd-1.12-0/data/keymaps/mac/all/mac-dk-latin1.map
|
||||
--- kbd-1.12.orig/data/keymaps/mac/all/mac-dk-latin1.map 2002-10-11 13:08:52.000000000 +0200
|
||||
+++ kbd-1.12-0/data/keymaps/mac/all/mac-dk-latin1.map 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -28,7 +28,7 @@
|
||||
keycode 30 = diaeresis circumflex asciitilde
|
||||
keycode 41 = ae AE adiaeresis Adiaeresis
|
||||
keycode 39 = oslash Oslash odiaeresis Odiaeresis
|
||||
-keycode 42 = numbersign apostrophe
|
||||
+keycode 42 = apostrophe asterisk
|
||||
keycode 43 = comma semicolon
|
||||
keycode 47 = period colon
|
||||
keycode 44 = minus underscore Meta_minus
|
||||
@@ -36,8 +36,6 @@
|
||||
keycode 49 = space space Meta_space nul
|
||||
keycode 10 = less greater bar
|
||||
|
||||
-keycode 16 = z
|
||||
-keycode 6 = y
|
||||
|
||||
alt keycode 12 = at
|
||||
alt keycode 50 = bar
|
||||
diff -ur kbd-1.12.orig/src/Makefile.in kbd-1.12-0/src/Makefile.in
|
||||
--- kbd-1.12.orig/src/Makefile.in 2004-01-03 18:53:54.000000000 +0100
|
||||
+++ kbd-1.12-0/src/Makefile.in 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -54,7 +54,8 @@
|
||||
|
||||
WARN = -Wall -Wmissing-prototypes -Wstrict-prototypes
|
||||
DEFS = -DDATADIR=\"$(DATA_DIR)\"
|
||||
-CFLAGS = -O2
|
||||
+RPM_OPT_FLAGS = -O2 -Wall
|
||||
+CFLAGS = $(RPM_OPT_FLAGS)
|
||||
LDFLAGS = -s
|
||||
|
||||
CC = gcc
|
||||
diff -ur kbd-1.12.orig/po/Makefile.in kbd-1.12-0/po/Makefile.in
|
||||
--- kbd-1.12.orig/po/Makefile.in 2004-03-02 00:04:10.727687162 +0100
|
||||
+++ kbd-1.12/po/Makefile.in 2004-03-02 00:04:26.390543066 +0100
|
||||
@@ -13,7 +13,7 @@
|
||||
FOREIGN=
|
||||
SHELL = /bin/sh
|
||||
|
||||
-prefix = $(DESTDIR)@prefix@
|
||||
+prefix = $(DESTDIR)/usr
|
||||
datadir = $(prefix)/share
|
||||
localedir = $(datadir)/locale
|
||||
gnulocaledir = $(prefix)/share/locale
|
||||
diff -ur kbd-1.12.orig/src/kdfontop.c kbd-1.12-0/src/kdfontop.c
|
||||
--- kbd-1.12.orig/src/kdfontop.c 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12-0/src/kdfontop.c 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -170,6 +170,8 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ /* The other methods do not support width != 8 */
|
||||
+ if (width) *width = 8;
|
||||
/* Second attempt: GIO_FONTX */
|
||||
cfd.charcount = *count;
|
||||
cfd.charheight = 0;
|
||||
@@ -179,8 +181,6 @@
|
||||
*count = cfd.charcount;
|
||||
if (height)
|
||||
*height = cfd.charheight;
|
||||
- if (width)
|
||||
- *width = 8;
|
||||
return 0;
|
||||
}
|
||||
if (errno != ENOSYS && errno != EINVAL) {
|
||||
@@ -201,8 +201,6 @@
|
||||
*count = 256;
|
||||
if (height)
|
||||
*height = 0; /* undefined, at most 32 */
|
||||
- if (width)
|
||||
- *width = 8;
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -ur kbd-1.12.orig/src/loadunimap.c kbd-1.12-0/src/loadunimap.c
|
||||
--- kbd-1.12.orig/src/loadunimap.c 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12-0/src/loadunimap.c 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "version.h"
|
||||
int verbose = 0;
|
||||
int force = 0;
|
||||
+int debug = 0;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
@@ -345,13 +346,29 @@
|
||||
descr = getunicodemap(fd);
|
||||
list = descr.entries;
|
||||
|
||||
+
|
||||
for(i=0; i<fontsize; i++) {
|
||||
- for(j=0; j<descr.entry_ct; j++)
|
||||
+#if 0
|
||||
+ /* More than one mapping is not a sequence! */
|
||||
+ int no = 0;
|
||||
+ for(j=0; j<descr.entry_ct; j++)
|
||||
if (list[j].fontpos == i)
|
||||
+ no++;
|
||||
+ if (no > 1)
|
||||
+ appendseparator(fp, 1, utf8);
|
||||
+#endif
|
||||
+ if (debug) printf ("\nchar %03x: ", i);
|
||||
+ for(j=0; j<descr.entry_ct; j++)
|
||||
+ if (list[j].fontpos == i) {
|
||||
+ if (debug)
|
||||
+ printf ("%04x ", list[j].unicode);
|
||||
appendunicode(fp, list[j].unicode, utf8);
|
||||
+ }
|
||||
appendseparator(fp, 0, utf8);
|
||||
}
|
||||
|
||||
+
|
||||
+ if (debug) printf ("\n");
|
||||
if (verbose)
|
||||
printf(_("Appended Unicode map\n"));
|
||||
}
|
||||
diff -ur kbd-1.12.orig/src/loadunimap.h kbd-1.12-0/src/loadunimap.h
|
||||
--- kbd-1.12.orig/src/loadunimap.h 1999-09-27 20:17:52.000000000 +0200
|
||||
+++ kbd-1.12-0/src/loadunimap.h 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -1,4 +1,10 @@
|
||||
/* loadunimap.h */
|
||||
+
|
||||
+#ifndef _LOADUNIMAP_H
|
||||
+#define _LOADUNIMAP_H
|
||||
+
|
||||
void saveunicodemap(int fd, char *oufil); /* save humanly readable */
|
||||
void loadunicodemap(int fd, char *ufil);
|
||||
void appendunicodemap(int fd, FILE *fp, int ct, int utf8);
|
||||
+
|
||||
+#endif /* _LOADUNIMAP_H */
|
||||
diff -ur kbd-1.12.orig/src/mapscrn.c kbd-1.12-0/src/mapscrn.c
|
||||
--- kbd-1.12.orig/src/mapscrn.c 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12-0/src/mapscrn.c 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "version.h"
|
||||
|
||||
int verbose = 0;
|
||||
+int debug = 0;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
diff -ur kbd-1.12.orig/src/paths.h kbd-1.12-0/src/paths.h
|
||||
--- kbd-1.12.orig/src/paths.h 1999-11-15 23:46:31.000000000 +0100
|
||||
+++ kbd-1.12-0/src/paths.h 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -28,3 +28,4 @@
|
||||
extern void fpclose(FILE *fp);
|
||||
|
||||
extern int verbose;
|
||||
+extern int debug;
|
||||
diff -ur kbd-1.12.orig/src/psf.h kbd-1.12-0/src/psf.h
|
||||
--- kbd-1.12.orig/src/psf.h 2001-02-09 13:58:44.000000000 +0100
|
||||
+++ kbd-1.12-0/src/psf.h 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -1,3 +1,5 @@
|
||||
+/* psf.h */
|
||||
+
|
||||
/*
|
||||
* Format of a psf font file:
|
||||
*
|
||||
@@ -30,6 +32,9 @@
|
||||
* namely when there is no precomposed Unicode value for the glyph.
|
||||
*/
|
||||
|
||||
+#ifndef _PSF_H
|
||||
+#define _PSF_H
|
||||
+
|
||||
|
||||
#define PSF1_MAGIC0 0x36
|
||||
#define PSF1_MAGIC1 0x04
|
||||
@@ -91,3 +96,5 @@
|
||||
#define PSF2_MAGIC_OK(x) ((x)[0]==PSF2_MAGIC0 && (x)[1]==PSF2_MAGIC1 \
|
||||
&& (x)[2]==PSF2_MAGIC2 && (x)[3]==PSF2_MAGIC3)
|
||||
|
||||
+
|
||||
+#endif /* _PSF_H */
|
||||
diff -ur kbd-1.12.orig/src/psffontop.c kbd-1.12-0/src/psffontop.c
|
||||
--- kbd-1.12.orig/src/psffontop.c 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12-0/src/psffontop.c 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "psf.h"
|
||||
#include "psffontop.h"
|
||||
#include "utf8.h"
|
||||
+#include "paths.h"
|
||||
|
||||
extern char *progname;
|
||||
|
||||
@@ -32,16 +33,18 @@
|
||||
|
||||
static void
|
||||
addseq(struct unicode_list *up, unsigned int uc) {
|
||||
- struct unicode_list *ul;
|
||||
struct unicode_seq *us;
|
||||
+ struct unicode_seq *usl;
|
||||
+ struct unicode_list *ul = up->prev;
|
||||
|
||||
- ul = up->prev;
|
||||
+ usl = ul->seq;
|
||||
+ while (usl->next) usl = usl->next;
|
||||
us = xmalloc(sizeof(struct unicode_seq));
|
||||
us->uc = uc;
|
||||
- us->prev = ul->seq->prev;
|
||||
- us->prev->next = us;
|
||||
+ us->prev = usl;
|
||||
us->next = NULL;
|
||||
- ul->seq->prev = us;
|
||||
+ usl->next = us;
|
||||
+ //ul->seq->prev = us;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
@@ -190,7 +193,7 @@
|
||||
* just read the entire file.
|
||||
*/
|
||||
if (fontf) {
|
||||
- inputbuflth = 16384; /* random */
|
||||
+ inputbuflth = MAXFONTSIZE/4; /* random */
|
||||
inputbuf = xmalloc(inputbuflth);
|
||||
n = 0;
|
||||
|
||||
@@ -366,6 +369,13 @@
|
||||
perror("appendunimap");
|
||||
exit(1);
|
||||
}
|
||||
+ if (debug) {
|
||||
+ printf ("(");
|
||||
+ if (!utf8)
|
||||
+ printf ("U+");
|
||||
+ while (n < 6) printf ("%02x ", out[n++]);
|
||||
+ printf (")");
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
@@ -437,7 +447,7 @@
|
||||
}
|
||||
|
||||
|
||||
-void
|
||||
+int
|
||||
writepsffont(FILE *ofil, char *fontbuf, int width, int height, int fontlen,
|
||||
int psftype, struct unicode_list *uclistheads) {
|
||||
int bytewidth, charsize, flags, utf8, i;
|
||||
@@ -456,7 +466,8 @@
|
||||
utf8 = (psftype == 2);
|
||||
|
||||
fwrite(fontbuf, charsize, fontlen, ofil);
|
||||
- if (uclistheads != NULL) {
|
||||
+ /* unimaps: -1 => do nothing: caller will append map */
|
||||
+ if (uclistheads != NULL && uclistheads != (struct unicode_list*)-1) {
|
||||
struct unicode_list *ul;
|
||||
struct unicode_seq *us;
|
||||
|
||||
@@ -475,5 +486,6 @@
|
||||
appendseparator(ofil, 0, utf8);
|
||||
}
|
||||
}
|
||||
+ return utf8;
|
||||
}
|
||||
|
||||
diff -ur kbd-1.12.orig/src/psffontop.h kbd-1.12-0/src/psffontop.h
|
||||
--- kbd-1.12.orig/src/psffontop.h 2000-12-31 15:22:17.000000000 +0100
|
||||
+++ kbd-1.12-0/src/psffontop.h 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -1,3 +1,11 @@
|
||||
+/* psffontop.h */
|
||||
+
|
||||
+#ifndef _PSFFONTOP_H
|
||||
+#define _PSFFONTOP_H
|
||||
+
|
||||
+/* Maximum font size that we try to handle */
|
||||
+#define MAXFONTSIZE 65536
|
||||
+
|
||||
typedef unsigned int unicode;
|
||||
|
||||
struct unicode_seq {
|
||||
@@ -17,7 +25,7 @@
|
||||
int *fontwidthp, int *fontlenp, int fontpos0,
|
||||
struct unicode_list **uclistheadsp);
|
||||
|
||||
-extern void writepsffont(FILE *ofil, char *fontbuf,
|
||||
+extern int writepsffont(FILE *ofil, char *fontbuf,
|
||||
int width, int height, int fontlen, int psftype,
|
||||
struct unicode_list *uclistheads);
|
||||
|
||||
@@ -29,3 +37,5 @@
|
||||
|
||||
extern void appendunicode(FILE *fp, unsigned int uc, int utf8);
|
||||
extern void appendseparator(FILE *fp, int seq, int utf8);
|
||||
+
|
||||
+#endif /* _PSFFONTOP_H */
|
||||
diff -ur kbd-1.12.orig/src/psfxtable.c kbd-1.12-0/src/psfxtable.c
|
||||
--- kbd-1.12.orig/src/psfxtable.c 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12-0/src/psfxtable.c 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -225,6 +225,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
+int debug = 0;
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
char *ifname, *ofname, *itname, *otname;
|
||||
diff -ur kbd-1.12.orig/src/setfont.c kbd-1.12-0/src/setfont.c
|
||||
--- kbd-1.12.orig/src/setfont.c 2004-01-16 20:45:31.000000000 +0100
|
||||
+++ kbd-1.12-0/src/setfont.c 2004-02-26 21:55:25.000000000 +0100
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
int verbose = 0;
|
||||
int force = 0;
|
||||
+int debug = 0;
|
||||
|
||||
/* search for the font in these directories (with trailing /) */
|
||||
char *fontdirpath[] = { "", DATADIR "/" FONTDIR "/", 0 };
|
||||
@@ -331,15 +332,28 @@
|
||||
up = xmalloc(maxct * sizeof(struct unipair));
|
||||
for (i = 0; i < fontsize; i++) {
|
||||
ul = uclistheads[i].next;
|
||||
+ if (debug) printf ("char %03x:", i);
|
||||
while(ul) {
|
||||
us = ul->seq;
|
||||
if (us && ! us->next) {
|
||||
up[ct].unicode = us->uc;
|
||||
up[ct].fontpos = i;
|
||||
ct++;
|
||||
+ if (debug) printf (" %04x", us->uc);
|
||||
}
|
||||
+ else
|
||||
+ if (debug) {
|
||||
+ printf (" seq: <");
|
||||
+ while (us) {
|
||||
+ printf (" %04x", us->uc);
|
||||
+ us = us->next;
|
||||
+ }
|
||||
+ printf (" >");
|
||||
+ }
|
||||
ul = ul->next;
|
||||
+ if (debug) printf (",");
|
||||
}
|
||||
+ if (debug) printf ("\n");
|
||||
}
|
||||
if (ct != maxct) {
|
||||
char *u = _("%s: bug in do_loadtable\n");
|
15
kbd-1.12.lsm
Normal file
15
kbd-1.12.lsm
Normal file
@ -0,0 +1,15 @@
|
||||
Begin3
|
||||
Title: Keyboard and console utilities for Linux
|
||||
Version: 1.12
|
||||
Entered-date: 2004-01-16
|
||||
Description: loadkeys dumpkeys setfont chvt openvt kbdrate kbd.FAQ A20 etc.
|
||||
Keywords: keyboard mapping console font unicode
|
||||
Author: several
|
||||
Maintained-by: Andries E. Brouwer (aeb@cwi.nl)
|
||||
Primary-site: ftp://ftp.win.tue.nl/pub/linux-local/utils/kbd
|
||||
884827 kbd-1.12.tar.gz
|
||||
Alternate-site: ftp://ftp.*.kernel.org/pub/linux/utils/kbd
|
||||
Alternate-site: ftp://sunsite.unc.edu/pub/Linux/system/keyboards
|
||||
Alternate site: ftp://ftp.cwi.nl/pub/aeb/kbd
|
||||
Copying-policy: GPL
|
||||
End
|
3
kbd-1.12.tar.bz2
Normal file
3
kbd-1.12.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:22dd61453c6f5feffc2170118edb151c9eda2dee8bdc98d71e5b8f5be671de75
|
||||
size 635392
|
1146
kbd.changes
Normal file
1146
kbd.changes
Normal file
File diff suppressed because it is too large
Load Diff
29
kbd.fillup
Normal file
29
kbd.fillup
Normal file
@ -0,0 +1,29 @@
|
||||
#
|
||||
# Compose tables to be loaded.
|
||||
# Compose tables are good for producing characters, which can not
|
||||
# be directly input from your keyboard, such as characters with
|
||||
# accents, currency signs, ...
|
||||
# Please read /usr/share/doc/packages/kbd/README.SuSE for an
|
||||
# explanation.
|
||||
# You may leave this variable empty (default compose table from kernel
|
||||
# or KEYTABLE will be used then -- most keyboard maps don't have a
|
||||
# compose table, though)
|
||||
# More than one compose table can be given. For a selection of possible
|
||||
# tables see /usr/share/kbd/keymaps/include/compose.*
|
||||
# You can give more than one compose table, but only the last one will
|
||||
# determine the compose combinations.
|
||||
# The word "clear" has a special meaning:
|
||||
# Your compose table will be cleared, before more compose symbols are
|
||||
# added.
|
||||
# The files compose.winkeys and shiftctrl may be used to map the
|
||||
# <compose> key to the W*n menu key and Shift-Ctrl, respectively,
|
||||
# on a PC keyboard.
|
||||
# A typical setting for Latin1 users (with a PC keyboard) may be
|
||||
# COMPOSETABLE="clear winkeys shiftctrl latin1.add"
|
||||
# For latin2, this would be
|
||||
# COMPOSETABLE="clear winkeys shiftctrl latin2"
|
||||
# A typical setting for sb. with a character set, where a matching
|
||||
# compose table is missing (but with a PC keyboard), would be
|
||||
# COMPOSETABLE="winkeys shiftctrl"
|
||||
#
|
||||
COMPOSETABLE="clear winkeys shiftctrl latin1.add"
|
29
kbd.fillup.nonpc
Normal file
29
kbd.fillup.nonpc
Normal file
@ -0,0 +1,29 @@
|
||||
#
|
||||
# Compose tables to be loaded.
|
||||
# Compose tables are good for producing characters, which can not
|
||||
# be directly input from your keyboard, such as characters with
|
||||
# accents, currency signs, ...
|
||||
# Please read /usr/share/doc/packages/kbd/README.SuSE for an
|
||||
# explanation.
|
||||
# You may leave this variable empty (default compose table from kernel
|
||||
# or KEYTABLE will be used then -- most don't have one, though)
|
||||
# More than one compose table can be given. For a selection of possible
|
||||
# tables see /usr/share/kbd/keymaps/include/compose.*
|
||||
# You can give more than one compose table, but only the last one will
|
||||
# determine the compose combinations.
|
||||
# The word "clear" has a special meaning:
|
||||
# Your compose table will be cleared, before more compose symbols are
|
||||
# added.
|
||||
# The files compose.winkeys and shiftctrl may be used to map the
|
||||
# <compose> key to the W*n menu key and Shift-Ctrl, respectively,
|
||||
# on a PC keyboard.
|
||||
# A typical setting for Latin1 users (with a PC keyboard) may be
|
||||
# COMPOSETABLE="clear winkeys shiftctrl latin1.add"
|
||||
# For latin2, this would be
|
||||
# COMPOSETABLE="clear winkeys shiftctrl latin2"
|
||||
# A typical setting for sb. with a character set, where a matching
|
||||
# compose table is missing (but with a PC keyboard), would be
|
||||
# COMPOSETABLE="winkeys shiftctrl"
|
||||
# For non-PC keyboards, don't use winkeys and shiftctrl ...
|
||||
#
|
||||
COMPOSETABLE="clear latin1.add"
|
460
kbd.init
Normal file
460
kbd.init
Normal file
@ -0,0 +1,460 @@
|
||||
#! /bin/sh
|
||||
# Copyright (c) 1995-2005 SUSE LINUX Products AG, Nuernberg, Germany.
|
||||
#
|
||||
# Author: Burchard Steinbild
|
||||
# Werner Fink <werner@suse.de>
|
||||
#
|
||||
# Please send feedback to http://www.suse.de/feedback
|
||||
#
|
||||
# /etc/init.d/kbd
|
||||
#
|
||||
# and symbolic its link
|
||||
#
|
||||
# /sbin/rckbd
|
||||
#
|
||||
# Warning:
|
||||
# /etc/init.d/earlykbd can run this script even if
|
||||
# the Required-Start conditions listed here are not satisfied.
|
||||
# Our use of $remote_fs is
|
||||
# /usr/share/kbd - for finding keymaps
|
||||
# /usr/sbin/hwinfo - for numlock from bios
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: kbd
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop:
|
||||
# X-SuSE-Should-Start: fbset setserial earlykbd
|
||||
# X-SuSE-Should-Stop:
|
||||
# Default-Start: 1 2 3 5 S
|
||||
# Default-Stop:
|
||||
# Description: Keyboard settings (don't disable!)
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/rc.status
|
||||
. /etc/sysconfig/console
|
||||
. /etc/sysconfig/keyboard
|
||||
|
||||
test -n "$KBD_VERBOSE" && set -x
|
||||
|
||||
test -e /etc/SuSEconfig/profile && . /etc/SuSEconfig/profile
|
||||
test -e /etc/profile.d/lang.sh && . /etc/profile.d/lang.sh
|
||||
LOCALE_CHARMAP=`locale charmap`
|
||||
LC_ALL=POSIX
|
||||
|
||||
MACHINE=`/bin/uname -m 2> /dev/null`
|
||||
if [ "$MACHINE" = "sparc" -o "$MACHINE" = "sparc64" ]; then
|
||||
# Test if we have a serial console.
|
||||
(test -c /dev/tty1 && > /dev/tty1 ) > /dev/null 2>&1 || exit 0
|
||||
fi
|
||||
# iSeries machines also exit, just a little further down...
|
||||
|
||||
# The variable NON_SUSE_KERNEL determines whether we need to chvt
|
||||
# to a console before some console settings apply.
|
||||
# We have no magic to find out about this (at boot time), so we
|
||||
# leave it to the user to read this comment and put NON_SUSE_KERNEL="yes"
|
||||
# into /etc/sysconfig/console
|
||||
|
||||
test "$NON_SUSE_KERNEL" = "yes" && FGCONS=`/bin/fgconsole`
|
||||
|
||||
KBDBASE="/usr/share/kbd"
|
||||
|
||||
KTABLE=${KEYTABLE%.map*}
|
||||
KTABLE=${KTABLE##*/}
|
||||
|
||||
#
|
||||
# first search the wanted keytable.
|
||||
#
|
||||
if [ $MACHINE = ppc -o $MACHINE = ppc64 ]; then
|
||||
test -f /proc/cpuinfo || mount -n -t proc proc /proc 2>/dev/null
|
||||
while read line; do
|
||||
case "$line" in
|
||||
*MacRISC*) MACHINE="mac"
|
||||
test -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes && \
|
||||
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
|
||||
;;
|
||||
*CHRP*) MACHINE="chrp";;
|
||||
*PReP*) MACHINE="prep" ;;
|
||||
*iSeries*) exit 0 ;;
|
||||
esac
|
||||
done < /proc/cpuinfo
|
||||
fi
|
||||
|
||||
#
|
||||
# Calculate KBD_TTY array only once
|
||||
# Caution: Keep in sync with earlykbd.init
|
||||
#
|
||||
if test -z "$KBD_TTY"; then
|
||||
KBD_TTY="tty1 tty2 tty3 tty4 tty5 tty6 tty7 tty8 tty9
|
||||
tty10 tty11 tty12 tty13 tty14 tty15 tty16
|
||||
tty17 tty18 tty19 tty20 tty21 tty22 tty23 tty24"
|
||||
fi
|
||||
|
||||
newkbd=""
|
||||
for tty in $KBD_TTY; do
|
||||
test -w /dev/$tty || continue
|
||||
test -c /dev/$tty || continue
|
||||
> /dev/$tty &> /dev/null || continue
|
||||
newkbd="${newkbd:+$newkbd }/dev/$tty"
|
||||
done
|
||||
KBD_TTY="$newkbd"
|
||||
unset newkbd
|
||||
|
||||
#
|
||||
# load usb drivers in runlevel S
|
||||
#
|
||||
case "${PREVLEVEL}${RUNLEVEL}" in
|
||||
N1|NS)
|
||||
test -f /proc/cpuinfo || mount -n -t proc proc /proc 2>/dev/null
|
||||
|
||||
# [bugzilla #46113]
|
||||
# we come here although heading for runlevel 5.
|
||||
# I'll comment out diabling hotplug for now. jw.
|
||||
# test -f /proc/sys/kernel/hotplug && echo /bin/true > /proc/sys/kernel/hotplug 2>/dev/null
|
||||
test -d /proc/bus/usb || modprobe usbcore >/dev/null 2>&1
|
||||
mount -n -t usbfs usbfs /proc/bus/usb >/dev/null 2>&1
|
||||
for mod in ehci-hcd ohci-hcd uhci-hcd usb-ohci usb-uhci ; do
|
||||
echo -n $mod" "
|
||||
modprobe $mod >/dev/null 2>&1
|
||||
done
|
||||
echo
|
||||
echo "wait 3 seconds for USB initialisation ..."
|
||||
sleep 3
|
||||
for mod in usbhid input hid keybdev ; do
|
||||
modprobe $mod >/dev/null 2>&1
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
KEYMAP=""
|
||||
if test -e /$KEYTABLE ; then
|
||||
KEYMAP=$KEYTABLE
|
||||
else
|
||||
KEYTABLE=$KTABLE
|
||||
case "$KEYTABLE" in
|
||||
*.gz) KBDPATH="${KEYTABLE}" ;;
|
||||
*.map) KBDPATH="${KEYTABLE} ${KEYTABLE}.gz" ;;
|
||||
*) KBDPATH="${KEYTABLE} ${KEYTABLE}.gz ${KEYTABLE}.map.gz ${KEYTABLE}.map" ;;
|
||||
esac
|
||||
KEYMAP=$(find ${KBDBASE}/keymaps -type f \( -name ${KBDPATH// / -o -name } \))
|
||||
fi
|
||||
#
|
||||
# setup kbdrate and led status
|
||||
#
|
||||
function set_kbdrate ()
|
||||
{
|
||||
local line
|
||||
|
||||
if test "$MACHINE" != "mac" ; then
|
||||
KBDOPT=""
|
||||
if test -n "$KBD_RATE" ; then
|
||||
KBDOPT="${KBDOPT:+$KBDOPT }-r $KBD_RATE"
|
||||
fi
|
||||
if test -n "$KBD_DELAY"; then
|
||||
KBDOPT="${KBDOPT:+$KBDOPT }-d $KBD_DELAY"
|
||||
fi
|
||||
if test -n "$KBDOPT" ; then
|
||||
echo -n "Keyboard: "
|
||||
/bin/kbdrate $KBDOPT
|
||||
rc_status -v1
|
||||
fi
|
||||
fi
|
||||
|
||||
# setleds
|
||||
#
|
||||
# Note: The file /var/run/numlock-on is used in ~/.xinitrc
|
||||
# to reflect the correct numlock state choosen by the
|
||||
# user even under X11
|
||||
#
|
||||
if test "$KBD_NUMLOCK" = "yes"; then
|
||||
touch /var/run/numlock-on
|
||||
elif test "$KBD_NUMLOCK" = "no"; then
|
||||
rm -f /var/run/numlock-on
|
||||
elif test "$KBD_NUMLOCK" = "bios"; then
|
||||
if test -x /usr/sbin/hwinfo ; then
|
||||
/usr/sbin/hwinfo --bios | \
|
||||
while read line ; do
|
||||
case "$line" in
|
||||
Num\ Lock:\ on) touch /var/run/numlock-on ;;
|
||||
Num\ Lock:\ off) rm -f /var/run/numlock-on ;;
|
||||
Caps\ Lock:) break
|
||||
esac
|
||||
done
|
||||
else
|
||||
echo "no /usr/sbin -> Numlock off."
|
||||
rm -f /var/run/numlock-on
|
||||
fi
|
||||
fi
|
||||
unset line
|
||||
|
||||
#
|
||||
# Only change keyboard leds if setleds is in path
|
||||
#
|
||||
type -p setleds &> /dev/null || return
|
||||
|
||||
if test -e /var/run/numlock-on ; then
|
||||
LEDOPT="+num"
|
||||
else
|
||||
LEDOPT="-num"
|
||||
fi
|
||||
if test "$KBD_CAPSLOCK" = "yes"; then
|
||||
LEDOPT="$LEDOPT +caps"
|
||||
else
|
||||
LEDOPT="$LEDOPT -caps"
|
||||
fi
|
||||
if test "$KBD_SCRLOCK" = "yes"; then
|
||||
LEDOPT="$LEDOPT +scroll"
|
||||
else
|
||||
LEDOPT="$LEDOPT -scroll"
|
||||
fi
|
||||
|
||||
#
|
||||
# Only change keyboard leds if they will be switched
|
||||
# on ... OR if they are switched on currently
|
||||
#
|
||||
if [[ $LEDOPT == *+* ]] ; then
|
||||
touch /var/run/setleds-on
|
||||
else
|
||||
test -e /var/run/setleds-on || return
|
||||
test -n "$LEDOPT" || return
|
||||
rm -f /var/run/setleds-on
|
||||
fi
|
||||
|
||||
for tty in $KBD_TTY; do
|
||||
setleds -D $LEDOPT < $tty
|
||||
done
|
||||
}
|
||||
#
|
||||
rc_reset
|
||||
case "$1" in
|
||||
start|restart|reload|force-reload)
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
# don't do anything if we have this file.
|
||||
# this means that initialization was already done.
|
||||
# don't do it twice unless forced, it may annoy xdm and
|
||||
# produce lots of error messages.
|
||||
test -s /var/run/keymap && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if test -z "$KEYTABLE"; then
|
||||
echo "No keyboard map to load"
|
||||
else
|
||||
if test -z "$KEYMAP" || test ! -d "$KBDBASE" ; then
|
||||
if test -r /etc/defkeymap.map ; then
|
||||
if test -n "$KEYMAP" ; then
|
||||
echo "$KEYMAP is unvailable, using /etc/defkeymap.map instead."
|
||||
if test -r /var/run/keymap ; then
|
||||
read cached < /etc/defkeymap.name
|
||||
if test "$KEYMAP" != "$cached" && test $K != "$cached" ; then
|
||||
echo "Warning: fallback differs: $cached"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Can not find a keymap for ${KEYTABLE}, trying fallback."
|
||||
fi
|
||||
KEYMAP=/etc/defkeymap.map
|
||||
else
|
||||
echo "Fallback /etc/defkeymap.map not there."
|
||||
echo "Can not find a keymap for ${KEYTABLE}, Exit."
|
||||
rc_failed
|
||||
fi
|
||||
else
|
||||
if test ! -e "$KEYMAP" ; then
|
||||
echo "Found more than one keymap ${KEYTABLE}"
|
||||
KEYMAP=$K
|
||||
echo "Using $KEYMAP."
|
||||
echo "If you want another one, please add complete path to"
|
||||
echo "KEYTABLE in /etc/sysconfig/keyboard."
|
||||
fi
|
||||
fi
|
||||
rc_status && retmsg="`loadkeys -C "$KBD_TTY" $KEYMAP 2>&1`"
|
||||
if test $? -eq 0 && ( > /var/run/keymap ) > /dev/null 2>&1 ; then
|
||||
echo "$KEYMAP" > /var/run/keymap
|
||||
else
|
||||
case "$RUNLEVEL" in
|
||||
S|N|1|\#) true ;;
|
||||
*) rc_failed ;;
|
||||
esac
|
||||
fi
|
||||
echo "Loading keymap ${retmsg#Loading*${KBDBASE}/keymaps/}"
|
||||
rc_status -v1
|
||||
|
||||
set_kbdrate
|
||||
fi
|
||||
|
||||
# Disable CAPS LOCK key if wanted
|
||||
if test "$KBD_DISABLE_CAPS_LOCK" = "yes"; then
|
||||
loadkeys -C "$KBD_TTY" disable.capslock >/dev/null 2>&1 || echo "Could not disable Caps Lock"
|
||||
fi
|
||||
|
||||
# Load compose tables
|
||||
case "$RUNLEVEL" in
|
||||
S|N|1|\#) COMPOSETABLE="" ;;
|
||||
esac
|
||||
if test ! -z "$COMPOSETABLE"; then
|
||||
unset COMPOSELOADED COMPOSECLEAR
|
||||
for name in $COMPOSETABLE; do
|
||||
# Test for compose clear flag
|
||||
if test "$name" = "-c" -o "$name" = "clear"; then
|
||||
COMPOSECLEAR=-c
|
||||
continue
|
||||
fi
|
||||
# Handle the first table differently ...
|
||||
if test -z "$COMPOSELOADED"; then
|
||||
echo -n "Loading compose table $name"
|
||||
loadkeys -C "$KBD_TTY" $COMPOSECLEAR compose.$name >/dev/null 2>&1
|
||||
rc_check
|
||||
#if test $name = clear; then rc_reset; fi
|
||||
COMPOSELOADED=1
|
||||
else
|
||||
echo -n " $name"
|
||||
loadkeys -C "$KBD_TTY" compose.$name >/dev/null 2>&1
|
||||
rc_check
|
||||
fi
|
||||
done
|
||||
if test ! -z "$COMPOSELOADED"; then
|
||||
rc_status -v
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Unicode mode
|
||||
if test -x /bin/kbd_mode ; then
|
||||
case $LOCALE_CHARMAP in
|
||||
UTF-8)
|
||||
echo Start Unicode mode
|
||||
for tty in $KBD_TTY; do
|
||||
# The chvt is not needed for SuSE kernels
|
||||
test "$NON_SUSE_KERNEL" != "yes" || chvt ${tty#*tty}
|
||||
|
||||
# Tell the console output driver that the bytes
|
||||
# arriving are UTF-8 encoded multibyte sequences.
|
||||
echo -n -e '\033%G' > $tty
|
||||
|
||||
# Set the keyboard driver in Unicode mode.
|
||||
# (Default is ASCII mode.)
|
||||
# This really does nothing with the way normal
|
||||
# keys are handled in the kernel. All it does is:
|
||||
# - It is necessary for `dumpkeys' in order to
|
||||
# not drop U+XXXX entries from the keymaps.
|
||||
# - It is necessary for `loadkeys' in order to
|
||||
# avoid warnings.
|
||||
# - Unicode characters typed as Alt-x1 ... Alt-xn
|
||||
# (where x1,...,xn are digits on the numeric keypad)
|
||||
# will be emitted in UTF-8.
|
||||
kbd_mode -u -C $tty
|
||||
rc_status
|
||||
done
|
||||
;;
|
||||
*)
|
||||
echo Stop Unicode mode
|
||||
for tty in $KBD_TTY; do
|
||||
# The chvt is not needed for SuSE kernels
|
||||
test "$NON_SUSE_KERNEL" != "yes" || chvt ${tty#*tty}
|
||||
|
||||
echo -n -e '\033%@' > $tty
|
||||
|
||||
kbd_mode -a -C $tty
|
||||
rc_status
|
||||
done
|
||||
;;
|
||||
esac
|
||||
test "$NON_SUSE_KERNEL" != "yes" || chvt $FGCONS
|
||||
rc_status -v1
|
||||
fi
|
||||
|
||||
# setfont
|
||||
if test -d ${KBDBASE}/consolefonts -a \
|
||||
-n "$CONSOLE_FONT" -a "$CONSOLE_FONT" != "YAST_ASK"
|
||||
then
|
||||
if test ! -z "$CONSOLE_UNICODEMAP"; then
|
||||
UMAP="-u $CONSOLE_UNICODEMAP"
|
||||
fi
|
||||
if test ! -z "$CONSOLE_SCREENMAP"; then
|
||||
SMAP="-m $CONSOLE_SCREENMAP"
|
||||
fi
|
||||
PRINTABLE_MAGIC="";
|
||||
if test -n "$CONSOLE_MAGIC" -a "$CONSOLE_MAGIC" != "none"; then
|
||||
case $CONSOLE_MAGIC in
|
||||
\(B) PRINTABLE_MAGIC="G0:iso8859-1" ;;
|
||||
\(0) PRINTABLE_MAGIC="G0:vt100" ;;
|
||||
\(U) PRINTABLE_MAGIC="G0:ROM" ;;
|
||||
\(K) PRINTABLE_MAGIC="G0:loadable" ;;
|
||||
\)B) PRINTABLE_MAGIC="G1:iso8859-1" ;;
|
||||
\)0) PRINTABLE_MAGIC="G1:vt100" ;;
|
||||
\)U) PRINTABLE_MAGIC="G1:ROM" ;;
|
||||
\)K) PRINTABLE_MAGIC="G1:loadable" ;;
|
||||
*) PRINTABLE_MAGIC="magic='$CONSOLE_MAGIC'" ;;
|
||||
esac
|
||||
CONSOLE_MAGIC="\033$CONSOLE_MAGIC"
|
||||
else
|
||||
CONSOLE_MAGIC="";
|
||||
fi
|
||||
if test -x /bin/setfont ; then
|
||||
echo "Loading console font $CONSOLE_FONT $UMAP $SMAP $PRINTABLE_MAGIC"
|
||||
for tty in $KBD_TTY; do
|
||||
# The chvt is not needed for SuSE kernels
|
||||
test "$NON_SUSE_KERNEL" != "yes" || chvt ${tty#*tty}
|
||||
|
||||
/bin/setfont -C $tty $CONSOLE_FONT $UMAP $SMAP
|
||||
rc_status
|
||||
|
||||
echo -en "$CONSOLE_MAGIC" > $tty
|
||||
done
|
||||
test "$NON_SUSE_KERNEL" != "yes" || chvt $FGCONS
|
||||
rc_status -v1
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$RUNLEVEL" in
|
||||
S|N|1|\#) true ;;
|
||||
*)
|
||||
case $LOCALE_CHARMAP in
|
||||
UTF-8)
|
||||
# Change the keyboard mapping in such a way that the
|
||||
# non-ASCII keys produce UTF-8 encoded multibyte sequences
|
||||
# instead of single bytes >= 0x80 in a legacy 8-bit encoding.
|
||||
( dumpkeys | loadkeys -C "$KBD_TTY" --unicode ) > /dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
dumpkeys=yes
|
||||
if type -p cmp > /dev/null 2>&1 && \
|
||||
dumpkeys | cmp -s /etc/defkeymap.map
|
||||
then
|
||||
dumpkeys=no
|
||||
fi
|
||||
if test "$dumpkeys" = "yes" ; then
|
||||
( dumpkeys > /etc/defkeymap.map ) > /dev/null 2>&1
|
||||
if test ! -z "$KEYMAP" && test "$KEYMAP" != "/etc/defkeymap.map" ; then
|
||||
test ! -e "$KEYMAP" && KEYMAP=$K
|
||||
echo $KEYMAP > /etc/defkeymap.name
|
||||
fi
|
||||
fi
|
||||
esac
|
||||
|
||||
;;
|
||||
stop)
|
||||
# enable start after stop.
|
||||
echo -n "$0 stop"
|
||||
rm -f /var/run/keymap
|
||||
rc_status -v
|
||||
;;
|
||||
check|status)
|
||||
if test -r /var/run/keymap ; then
|
||||
read current < /var/run/keymap
|
||||
echo "Keymap $current is loaded."
|
||||
else
|
||||
rc_failed 3
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload|force-reload|status|check}"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
913
kbd.spec
Normal file
913
kbd.spec
Normal file
@ -0,0 +1,913 @@
|
||||
#
|
||||
# spec file for package kbd (Version 1.12)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: kbd
|
||||
URL: ftp://ftp.win.tue.nl/pub/home/aeb/linux-local/utils/kbd
|
||||
License: GNU General Public License (GPL) - all versions
|
||||
Group: System/Console
|
||||
Autoreqprov: on
|
||||
Version: 1.12
|
||||
Release: 80
|
||||
Summary: Keyboard and Font Utilities
|
||||
Source: ftp://ftp.win.tue.nl/pub/home/aeb/linux-local/utils/kbd/%{name}-%{version}.tar.bz2
|
||||
Source1: kbd_fonts.tar.bz2
|
||||
Source2: suse-add.tar.bz2
|
||||
Source3: README.SuSE
|
||||
Source4: kbd.init
|
||||
Source5: kbd.fillup
|
||||
Source6: kbd.fillup.nonpc
|
||||
Source7: earlykbd.init
|
||||
Source8: sysconfig.console
|
||||
Source9: sysconfig.keyboard
|
||||
Source10: testutf8.c
|
||||
Source42: convert-kbd-mac.sed
|
||||
Source43: repack_kbd.sh
|
||||
Patch: kbd-%{version}.diff
|
||||
Patch2: kbd-%{version}-prtscr_no_sigquit.diff
|
||||
Patch3: kbd-%{version}-swiss.diff
|
||||
Patch4: kbd-%{version}-Meta-Tab.diff
|
||||
Patch5: kbd-%{version}-noclaudio.diff
|
||||
Patch6: kbd-%{version}-nohang-kbdrate2.diff
|
||||
Patch7: kbd-%{version}-loadkeys-repstdout.diff
|
||||
Patch8: kbd-%{version}-mac-dk.diff
|
||||
Patch9: kbd-%{version}-dumpkeys-full.diff
|
||||
Patch10: kbd-%{version}-dumpkeys-ppc.diff
|
||||
Patch11: kbd-%{version}-mac-de.diff
|
||||
Patch12: kbd-%{version}-handle-small-table.diff
|
||||
Patch13: kbd-%{version}-unicode_scripts.diff
|
||||
Patch14: kbd-%{version}-cz-us-qwertz.diff
|
||||
Patch15: kbd-%{version}-nounicode-nontty.diff
|
||||
Patch16: kbd-%{version}-kbd_mode.diff
|
||||
Patch17: piofont_debug.diff
|
||||
Patch18: kbd-%{version}-be-nice-to-kdm.diff
|
||||
Patch19: kbd-%{version}-happy-abuild.diff
|
||||
Patch20: kbd-%{version}-strip.diff
|
||||
Patch21: kbd-%{version}-setfont-fpclose.diff
|
||||
Patch22: kbd-%{version}-showconsolefont-info.diff
|
||||
Patch23: kbd-%{version}-docu-X11R6-xorg.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %suse_version > 800
|
||||
PreReq: %fillup_prereq %insserv_prereq
|
||||
%endif
|
||||
|
||||
%description
|
||||
Load and save keyboard mappings. This is needed if you are not using
|
||||
the US keyboard map. This package also contains utilities for changing
|
||||
your console fonts. If you install this package, YaST includes an extra
|
||||
menu to allow you to choose between the different fonts. This package
|
||||
also includes fonts from the kbd_fonts.tar.gz package (by Paul
|
||||
Gortmaker) on Sunsite.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Andries Brouwer <aeb@cwi.nl>
|
||||
|
||||
%define kbdrate_in_util %(rpm -ql util 2>/dev/null | grep -s /sbin/kbdrate && echo "1" || echo "0"; exit 0)
|
||||
%define kbd /usr/share/kbd
|
||||
%prep
|
||||
%if %{kbdrate_in_util}
|
||||
echo "kbdrate is in util"
|
||||
%endif
|
||||
echo $RPM_BUILD_ROOT
|
||||
%setup -q -a 1 -a 2 -n kbd-%{version}
|
||||
%patch -p1 -E
|
||||
# choose-tty.diff went upstream, 27.2.2004, jw
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
|
||||
%build
|
||||
for i in `find data/keymaps/mac -type f` ; do
|
||||
sed -i -f %{S:42} $i
|
||||
done
|
||||
# bugzilla #33301, but noclobber.
|
||||
(cd data/keymaps/i386/qwerty; test -f se-latin1.map || cp sv-latin1.map se-latin1.map)
|
||||
./configure --prefix=/ --datadir=%{kbd} --mandir=%{_mandir}
|
||||
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Os"
|
||||
gcc $RPM_OPT_FLAGS -o testutf8 $RPM_SOURCE_DIR/testutf8.c
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/bin
|
||||
mkdir -p $RPM_BUILD_ROOT/sbin
|
||||
#mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||
#mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
DOC=${RPM_BUILD_ROOT}%{_defaultdocdir}/kbd
|
||||
KBD=%{kbd}
|
||||
K=$RPM_BUILD_ROOT$KBD
|
||||
mkdir -p $K/consolefonts
|
||||
# First install the fonts from the vfont package
|
||||
# (allowing kbd to overwrite some of them)
|
||||
mkdir -p $DOC/fonts
|
||||
install -m 644 fonts/README $DOC/fonts/README.fonts
|
||||
install -m 644 fonts/vfont-4.36/README $DOC/fonts/README.vfont-4.36
|
||||
install -m 644 fonts/vfont-5.10/README $DOC/fonts/README.vfont-5.10
|
||||
install -m 644 fonts/vfont-5.10/SCRIPT $DOC/fonts/SCRIPT.vfont-5.10
|
||||
rm -f fonts/vfont-5.10/SCRIPT fonts/*/README
|
||||
install -m 644 fonts/*/* $K/consolefonts/
|
||||
# Now call kbd install
|
||||
echo "# Now call kbd install DESTDIR=$RPM_BUILD_ROOT DATA_DIR=%{kbd} MAN_DIR=%{_mandir}"
|
||||
make DESTDIR=$RPM_BUILD_ROOT DATA_DIR=%{kbd} MAN_DIR=%{_mandir} install
|
||||
# ln -s iso01-12x22.psfu $K/consolefonts/suse12x22.psfu
|
||||
install -m 644 data/consolefonts/README* $DOC/fonts/
|
||||
install -m 644 data/consolefonts/ERRORS $DOC/fonts/
|
||||
mkdir -p $DOC/doc/
|
||||
install -m 644 doc/keysyms.h.info doc/kbd.FAQ.txt doc/kbd.FAQ*.html doc/README* doc/TODO $DOC/doc/
|
||||
install -m 644 doc/as400.kbd doc/console.docs doc/repeat/set_kbd_repeat-2 $DOC/doc/
|
||||
echo "See /usr/share/i18/charmaps for a description of char maps" >$DOC/doc/README.charmaps
|
||||
install -m 644 COPYING CHANGES CREDITS README $DOC/
|
||||
install %SOURCE3 $DOC/
|
||||
rm -f $K/consolefonts/README* $K/consolefonts/ERRORS.gz
|
||||
if ls $K/consolefonts/Agafari-* > /dev/null 2>&1; then
|
||||
echo "";
|
||||
echo "ERROR: Ethiopian Agafari fonts are for noncommercial distribution only."
|
||||
echo "please run repack_kbd.sh";
|
||||
echo "";
|
||||
exit 1
|
||||
fi
|
||||
install -m 755 %SOURCE4 $RPM_BUILD_ROOT/etc/init.d/kbd
|
||||
install -m 755 %SOURCE7 $RPM_BUILD_ROOT/etc/init.d/earlykbd
|
||||
ln -sf ../etc/init.d/kbd $RPM_BUILD_ROOT/sbin/rckbd
|
||||
ln -sf us.map.gz $K/keymaps/i386/qwerty/khmer.map.gz
|
||||
ln -sf us.map.gz $K/keymaps/i386/qwerty/korean.map.gz
|
||||
# Compatability links; don't know what the first three are good for.
|
||||
# The others are for yast/langselection and should be removed as soon as
|
||||
# yast knows about it.
|
||||
#ln -sf de-latin1-nodeadkeys.map.gz \
|
||||
# $K/keymaps/i386/qwertz/de-lat1-nd.map.gz
|
||||
#ln -sf ru1.map.gz $K/keymaps/i386/qwerty/russian.map.gz
|
||||
#ln -sf sg-latin1-lk450.map.gz \
|
||||
# $K/keymaps/i386/qwertz/sg-l1-lk450.map.gz
|
||||
# The next two links are for yast-language choise; should be obsolete
|
||||
# with the next yast version (on 6.1)
|
||||
#ln -sf lat1-16.psfu.gz $K/consolefonts/lat1u-16.psf.gz
|
||||
#ln -sf lat2-16.psfu.gz $K/consolefonts/lat2u-16.psf.gz
|
||||
#
|
||||
# This is for stupid default font search
|
||||
rm -f $K/consolefonts/default8x16.gz
|
||||
ln -sf default8x16.psfu.gz $K/consolefonts/default8x16.gz
|
||||
#
|
||||
rm -f $K/keymaps/i386/qwerty/*~ $K/keymaps/i386/qwerty/*,v
|
||||
#
|
||||
# this is until the Cyr* font are not part of the package
|
||||
rm -f $K/consolefonts/Cyr_a8x14.gz
|
||||
ln -sf Cyr_a8x14.psfu.gz $K/consolefonts/Cyr_a8x14.gz
|
||||
rm -f $K/consolefonts/Cyr_a8x16.gz
|
||||
ln -sf Cyr_a8x16.psfu.gz $K/consolefonts/Cyr_a8x16.gz
|
||||
rm -f $K/consolefonts/Cyr_a8x8.gz
|
||||
ln -sf Cyr_a8x8.psfu.gz $K/consolefonts/Cyr_a8x8.gz
|
||||
#
|
||||
find $K -name \*.orig | xargs -r rm -vf
|
||||
# add some missing maps to mac and remap french board
|
||||
(
|
||||
cd $K/keymaps/mac/all
|
||||
pwd
|
||||
#ln -s mac-fr-latin1.map.gz mac-fr_CH-latin1.map.gz
|
||||
#ln -s mac-fr-latin1.map.gz mac-fr.map.gz
|
||||
for i in \
|
||||
mac-es.map.gz \
|
||||
mac-it.map.gz \
|
||||
mac-pt-latin1.map.gz \
|
||||
mac-br-abnt2.map.gz \
|
||||
mac-gr.map.gz \
|
||||
mac-dk-latin1.map.gz \
|
||||
mac-no-latin1.map.gz \
|
||||
mac-fi-latin1.map.gz \
|
||||
mac-cz-us-qwertz.map.gz \
|
||||
mac-hu.map.gz \
|
||||
mac-Pl02.map.gz \
|
||||
mac-ru1.map.gz \
|
||||
mac-jp106.map.gz
|
||||
do test -f $i || ln -sv mac-us.map.gz $i
|
||||
done
|
||||
)
|
||||
FILLUP_DIR=$RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
mkdir -p $FILLUP_DIR
|
||||
install -o root -g root %SOURCE8 $FILLUP_DIR/sysconfig.console
|
||||
install -o root -g root %SOURCE9 $FILLUP_DIR/sysconfig.keyboard
|
||||
%ifarch %ix86 alpha ia64 x86_64
|
||||
cat %SOURCE5 >> $FILLUP_DIR/sysconfig.keyboard
|
||||
%else
|
||||
cat %SOURCE6 >> $FILLUP_DIR/sysconfig.keyboard
|
||||
%endif
|
||||
#mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
||||
#touch $RPM_BUILD_ROOT/etc/sysconfig/console
|
||||
%ifnarch %ix86
|
||||
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/resizecons.8*
|
||||
%endif
|
||||
%ifarch sparc m68k
|
||||
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/getkeycodes.8*
|
||||
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setkeycodes.8*
|
||||
%endif
|
||||
install -m 755 ./testutf8 $RPM_BUILD_ROOT/bin/
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv -npy console kbd}
|
||||
%{fillup_and_insserv -npY keyboard earlykbd}
|
||||
#echo "Please read the docu about the new COMPOSETABLE rc.config variable."
|
||||
#echo "See /etc/sysconfig/console, /etc/sysconfig/keyboard"
|
||||
#echo "and %{_docdir}/kbd/README.SuSE."
|
||||
|
||||
%postun
|
||||
%{insserv_cleanup}
|
||||
|
||||
%files
|
||||
#%config(noreplace) /etc/sysconfig/console
|
||||
%doc %{_defaultdocdir}/kbd
|
||||
#%doc COPYING CHANGES README CREDITS
|
||||
%config /etc/init.d/kbd
|
||||
%config /etc/init.d/earlykbd
|
||||
/var/adm/fillup-templates/sysconfig.console
|
||||
/var/adm/fillup-templates/sysconfig.keyboard
|
||||
%dir %{kbd}
|
||||
%{kbd}
|
||||
/usr/share/locale/*/LC_MESSAGES/kbd.mo
|
||||
/sbin/rckbd
|
||||
/bin/chvt
|
||||
/bin/openvt
|
||||
/bin/deallocvt
|
||||
/bin/dumpkeys
|
||||
%ifnarch sparc m68k
|
||||
/bin/getkeycodes
|
||||
/bin/setkeycodes
|
||||
%endif
|
||||
/bin/fgconsole
|
||||
/bin/kbd_mode
|
||||
/bin/loadkeys
|
||||
/bin/loadunimap
|
||||
/bin/mapscrn
|
||||
/bin/psfaddtable
|
||||
/bin/psfgettable
|
||||
/bin/psfstriptable
|
||||
/bin/psfxtable
|
||||
%ifarch %ix86
|
||||
/bin/resizecons
|
||||
%endif
|
||||
/bin/setfont
|
||||
/bin/setleds
|
||||
/bin/setmetamode
|
||||
/bin/showconsolefont
|
||||
/bin/showkey
|
||||
/bin/unicode_start
|
||||
/bin/unicode_stop
|
||||
%if ! %{kbdrate_in_util}
|
||||
/bin/kbdrate
|
||||
%doc %{_mandir}/man8/kbdrate.8.gz
|
||||
%endif
|
||||
/bin/testutf8
|
||||
%doc %{_mandir}/man1/chvt.1.gz
|
||||
%doc %{_mandir}/man1/deallocvt.1.gz
|
||||
%doc %{_mandir}/man1/dumpkeys.1.gz
|
||||
%doc %{_mandir}/man1/kbd_mode.1.gz
|
||||
%doc %{_mandir}/man1/loadkeys.1.gz
|
||||
%doc %{_mandir}/man1/psfaddtable.1.gz
|
||||
%doc %{_mandir}/man1/psfgettable.1.gz
|
||||
%doc %{_mandir}/man1/psfstriptable.1.gz
|
||||
%doc %{_mandir}/man1/psfxtable.1.gz
|
||||
%doc %{_mandir}/man1/setleds.1.gz
|
||||
%doc %{_mandir}/man1/setmetamode.1.gz
|
||||
%doc %{_mandir}/man1/showkey.1.gz
|
||||
%doc %{_mandir}/man1/fgconsole.1.gz
|
||||
%doc %{_mandir}/man5/keymaps.5.gz
|
||||
%ifnarch sparc m68k
|
||||
%doc %{_mandir}/man8/getkeycodes.8.gz
|
||||
%doc %{_mandir}/man8/setkeycodes.8.gz
|
||||
%endif
|
||||
%doc %{_mandir}/man8/showconsolefont.8.gz
|
||||
%doc %{_mandir}/man8/loadunimap.8.gz
|
||||
%doc %{_mandir}/man8/mapscrn.8.gz
|
||||
%ifarch %ix86
|
||||
%doc %{_mandir}/man8/resizecons.8.gz
|
||||
%endif
|
||||
%doc %{_mandir}/man8/setfont.8.gz
|
||||
%doc %{_mandir}/man1/openvt.1.gz
|
||||
%doc %{_mandir}/man1/unicode_start.1.gz
|
||||
%doc %{_mandir}/man1/unicode_stop.1.gz
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
#rm -rf $RPM_BUILD_DIR/kbd-%{version}
|
||||
|
||||
%changelog -n kbd
|
||||
* Mon Oct 23 2006 - olh@suse.de
|
||||
- update mac-de []|{} mapping to match the X11 and MacOS mapping
|
||||
* Fri Aug 11 2006 - jw@suse.de
|
||||
- mention both /usr/share/X11 and /usr/X11R6/lib/X11 in docu.
|
||||
* Wed Jul 26 2006 - jw@suse.de
|
||||
- added showconsolefont-info.diff,
|
||||
partial fix for #164378
|
||||
* Wed Jun 21 2006 - jw@suse.de
|
||||
- added some pclose(), fixing (#88501)
|
||||
* Tue Jun 06 2006 - jw@suse.de
|
||||
- $MAGIC should have been $CONSOLE_MAGIC (#181612)
|
||||
* Wed May 31 2006 - jw@suse.de
|
||||
- added consolefonts/cp850-full-* (#179528)
|
||||
derived from cp850 via setfont; loadunimap cp850; setfont -O
|
||||
* Tue Apr 25 2006 - jw@suse.de
|
||||
- added keymaps/i386/qwerty/cn-latin1.map (#158951)
|
||||
* Sun Apr 02 2006 - olh@suse.de
|
||||
- make Alt/Option key and Command/Apple key consistent with X11
|
||||
in the mac-* keymaps: flip them
|
||||
* Mon Mar 20 2006 - ms@suse.de
|
||||
- added korean console keyboard link ( korean -> us ) (#87443)
|
||||
* Tue Feb 07 2006 - ms@suse.de
|
||||
- added khmer console keyboard link ( khmer -> us )
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Fri Jan 13 2006 - schwab@suse.de
|
||||
- Don't strip binaries.
|
||||
* Sun Oct 02 2005 - schwab@suse.de
|
||||
- Remove useless distinction between different machines when finding the
|
||||
keymap.
|
||||
* Mon Aug 15 2005 - jw@suse.de
|
||||
- mac: fixed support for pc style keymaps
|
||||
bugzilla#98363
|
||||
* Thu Aug 04 2005 - jw@suse.de
|
||||
- sourcing /etc/profile.d/lang.sh for new dynamic language config
|
||||
* Tue Jul 12 2005 - jw@suse.de
|
||||
- removed Agafari fonts from source tar ball.
|
||||
bugzilla#95915
|
||||
* Thu Jul 07 2005 - jw@suse.de
|
||||
- revamped uninitialized.diff into happy-abuild.diff
|
||||
added declarations, added RPM_OPT_FLAGS where it was still missing.
|
||||
* Mon May 23 2005 - jw@suse.de
|
||||
- removing noncommercial Agafari fonts during install.
|
||||
* Tue May 17 2005 - jw@suse.de
|
||||
- used uninitialized fixed.
|
||||
* Fri May 13 2005 - jw@suse.de
|
||||
- convert-kbd-mac.sed: changed 58 from 100 to 125, to enable altgr
|
||||
thanks to olh.
|
||||
* Thu Mar 31 2005 - jw@suse.de
|
||||
- avoid probing of all /dev/$tty on *iseries*, as it causes
|
||||
-ENODEV errors. #74394
|
||||
* Mon Mar 14 2005 - jw@suse.de
|
||||
- new init script logic: earlykbd + kbd should now behave
|
||||
as werner designed it (using /var/run/keymap as lock).
|
||||
Fixes #65246, #71722, #72409 and possibly #65970
|
||||
* Tue Mar 08 2005 - jw@suse.de
|
||||
- magic printing second try.
|
||||
Better diagnostics to tackle #65246
|
||||
* Fri Mar 04 2005 - jw@suse.de
|
||||
- less obstrusive magic printing from kbd.init [fixes #65119]
|
||||
- loadkeys, setfont: neither annoy X-Servers nor print
|
||||
bogus error messages [fixes #63713, and possibly #65246]
|
||||
* Tue Dec 14 2004 - coolo@suse.de
|
||||
- adding an early boot script to load the cache created by last
|
||||
boot.
|
||||
* Mon Oct 25 2004 - jw@suse.de
|
||||
- new cz-lat2-us.map added, fixing #46829
|
||||
* Thu Sep 30 2004 - jw@suse.de
|
||||
- #45972 fixed: missing usbhid module added.
|
||||
- #46113 workaround: wrong write to /proc/sys/kernel/hotplug removed.
|
||||
- debug printf for unreproducable PIO_FONT error added.
|
||||
* Wed Sep 08 2004 - werner@suse.de
|
||||
- Faster boot: skip setleds if nothing is switched on and skip
|
||||
not needed virtual consoles
|
||||
* Mon Sep 06 2004 - werner@suse.de
|
||||
- More speed for the boot script by checking the vt's only once
|
||||
* Wed Mar 31 2004 - jw@suse.de
|
||||
- Bugzilla #37619: force-reload was missing in kbd.init
|
||||
* Tue Mar 30 2004 - mfabian@suse.de, werner@suse.de
|
||||
- Bugzilla #37367: add option "-C device" to kbd_mode and
|
||||
change /etc/init.d/kbd script to be able to set the mode for
|
||||
all console. Previously it worked only on the first console
|
||||
(/dev/tty1).
|
||||
* Tue Mar 30 2004 - jw@suse.de
|
||||
- iso09.f16n.psf from toganm@dinamizm.com added.
|
||||
That fixes bugzilla #37247
|
||||
* Wed Mar 03 2004 - ro@suse.de
|
||||
- fix typo in kbd rcscript
|
||||
* Fri Feb 27 2004 - jw@suse.de
|
||||
- upgrade to 1.12
|
||||
* updated getkeycodes, showkey for Linux 2.6 (fixing #33978)
|
||||
* maps updated: is-latin1.map, is-latin1-us.map, bg-cp1251.map,
|
||||
bg_bds-cp1251.map, bg_pho-cp1251.map, bg_bds-utf8.map,
|
||||
bg_pho-utf8.map, nl.map
|
||||
* renamed bg.map to bg-cp855.map
|
||||
* fonts: greek-polytonic.psfu
|
||||
* translations updated: pl.po, ro.po, cs.po, es.po, gr.po, es.po,
|
||||
nl.po, el.po, pl.po
|
||||
* new options: -C, openvt -e,
|
||||
* docu updates.
|
||||
- fixed #33301, swedish map renamed
|
||||
* Sat Nov 08 2003 - olh@suse.de
|
||||
- add convert-kbd-mac.sed to convert mac maps to 2.6 linuxkeycodes
|
||||
load usb drivers unconditionally in runlevel S
|
||||
* Thu Oct 30 2003 - schwab@suse.de
|
||||
- /etc/init.d/kbd: usbdevfs has been renamed to usbfs, use /proc/bus/usb
|
||||
instead.
|
||||
* Fri Oct 17 2003 - kukuk@suse.de
|
||||
- Really delete wrong manual pages
|
||||
* Fri Oct 17 2003 - kukuk@suse.de
|
||||
- Fix filelist for SPARC
|
||||
* Wed Oct 01 2003 - garloff@suse.de
|
||||
- #31927: kbdrate was not called due to wrong path. Fixed.
|
||||
- unicode_start: Collapse to one setfont call (as in initscript).
|
||||
* Fri Sep 19 2003 - garloff@suse.de
|
||||
- #31153: kbd_mode -a/-u is not good under X11. Skip unicode_start/
|
||||
stop dir non-tty devices.
|
||||
- Collapse setfont calls for font, unimap and screenmap into one.
|
||||
Otherwise the font is overridden with default8x16 again.
|
||||
* Tue Sep 16 2003 - garloff@suse.de
|
||||
- Fix bug #30097: When switching from cz-us-qwertz to us, y and
|
||||
z could be confused.
|
||||
* Tue Sep 16 2003 - garloff@suse.de
|
||||
- Add compose table compose.utf8 that uses symbolic names and thus
|
||||
works regardless of encoding. Most useful for UTF-8.
|
||||
- Fix bug #28481: We were writing the activation string to a read-
|
||||
only fd.
|
||||
* Thu Sep 11 2003 - mfabian@suse.de
|
||||
- Bugzilla #30411: redirect "plus before udiaeresis ignored" and
|
||||
similar warnings of "loadkeys --unicode" in Unicode_start
|
||||
to /dev/null.
|
||||
- Bugzilla #30496: don't write file to remember the keyboard
|
||||
map to /.kbd/.keymap_sv.
|
||||
- add program "testutf8" by Gerd Knorr <kraxel@suse.de> to be able
|
||||
to check whether a terminal is in UTF-8 mode or not.
|
||||
* Tue Sep 09 2003 - mfabian@suse.de
|
||||
- Bugzilla #28720: "kbd_mode", "setfont", and "fgconsole" have
|
||||
moved from /usr/bin/ -> /bin. Therefore, /etc/init.d/kbd
|
||||
stopped working correctly (I thought I had fixed #28720 before
|
||||
but because these binaries moved it broke again).
|
||||
* Sun Sep 07 2003 - mfabian@suse.de
|
||||
- save the old keymap in "unicode_start" and reload it in
|
||||
"unicode_stop" because "dumpkeys | loadkeys --unicode" cannot
|
||||
be reverted.
|
||||
* Tue Sep 02 2003 - mmj@suse.de
|
||||
- Add sysconfig metadata [#28855]
|
||||
* Thu Jul 31 2003 - kukuk@suse.de
|
||||
- serial was renamed to setserial [Bug #28353]
|
||||
* Thu Jul 31 2003 - garloff@suse.de
|
||||
- Fix dumpkeys fix [#28339].
|
||||
* Thu Jul 31 2003 - garloff@suse.de
|
||||
- Fix various DESTDIR ... related Makefile headaches
|
||||
- Port patches to 1.08, all binaries have been moved to /bin
|
||||
- Tentative fix for dumpkeys, using the large NR_KEYS from 2.6
|
||||
kernel but running on 2.4 [#28339]
|
||||
- Use RPM_OPT_FLAGS (with -Os appended)
|
||||
* Wed Jul 30 2003 - garloff@suse.de
|
||||
- Update to kbd-1.08:
|
||||
* loadkeys: fix for bison 1.50
|
||||
* Makefile cleanups
|
||||
* Patch to not map PrtScr to Ctrl-\ (but only Ctrl-PrtScr) merged
|
||||
* fi-latin1/9.map changed
|
||||
* bg-cp1251.map, il-heb.map, sr-cy.map, fr-latin9.map
|
||||
- Update to kbd-1.07:
|
||||
* showfont -> showconsolefont rename (clash with X)
|
||||
* loadkeys fixes: addfunc(), relative symlinks
|
||||
* getfd: Try devfs names as well
|
||||
* manpgae for fgconsole
|
||||
* cyr-sun16.psfu
|
||||
* swedish: rename to se-latin1.map to sv-latin1.map
|
||||
* cp1251_to_uni, koi8-r_to_uni, koi8-u_to_uni.trans
|
||||
* se-fi-* for Northern Sami
|
||||
* nl3.map -> nl.map
|
||||
* Fri Jun 06 2003 - mfabian@suse.de
|
||||
- fix Bugzilla #27141: add the necessary commands to setup the
|
||||
Linux consoles for Unicode or non-Unicode respectively
|
||||
to /etc/init.d/kbd, similar to what is done in
|
||||
/usr/sbin/{unicode_start,unicode_stop}.
|
||||
- remove installed but unpackaged file resizecons.8.gz
|
||||
* Tue Mar 11 2003 - garloff@suse.de
|
||||
- Add sysconfig metadata to sysconfig/console as well [Bug #22625]
|
||||
* Sat Mar 08 2003 - kukuk@suse.de
|
||||
- Don't reset the status, so that final result does not only
|
||||
report the status of the last command [Bug #19823]
|
||||
* Thu Feb 20 2003 - mmj@suse.de
|
||||
- Add sysconfig metadata [#22625]
|
||||
* Tue Feb 18 2003 - kukuk@suse.de
|
||||
- Don't set KBD_RATE and KBD_DELAY per default
|
||||
* Sat Dec 07 2002 - garloff@suse.de
|
||||
- Add compose.latin1.cedilla which is a variant which maps accented
|
||||
c to cedilla. [Bug #21008]
|
||||
- Use alarm(5) to limit waiting for (potentially non-existing) kbd
|
||||
controller instead of loop (with machine-dependent timeout).
|
||||
[Bug #22167]
|
||||
* Fri Nov 08 2002 - schwab@suse.de
|
||||
- Fix mac-de-latin1 keymap.
|
||||
- Fix misaligned columns in full table dump.
|
||||
- Don't clobber keycode 0 where it is valid.
|
||||
* Mon Oct 07 2002 - garloff@suse.de
|
||||
- Don't write "Loading <file>" to stdout when --mktable is used.
|
||||
[Bug #19952]
|
||||
- Use larger timeout waiting for keyboard controller.
|
||||
* Wed Sep 18 2002 - fehr@suse.de
|
||||
- add updated keymaps us-acentos.map and br-abnt2.map provided
|
||||
by miura@conectiva.com.br to suse-add.tar.bz2 (Bug #19791)
|
||||
* Mon Aug 26 2002 - sndirsch@suse.de
|
||||
- remember NumLock BIOS state in /var/run/numlock-on; required
|
||||
later for $HOME/.xinitrc (Bug #18248)
|
||||
* Sat Aug 24 2002 - olh@suse.de
|
||||
- do the symlinks really in mac/all
|
||||
* Mon Aug 19 2002 - garloff@suse.de
|
||||
- Add %%insserv_prereq and %%fillup_prereq (bug #17892)
|
||||
* Thu Aug 15 2002 - olh@suse.de
|
||||
- fix some keys with kbd-1.06-mac-dk.diff
|
||||
do the symlinks in mac/all instead of mac/
|
||||
* Mon Aug 05 2002 - olh@suse.de
|
||||
- merge boot.setup into rckbd (#16476)
|
||||
* Fri Jul 26 2002 - garloff@suse.de
|
||||
- Don't wait infinitely long for bit 1 of port 0x64 being 0.
|
||||
Blocker #17248.
|
||||
- Make loadkeys report successful keytable load to stdout instead
|
||||
of stderr. Bug #17168.
|
||||
* Wed Jul 24 2002 - olh@suse.de
|
||||
- do not run boot.setup on iSeries by accident, kbdrate is bad
|
||||
* Fri Jul 19 2002 - olh@suse.de
|
||||
- kbdrate does only work on PC style hardware, hangs on USB and ADB
|
||||
* Thu Jul 11 2002 - garloff@suse.de
|
||||
- Removed dangling link to www.claudio.ch (bug #16933)
|
||||
* Fri Jul 05 2002 - kukuk@suse.de
|
||||
- Use %%ix86 macro
|
||||
* Thu Jul 04 2002 - uli@suse.de
|
||||
- search for x86-64 keymaps in i386
|
||||
* Mon Jun 17 2002 - sndirsch@suse.de
|
||||
- sysconfig.keyboard: set KBD_NUMLOCK to "bios" (Bug #16594)
|
||||
* Fri Jun 14 2002 - olh@suse.de
|
||||
- no loadkezs, sane systems have <TAB>
|
||||
* Fri Jun 14 2002 - sndirsch@suse.de
|
||||
- boot.setup: handle Numlock depending on BIOS setting
|
||||
if KBD_NUMLOCK is set to "bios"
|
||||
- sysconfig.keyboard: added "bios" to KBD_NUMLOCK description
|
||||
* Mon Jun 10 2002 - garloff@suse.de
|
||||
- Convert some missing maps.
|
||||
* Fri Jun 07 2002 - garloff@suse.de
|
||||
- Convert Shift Tab to Meta_Tab. (#16512)
|
||||
* Thu Jun 06 2002 - garloff@suse.de
|
||||
- Add KBD_DISABLE_CAPS_LOCK feature.
|
||||
* Thu Jun 06 2002 - garloff@suse.de
|
||||
- Add kbd rate and delay report (#16050).
|
||||
- Move fbset to X-SuSE-Should-Start.
|
||||
* Sun Mar 17 2002 - garloff@suse.de
|
||||
- Fixed all i386 keymaps with 99(PtrScr) = Control_backslash
|
||||
to VoidSymbol (but keeping the old meaning with Control)
|
||||
Fixes bug #8380.
|
||||
* Sun Mar 17 2002 - garloff@suse.de
|
||||
- Changed init script to accept a keymap that is specified by
|
||||
absolute path. (Bug #14997)
|
||||
* Sun Mar 17 2002 - garloff@suse.de
|
||||
- Add some missing third (AltGr) functions to the number keys
|
||||
for fr_CH/de_CH-latin and sg-latin1. (Adresses bug #9368)
|
||||
* Tue Mar 12 2002 - olh@suse.de
|
||||
- load usb keyboard in runlevel s and 1 (#14253)
|
||||
* Mon Mar 04 2002 - garloff@suse.de
|
||||
- Add Rumanian keyboard layout (ro-latin2.map) donated by
|
||||
Manfred Pohler. (#13008)
|
||||
* Fri Mar 01 2002 - ro@suse.de
|
||||
- force activation of boot.setup using "Y"
|
||||
* Mon Feb 18 2002 - ro@suse.de
|
||||
- don't clobber return code with test
|
||||
* Thu Feb 14 2002 - garloff@suse.de
|
||||
- Revert chvt change by default, as it causes too much flickering
|
||||
of the screen. It can be manually enabled though. (#12151)
|
||||
* Tue Feb 12 2002 - ro@suse.de
|
||||
- added missing "fi" in boot.setup
|
||||
* Tue Feb 12 2002 - schwab@suse.de
|
||||
- Fix uses of chvt in init script.
|
||||
* Fri Feb 08 2002 - ro@suse.de
|
||||
- return (not implemented) for stop and (unknown) for status
|
||||
in boot.setup
|
||||
* Fri Feb 08 2002 - garloff@suse.de
|
||||
- Split /etc/sysconfig/console into keyboard and console.
|
||||
* Fri Feb 08 2002 - garloff@suse.de
|
||||
- Move keyboard data to /usr/share (it's not arch dependant)
|
||||
- Try to make setting console fonts work with non-SuSE kernels
|
||||
by using chvt. (bug #12151)
|
||||
* Fri Feb 08 2002 - garloff@suse.de
|
||||
- Remove duplicated data, rename conflicting
|
||||
- Don't map PrtScr to Control_backslash (SIGQUIT) by default,
|
||||
Control PrtScr will still produce it. (bug #8380)
|
||||
- Remove test for "none" ifr unicode and screenmaps ("none" can be
|
||||
different from not calling setfont)
|
||||
- Handle empty KEYTABLE (fixes bug #12976)
|
||||
- Clarified comments for the various CONSOLE settings
|
||||
* Fri Feb 08 2002 - garloff@suse.de
|
||||
- kbd-1.06:
|
||||
* Lots of our patches got merged :-)
|
||||
* Fonts added
|
||||
* lat7u.uni -> iso07u.uni, added lat7.uni
|
||||
* Scancode docs removed, see
|
||||
http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html
|
||||
* various minor corrections
|
||||
* Wed Feb 06 2002 - werner@suse.de
|
||||
- Add KBD_SCRLOCK variable to make it possible to enable this
|
||||
- Move setleds from /usr/bin to /sbin and set compatiblity symlink
|
||||
(mainly for infra red keyboards)
|
||||
* Sat Jan 12 2002 - garloff@suse.de
|
||||
- Move COMPOSETASBLE to /etc/sysconfig/console, where all the other
|
||||
console and keyboard related settings are.
|
||||
* Wed Jan 09 2002 - ro@suse.de
|
||||
- fixed typo in boot.setup
|
||||
* Tue Jan 08 2002 - ro@suse.de
|
||||
- moved COMPOSETABLE to /etc/sysconfig/keyboard (#12736)
|
||||
* Thu Dec 13 2001 - ro@suse.de
|
||||
- moved rc.config.d -> sysconfig
|
||||
* Tue Dec 11 2001 - schwab@suse.de
|
||||
- Fix boot script for last change.
|
||||
* Thu Dec 06 2001 - ro@suse.de
|
||||
- renamed rc.config.d.kbd to rc.config.d.console
|
||||
- fixed bug for ppc
|
||||
* Wed Dec 05 2001 - ro@suse.de
|
||||
- moved KBD related variables from aaa_base to here
|
||||
- moved boot.setup from aaa_base to here
|
||||
- use fillup_and_insserv macro
|
||||
* Fri Nov 30 2001 - olh@suse.de
|
||||
- handle the ppc64 in machine detection
|
||||
* Mon Sep 17 2001 - garloff@suse.de
|
||||
- Add loadkezs->loadkeys symlink (#10752)
|
||||
* Sat Sep 01 2001 - olh@suse.de
|
||||
- no keyboard on iSeries available
|
||||
* Wed Aug 29 2001 - olh@suse.de
|
||||
- allow querty/us.map.gz as KEYTABLE, fix mac-dk map
|
||||
* Wed Aug 08 2001 - olh@suse.de
|
||||
- handle ppc64 in KBDLIB path as i386
|
||||
* Mon Aug 06 2001 - kukuk@suse.de
|
||||
- Fix comment about init script location [Bug #9494]
|
||||
* Sat Jul 21 2001 - olh@suse.de
|
||||
- update search path for mac keymaps
|
||||
* Tue Jul 17 2001 - garloff@suse.de
|
||||
- changed return value of status to 3 if not running. Fixes
|
||||
bug #9052.
|
||||
* Wed Jul 11 2001 - bjacke@suse.de
|
||||
- switch , to . on number block for {de,fr}_CH keymaps
|
||||
* Sun Jun 17 2001 - schwab@suse.de
|
||||
- setfont: output activation string on selected console, not stdout.
|
||||
* Fri May 11 2001 - garloff@suse.de
|
||||
- Remove compose combinations from compose.latin1.add that have
|
||||
been merged into the official compose.latin1.
|
||||
* Fri May 11 2001 - garloff@suse.de
|
||||
- bzip2 sources.
|
||||
* Fri May 11 2001 - garloff@suse.de
|
||||
- Apply fixes to kbd iint script from Werner Fink:
|
||||
* Dump keymap to /etc/defkeymap after the compose table has been
|
||||
loaded. Do it whenever it changed.
|
||||
* In runlevels N, S, 1, we might not have /usr available.
|
||||
Don't issue tons of "failed" messages but be happy with
|
||||
defkeymap.
|
||||
* Tue May 08 2001 - garloff@suse.de
|
||||
- Remove redundant sun keymaps from suse-add.
|
||||
- Especially remove sunkeymap which reintroduces a fixed bug to kbd
|
||||
- Remove second .map from sunt4-no-latin1.map.map
|
||||
* Tue May 08 2001 - garloff@suse.de
|
||||
- On request of Andries (aeb): Removed the Shift-Ctrl mapping
|
||||
of Compose but instead put it on Ctrl-.
|
||||
- Added compose.ctrlperiod to achieve this.
|
||||
* Mon May 07 2001 - garloff@suse.de
|
||||
- Remove double fontwidth assignment (cosmetical)
|
||||
- Add fbset to init script prerequisites
|
||||
* Wed May 02 2001 - garloff@suse.de
|
||||
- Fix bug #7474: (defkeymap)
|
||||
keycode 97 = Control Compose is wrong. Use shift keycode ...
|
||||
- Make Shift-Ctrl and Ctrl-Shift behave the same
|
||||
- bzip2 the suse_add sources instead of gzip
|
||||
* Wed Apr 25 2001 - garloff@suse.de
|
||||
- Corrections to the file list:
|
||||
* Install fg_console
|
||||
* Install unicode_start/stop plus manpages
|
||||
* Don't install resizecons/manpage on non-i386 archs
|
||||
* Tue Apr 24 2001 - garloff@suse.de
|
||||
- correct y <-> z in mac-de_CH has erroneously been removed from
|
||||
last patch. Corrected.
|
||||
* Tue Apr 24 2001 - garloff@suse.de
|
||||
- Use KBD_TTY to determine which consoles need to be manipulated,
|
||||
not non-functional /dev/tty[1-24].
|
||||
* Tue Apr 24 2001 - garloff@suse.de
|
||||
- Add some sun keymaps from console-data to suse_add. (#6109)
|
||||
- Add original sun12x22.psfu and suse12x22 under its true name.
|
||||
* Mon Apr 23 2001 - garloff@suse.de
|
||||
- Finalized merging with 1.05: SuSE patch shrinked from 116k to
|
||||
9k :-)
|
||||
- fillup now defaults to clear the compose table in case one is
|
||||
loaded and gives some more examples.
|
||||
- Set font on all consoles /dev/tty[1-24] (bugzilla #5812)
|
||||
- install kbd_fonts before kbd, so the latter has the possibility
|
||||
to overwrite/update the fonts from the kbd_fonts pack
|
||||
* Sun Apr 22 2001 - bjacke@suse.de
|
||||
- correct y <-> z in mac-de_CH
|
||||
- add mac_dvorak keymap
|
||||
- move de_CH from qwerty to qwertz
|
||||
* Fri Apr 20 2001 - garloff@suse.de
|
||||
- Update to kbd-1.0.5 which incorporates the patches from olh and
|
||||
me.
|
||||
* Fri Mar 16 2001 - ro@suse.de
|
||||
- create directory sbin in buildroot
|
||||
* Sun Dec 17 2000 - garloff@suse.de
|
||||
- Fix lat5 fonts
|
||||
- ShiftCtrl now leaves the Ctrl scancodes untouched and just
|
||||
changes the ShiftCtrl meaning to Compose.
|
||||
* Wed Dec 13 2000 - olh@suse.de
|
||||
- use runlevel S and mount proc with -n
|
||||
* Fri Dec 08 2000 - schwab@suse.de
|
||||
- Use extended compose table also on ia64.
|
||||
- Fix typos.
|
||||
* Thu Dec 07 2000 - werner@suse.de
|
||||
- Add begin and end mark of LSB header
|
||||
- Move chvt, openvt, deallocvt to /bin and set link bak to /usr/bin
|
||||
* Wed Dec 06 2000 - garloff@suse.de
|
||||
- Argh: loadkeys does not merge the compose table; just the key
|
||||
definitions. Make compose.latin1.add include compose.latin1 and
|
||||
update docu accordingly to account for this.
|
||||
* Wed Dec 06 2000 - garloff@suse.de
|
||||
- Also include the mapping of the compose key in the COMPOSEMAP
|
||||
variable and offer winkeys and shiftctrl. Default on i386 and
|
||||
alpha.
|
||||
- Update README.SuSE to document this.
|
||||
- This together with the changes from Dec 4 should address the
|
||||
problems with some keytables (bug #4275).
|
||||
* Tue Dec 05 2000 - olh@suse.de
|
||||
- add mac-fr_CH.map
|
||||
* Mon Dec 04 2000 - garloff@suse.de
|
||||
- New startup script: Separate KEYMAP from COMPOSE maps. Add new
|
||||
rc.config variable COMPOSEMAP to allow setting of compose combi-
|
||||
nations defaulting to "latin1 latin1.add"
|
||||
- Disable the formerly patched in inclusion of compose maps in
|
||||
the keymaps, as we have a proper separation now.
|
||||
* Mon Dec 04 2000 - garloff@suse.de
|
||||
- Add de_CH ("schwyzerdütsch") keymap.
|
||||
- Initialize consoles 1-24 (instead of 1-6) with CONSOLE_MAGIC
|
||||
(Bugzilla #4468)
|
||||
* Tue Nov 28 2000 - kukuk@suse.de
|
||||
- New initscript in /etc/init.d
|
||||
* Fri Oct 20 2000 - kukuk@suse.de
|
||||
- Fix filelist on SPARC
|
||||
* Thu Oct 05 2000 - olh@suse.de
|
||||
- remove mac-de2-ext.map, obsolete
|
||||
* Thu Oct 05 2000 - olh@suse.de
|
||||
- check for /proc/cpuinfo before mounting proc
|
||||
* Tue Sep 12 2000 - olh@suse.de
|
||||
- mount proc on ppc, needed for runlevel S
|
||||
* Tue Aug 22 2000 - olh@suse.de
|
||||
- update spec file and use only one dif, add mac-pt map, fix maps
|
||||
* Sat Aug 05 2000 - garloff@suse.de
|
||||
- Only include kbdrate in kbd package, if it's not already in util
|
||||
If not, install it in /sbin, just like util did before.
|
||||
- Remove the README files and ERRORS from /usr/lib/kbd/consolefonts
|
||||
* Fri Aug 04 2000 - kukuk@suse.de
|
||||
- Add support for PS/2 keyboards and serial console on SPARC
|
||||
* Tue Aug 01 2000 - garloff@suse.de
|
||||
- Update to version 1.03wip adding support for a PSF format and
|
||||
UTF8, including sequences.
|
||||
- Apply old patches; split in mac keytables and general patch
|
||||
- Add support for fonts wider than 8 pixels
|
||||
- Map compose key (W*n95 Menu Key and Shift-RightCtrl) and include
|
||||
additional compose combinations for i386 us and de keymaps
|
||||
- Add suse12x22.psf font to suse-add.tar.gz and remove fonts, map,
|
||||
transtables that are already included in 1.03wip.
|
||||
- Add %%clean section to spec file
|
||||
- Install more docu and move font specific docu to a subdir
|
||||
- Add README.SuSE
|
||||
* Mon Jul 03 2000 - olh@suse.de
|
||||
- merge keymaps from 6.4 for mac, be,it,de_CH,fi,dk
|
||||
* Tue Jun 06 2000 - olh@suse.de
|
||||
- fix mac specific links to nonexistant maps,
|
||||
add mac/include to search path
|
||||
* Wed May 31 2000 - werner@suse.de
|
||||
- Import script code from boot.setup which is kbd specific
|
||||
- User new rc.status shell functions
|
||||
- Move S20kbd to S10kbd (after nfs import init)
|
||||
* Thu May 25 2000 - olh@suse.de
|
||||
- update us-map, get rid of misnamed maps
|
||||
use includes for mac-*
|
||||
* Mon May 08 2000 - wede@suse.de
|
||||
- suse-add: Lithuanian console fonts and mappings added:
|
||||
/usr/lib/kbd/consolefonts/lat7.psf.gz
|
||||
/usr/lib/kbd/consolefonts/lt-brim-8x14.psfu.gz
|
||||
/usr/lib/kbd/consoletrans/lt-brim.uni
|
||||
- kbd.spec: use of %%{_defaultdocdir}
|
||||
* Sun Apr 30 2000 - olh@suse.de
|
||||
- update mac-fr.map
|
||||
* Wed Apr 05 2000 - olh@suse.de
|
||||
- fix link to french mac map
|
||||
* Tue Mar 28 2000 - olh@suse.de
|
||||
- use Buildroot
|
||||
add some dummy maps for mac
|
||||
* Mon Mar 20 2000 - kukuk@suse.de
|
||||
- suse-add: Add more sun keymaps
|
||||
* Thu Mar 16 2000 - schwab@suse.de
|
||||
- kbd.rc: Use i386 keymaps also on ia64 and alpha.
|
||||
* Tue Feb 29 2000 - werner@suse.de
|
||||
- Close first part of bug #592
|
||||
* Search with shell tools not with find
|
||||
* Dump /etc/defkeymap.map if not exists
|
||||
* Use /etc/defkeymap.map as a fallback if no keymap is found
|
||||
- Move loadkeys from /usr/bin/ to /bin/ and set a symbolic link
|
||||
for backward compatibility
|
||||
- Add openvt to the file list
|
||||
* Sun Feb 27 2000 - kukuk@suse.de
|
||||
- Move /usr/man -> /usr/share/man
|
||||
* Thu Dec 09 1999 - olh@suse.de
|
||||
- Added i386 keys to mac-de.map, @|\~
|
||||
make Symlink mac -> ppc relative
|
||||
* Thu Nov 11 1999 - kukuk@suse.de
|
||||
- kbd.rc: Add support for SPARC.
|
||||
* Tue Sep 28 1999 - ml@suse.de
|
||||
- Added symlink keymaps/ppc -> keymaps/mac in specfile.
|
||||
Added lat9-[12,14,16].psfu consolefonts to suse_add.tar.gz
|
||||
* Mon Sep 13 1999 - bs@suse.de
|
||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
||||
* Thu Jul 01 1999 - ro@suse.de
|
||||
- don't try to write /var/run/keymap if mounted ro (closing bug 20)
|
||||
* Fri Jun 18 1999 - uli@suse.de
|
||||
- cleaned up patch
|
||||
* Wed Jun 16 1999 - uli@suse.de
|
||||
- patched de-latin1.map to allow usage of Euro symbol with
|
||||
lat0-* console fonts
|
||||
* Mon Jun 07 1999 - uli@suse.de
|
||||
- added br-abnt.map and us-acentos.map to suse-addon
|
||||
* Tue Apr 13 1999 - ml@suse.de
|
||||
- added lt.baltic.map to suse-addon
|
||||
* Sun Apr 11 1999 - ml@suse.de
|
||||
- added a patch for correct KOI8-U (Ukrainian) support
|
||||
- added screenmap for baltic to suse-addon
|
||||
* Tue Apr 06 1999 - ml@suse.de
|
||||
- added a patch harald könig for us.map
|
||||
* Mon Apr 05 1999 - ml@suse.de
|
||||
-switch to version 0.99; main change of package: gettext for nls-support
|
||||
-changes for us: removes the patches for sk-qwertz and sk-qwerty map
|
||||
and the map br-abnt2.map (included now)
|
||||
-added /usr/share/locale/*/LC_MESSAGES/kbd.mo to the %%files-section
|
||||
of the specfile for nls-support
|
||||
* Thu Mar 11 1999 - ml@suse.de
|
||||
- Changed to kbd-0.97
|
||||
- lat2u.uni -> now included -> removed from suse-diff
|
||||
- Pl02.map included into suse-addons and removed from diff
|
||||
- Same for br-abnt2.map
|
||||
- added ru3/4 map to suse-addon
|
||||
- renamed the suse-iso07-extensions to lat7u.*
|
||||
- removed #mkdir -p $DOC; #mv $K/consolefonts/README* $DOC/ "
|
||||
from specfile; now already included in kbd-0.97-makefile
|
||||
- added ./configure --datadir (which will be best?)
|
||||
- european default now lat1-16.psfu -> mantel & fehr
|
||||
- added Cyr_a*.psf* to suse-addons, removed old Cyr-files and set links
|
||||
- added cyralt.uni
|
||||
- patched sk-qwertz and sk-qwerty map
|
||||
* Mon Feb 01 1999 - ro@suse.de
|
||||
- resizecons is not built on alpha
|
||||
* Mon Jan 18 1999 - ml@suse.de
|
||||
- added finally iso07.uni (missed it on Fri Jan 8 10:28:24 MET 1999)
|
||||
To do this, two mv-commands in the spec-file have been added, that move
|
||||
iso.07.uni to iso07.uni.old and the new one to iso07.uni
|
||||
* Wed Jan 13 1999 - ml@suse.de
|
||||
- added latin2u.scrnmap
|
||||
- added sk-qwertz.map
|
||||
* Fri Jan 08 1999 - ml@suse.de
|
||||
- added lat2u-16.psf and lat2u.uni
|
||||
* Fri Jan 08 1999 - rolf@suse.de
|
||||
- added the following keymaps: br-abnt2, Pl02, sk-qwerty
|
||||
- added the new version of iso07 fonts with SuSE extensions including
|
||||
unicode map file
|
||||
* Sun Dec 13 1998 - bs@suse.de
|
||||
- removed /var/adm/setup/setup.fontconfig
|
||||
* Sat Dec 05 1998 - bs@suse.de
|
||||
- let start script say, that a "keymap" is loaded.
|
||||
* Thu Nov 26 1998 - bs@suse.de
|
||||
- made startup script a little bit smoother (let loadkeys not print
|
||||
a long path).
|
||||
* Thu Nov 19 1998 - bs@suse.de
|
||||
- fixed second find call.
|
||||
* Tue Nov 17 1998 - bs@suse.de
|
||||
- moved loadkeys to /usr/bin again (the kbd package does not work without
|
||||
a mounted /usr)
|
||||
- created /sbin/init.d/kbd
|
||||
- removed Makefile.Linux - was not used anymore :(
|
||||
* Thu Oct 29 1998 - ro@suse.de
|
||||
- output "Loading $KEYMAP" to stdout (not stderr)
|
||||
* Tue Sep 22 1998 - ro@suse.de
|
||||
- update to 0.96a
|
||||
- for glibc define _GNU_SOURCE where getopt is used
|
||||
* Mon Oct 20 1997 - ro@suse.de
|
||||
- ready for autobuild
|
||||
* Tue Jun 03 1997 - bs@suse.de
|
||||
- removed man page console.4.gz (included in ldpman)
|
||||
* Sun Apr 13 1997 - florian@suse.de
|
||||
- update to new version 0.93
|
||||
- mv documentation to /usr/doc
|
3
kbd_fonts.tar.bz2
Normal file
3
kbd_fonts.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c0e6b31377de1503e6351a0d2ba5c6c7651b2300685a90e6ec45cdf9d71c1726
|
||||
size 24112
|
18
piofont_debug.diff
Normal file
18
piofont_debug.diff
Normal file
@ -0,0 +1,18 @@
|
||||
--- kbd-1.12/src/kdfontop.c.orig 2004-10-01 13:44:47.788404680 +0000
|
||||
+++ kbd-1.12/src/kdfontop.c 2004-10-01 13:46:09.349005584 +0000
|
||||
@@ -268,6 +268,7 @@
|
||||
if (i == 0)
|
||||
return 0;
|
||||
if (errno != ENOSYS && errno != EINVAL) {
|
||||
+ fprintf(stderr, "%s: putfont: %d,%dx%d:failed: %d\n", progname, count, width, height, i);
|
||||
perror("putfont: PIO_FONTX");
|
||||
return -1;
|
||||
}
|
||||
@@ -276,6 +277,7 @@
|
||||
/* This will load precisely 256 chars, independent of count */
|
||||
i = ioctl(fd, PIO_FONT, buf);
|
||||
if (i) {
|
||||
+ fprintf(stderr, "%s: putfont: %d,%dx%d: failed: %d\n", progname, count, width, height, i);
|
||||
perror("putfont: PIO_FONT");
|
||||
return -1;
|
||||
}
|
35
repack_kbd.sh
Normal file
35
repack_kbd.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# repackage kbd source tar ball,
|
||||
# to remove fonts that forbid commercial distribution.
|
||||
#
|
||||
# 2005-07-11, jw@suse.de
|
||||
|
||||
tmpdir=`mktemp -d`
|
||||
|
||||
in=$1
|
||||
|
||||
case "$in" in
|
||||
*.tar.gz)
|
||||
tar zxf $in -C $tmpdir
|
||||
;;
|
||||
*.tgz)
|
||||
tar zxf $in -C $tmpdir
|
||||
;;
|
||||
*.tar.bz2)
|
||||
tar jxf $in -C $tmpdir
|
||||
;;
|
||||
*.tar)
|
||||
tar xf $in -C $tmpdir
|
||||
;;
|
||||
*)
|
||||
echo "hmm, '$in' is not a tar ball?"
|
||||
rmdir $tmpdir
|
||||
exit 1
|
||||
esac
|
||||
|
||||
echo removing files...
|
||||
find $tmpdir -iname \*agafari\* | tee /dev/tty | xargs rm
|
||||
tar jcf $in-repack.tar.bz2 -C $tmpdir .
|
||||
|
||||
rm -rf $tmpdir
|
3
suse-add.tar.bz2
Normal file
3
suse-add.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eed6b420fbce4597ff04de14292db3f35f101721008b3be6368c47209c97efb4
|
||||
size 35498
|
49
sysconfig.console
Normal file
49
sysconfig.console
Normal file
@ -0,0 +1,49 @@
|
||||
## Path: Hardware/Console
|
||||
## Description: Text console settings (see also Hardware/Keyboard)
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## ServiceRestart: kbd
|
||||
#
|
||||
# Console settings.
|
||||
# Note: The KBD_TTY setting from Hardware/Keyboard (sysconfig/keyboard)
|
||||
# also applies for the settings here.
|
||||
#
|
||||
# Load this console font on bootup:
|
||||
# (/usr/share/kbd/consolefonts/)
|
||||
#
|
||||
CONSOLE_FONT=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# Some fonts come without a unicode map.
|
||||
# (.psfu fonts supposedly have it, others often not.)
|
||||
# You can then specify the unicode mapping of your font
|
||||
# explicitly. (/usr/share/kbd/unimaps/)
|
||||
# Normally not needed.
|
||||
#
|
||||
CONSOLE_UNICODEMAP=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# Most programs output 8 bit characters, so you need a table to
|
||||
# translate those characters into unicode. That one can be specified
|
||||
# here. (/usr/share/kbd/consoletrans/)
|
||||
# (Note: If your console is in utf-8 mode you don't need this.)
|
||||
# If your code does not use a unicode mapping at all (because you
|
||||
# e.g. explicitly specified UNICODEMAP="none") you may circumvent
|
||||
# the translation via unicode, but load a map which directly maps
|
||||
# 8 bit output of your program to a font position.
|
||||
#
|
||||
CONSOLE_SCREENMAP=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# for some fonts the console has to be initialized with CONSOLE_MAGIC.
|
||||
# CONSOLE_MAGIC can be empty or have the values "(B", ")B", "(K" or ")K".
|
||||
# Normally not needed (automatically handled by setfont).
|
||||
#
|
||||
CONSOLE_MAGIC=""
|
||||
|
64
sysconfig.keyboard
Normal file
64
sysconfig.keyboard
Normal file
@ -0,0 +1,64 @@
|
||||
## Path: Hardware/Keyboard
|
||||
## Description: Keyboard settings
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## ServiceRestart: kbd
|
||||
#
|
||||
# Keyboard settings for the text console
|
||||
#
|
||||
# Keyboard mapping
|
||||
# (/usr/share/kbd/keymaps/)
|
||||
# e.g. KEYTABLE="de-latin1-nodeadkeys", "us" or empty for US settings
|
||||
#
|
||||
KEYTABLE=""
|
||||
|
||||
## Type: integer
|
||||
## Default:
|
||||
#
|
||||
# Keyboard delay time in ms (250, 500, 750, 1000)
|
||||
KBD_DELAY=""
|
||||
|
||||
## Type: string(2.0,2.1,2.3,2.5,2.7,3.0,3.3,3.7,4.0,4.3,4.6,5.0,5.5,6.0,6.7,7.5,8.0,8.6,9.2,10.0,10.9,12.0,13.3,15.0,16.0,17.1,18.5,20.0,21.8,24.0,26.7,30.0)
|
||||
## Default:
|
||||
#
|
||||
# Keyboard repeat rate (2.0 - 30.0)
|
||||
KBD_RATE=""
|
||||
|
||||
## Type: list(bios,yes,no)
|
||||
## Default: bios
|
||||
#
|
||||
# NumLock on? ("yes" or "no" or empty or "bios" for BIOS setting)
|
||||
KBD_NUMLOCK="bios"
|
||||
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
#
|
||||
# ScrollLock on? ("yes" or "no")
|
||||
KBD_SCRLOCK="no"
|
||||
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
#
|
||||
# CapsLock on? ("yes" or "no")
|
||||
KBD_CAPSLOCK="no"
|
||||
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
#
|
||||
# Disable CAPS LOCK and make it a normal Shift key?
|
||||
# (Ctrl Caps Lock will still toggle Caps Lock functionality)
|
||||
# Note that you need to tweak the xkb maps or use xmodmap
|
||||
# if you want to do the same under X-Windows. In ~/.Xmodmap:
|
||||
# keycode 0x42 = Shift_L Shift_L
|
||||
#
|
||||
KBD_DISABLE_CAPS_LOCK="no"
|
||||
|
||||
## Type: string
|
||||
## Default: "tty1 tty2 tty3 tty4 tty5 tty6"
|
||||
#
|
||||
# ttys for the above settings
|
||||
# Example: "tty1 tty2"
|
||||
# "" for all tty's
|
||||
#
|
||||
KBD_TTY="tty1 tty2 tty3 tty4 tty5 tty6"
|
||||
|
96
testutf8.c
Normal file
96
testutf8.c
Normal file
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright Gerd Knorr <kraxel@suse.de>, 2003
|
||||
*
|
||||
* small tool to figure whenever a tty runs in utf8 mode or not.
|
||||
* writes a utf-8 multibyte sequence and then checks how far the
|
||||
* cursor has been moved.
|
||||
*
|
||||
* return codes:
|
||||
* 0 - don't know (stdin isn't a terminal, timeout, some error, ...)
|
||||
* 1 - not in utf8
|
||||
* 2 - utf-8
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
struct termios saved_attributes;
|
||||
int saved_fl;
|
||||
void
|
||||
tty_raw()
|
||||
{
|
||||
struct termios tattr;
|
||||
fcntl(0,F_GETFL,&saved_fl);
|
||||
tcgetattr (0, &saved_attributes);
|
||||
fcntl(0,F_SETFL,O_NONBLOCK);
|
||||
memcpy(&tattr,&saved_attributes,sizeof(struct termios));
|
||||
tattr.c_lflag &= ~(ICANON|ECHO);
|
||||
tattr.c_cc[VMIN] = 1;
|
||||
tattr.c_cc[VTIME] = 0;
|
||||
tcsetattr (0, TCSAFLUSH, &tattr);
|
||||
}
|
||||
void
|
||||
tty_restore()
|
||||
{
|
||||
fcntl(0,F_SETFL,saved_fl);
|
||||
tcsetattr (0, TCSANOW, &saved_attributes);
|
||||
}
|
||||
int
|
||||
select_wait()
|
||||
{
|
||||
struct timeval tv;
|
||||
fd_set se;
|
||||
FD_ZERO(&se);
|
||||
FD_SET(0,&se);
|
||||
tv.tv_sec = 3;
|
||||
tv.tv_usec = 0;
|
||||
return select(1,&se,NULL,NULL,&tv);
|
||||
}
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
static char *teststr = "\r\xc3\xb6";
|
||||
static char *cleanup = "\r \r";
|
||||
static char *getpos = "\033[6n";
|
||||
char retstr[16];
|
||||
int pos,rc,row,col,verbose;
|
||||
verbose = 0;
|
||||
if (argc > 1 && 0 == strcmp(argv[1],"-v"))
|
||||
verbose = 1;
|
||||
if (!isatty(0) || !isatty(1)) {
|
||||
if (verbose)
|
||||
fprintf(stderr,"Not a tty.\n");
|
||||
exit(0);
|
||||
}
|
||||
tty_raw();
|
||||
write(1,teststr,strlen(teststr));
|
||||
write(1,getpos,strlen(getpos));
|
||||
for (pos = 0; pos < sizeof(retstr)-1;) {
|
||||
if (0 == select_wait())
|
||||
break;
|
||||
if (-1 == (rc = read(0,retstr+pos,sizeof(retstr)-1-pos))) {
|
||||
perror("read");
|
||||
exit(0);
|
||||
}
|
||||
pos += rc;
|
||||
if (retstr[pos-1] == 'R')
|
||||
break;
|
||||
}
|
||||
retstr[pos] = 0;
|
||||
write(1,cleanup,strlen(cleanup));
|
||||
tty_restore();
|
||||
rc = sscanf(retstr,"\033[%d;%dR",&row,&col);
|
||||
if (2 == rc && 2 == col) {
|
||||
if (verbose)
|
||||
fprintf(stderr,"Terminal is in UTF-8 mode.\n");
|
||||
exit(2);
|
||||
} else {
|
||||
if (verbose)
|
||||
fprintf(stderr,"Terminal is in byte mode.\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user