summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2005-11-20 17:51:15 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-11-20 17:51:15 +0000
commit72bd6075e3c4c4a5b65157cd3c4a6d2f67fe1205 (patch)
tree68a8656b8833716088eb4a3f3d4dbd86e123d4f6 /packages
parent9c05b535df13b081ab17ee5317ef8584daf279ec (diff)
console-tools: added kbd_mode patch to change keyboard repeat rate
- patch provided by Matthias Goebl <oe@m.goebl.net> - close #478
Diffstat (limited to 'packages')
-rw-r--r--packages/console-tools/console-tools-0.3.2/kbdrate.patch73
-rw-r--r--packages/console-tools/console-tools_0.3.2.bb5
2 files changed, 76 insertions, 2 deletions
diff --git a/packages/console-tools/console-tools-0.3.2/kbdrate.patch b/packages/console-tools/console-tools-0.3.2/kbdrate.patch
new file mode 100644
index 0000000000..47d7ea54b9
--- /dev/null
+++ b/packages/console-tools/console-tools-0.3.2/kbdrate.patch
@@ -0,0 +1,73 @@
+Patch from Matthias Goebl <oe@m.goebl.net>
+Added via OE bugtracker: bug #478
+
+--- console-tools-0.3.2/kbdtools/kbd_mode.c.orig
++++ console-tools-0.3.2/kbdtools/kbd_mode.c
+@@ -29,11 +29,16 @@
+ OPT("-u --unicode ", _("UTF-8 mode (UNICODE)"));
+ OPT("-s --scancode ", _("scancode mode (RAW)"));
+ OPT(" --mode={8bit,keycode,unicode,scancode} ", _("set mode"));
++ OPT("-r --rate=RATE ", _("set repeat rate (default: 33)"));
++ OPT("-d --delay=DELAY ", _("set repeat delay (default: 250)"));
+
+ OPT("-h --help ", HELPDESC);
+ OPT("-V --version ", VERSIONDESC);
+ }
+
++int rate=-1;
++int delay=-1;
++
+ static int parse_cmdline (int argc, char *argv[])
+ {
+ int mode = -1;
+@@ -46,11 +51,13 @@
+ { "mode" , required_argument, NULL, 'm' },
+ { "scancode" , no_argument, NULL, 's' },
+ { "unicode" , no_argument, NULL, 'u' },
++ { "rate" , required_argument, NULL, 'r' },
++ { "delay" , required_argument, NULL, 'd' },
+ { NULL, 0, NULL, 0 }
+ };
+ int c;
+
+- while ( (c = getopt_long (argc, argv, "Vhaksu", long_opts, NULL)) != EOF)
++ while ( (c = getopt_long (argc, argv, "Vhaksur:d:", long_opts, NULL)) != EOF)
+ switch (c) {
+ case 'h':
+ usage ();
+@@ -58,6 +65,14 @@
+ case 'V':
+ version ();
+ exit(0);
++ case 'r':
++ rate = atoi(optarg);
++ mode = -2;
++ break;
++ case 'd':
++ delay = atoi(optarg);
++ mode = -2;
++ break;
+ case 'a':
+ mode = K_XLATE;
+ break;
+@@ -129,6 +144,20 @@
+ exit(0);
+ }
+
++ if ( rate != -1 || delay != -1 )
++ {
++ struct kbd_repeat kbd_rep;
++ kbd_rep.delay = delay;
++ kbd_rep.period = rate;
++ if (ioctl(fd, KDKBDREP, &kbd_rep))
++ {
++ fprintf(stderr, progname);
++ perror(_(": error setting keyboard repeat mode\n"));
++ exit(1);
++ }
++ if(mode==-2) exit(0);
++ }
++
+ if (ioctl(fd, KDSKBMODE, mode))
+ {
+ fprintf(stderr, progname);
diff --git a/packages/console-tools/console-tools_0.3.2.bb b/packages/console-tools/console-tools_0.3.2.bb
index 2a94a4f896..f7455825e0 100644
--- a/packages/console-tools/console-tools_0.3.2.bb
+++ b/packages/console-tools/console-tools_0.3.2.bb
@@ -1,12 +1,13 @@
SECTION = "base"
LICENSE = "GPL"
DESCRIPTION = "Allows you to set-up and manipulate the Linux console."
-PR = "r1"
+PR = "r2"
SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
file://codepage.patch;patch=1 \
file://configure.patch;patch=1 \
file://compile.patch;patch=1 \
+ file://kbdrate.patch;patch=1 \
file://config/*.m4"
export SUBDIRS = "fontfiletools vttools kbdtools screenfonttools contrib \
@@ -43,4 +44,4 @@ pkg_prerm_${PN} () {
update-alternatives --remove deallocvt deallocvt.${PN}
update-alternatives --remove openvt openvt.${PN}
}
-
+