79 lines
2.3 KiB
Diff
79 lines
2.3 KiB
Diff
|
--- man/man1/dumpkeys.1.in
|
||
|
+++ man/man1/dumpkeys.1.in 2008-06-04 18:26:00.885947236 +0200
|
||
|
@@ -4,6 +4,7 @@
|
||
|
dumpkeys \- dump keyboard translation tables
|
||
|
.SH SYNOPSIS
|
||
|
.B dumpkeys
|
||
|
+.RI [ \-C\ '<vc>' | \-\-console='<vc>' ]
|
||
|
[
|
||
|
.B \-hilfn
|
||
|
.BI \-c charset
|
||
|
@@ -197,6 +198,12 @@ This option produces an output line `cha
|
||
|
loadkeys how to interpret the keymap. (For example, "division" is
|
||
|
0xf7 in iso-8859-1 but 0xba in iso-8859-8.)
|
||
|
.LP
|
||
|
+The affected console device can be specified using the
|
||
|
+.I -C
|
||
|
+(or
|
||
|
+.I --console
|
||
|
+) option. This option supports exactly one device name.
|
||
|
+.LP
|
||
|
.SH FILES
|
||
|
.PD 0
|
||
|
.TP 20
|
||
|
--- src/dumpkeys.c
|
||
|
+++ src/dumpkeys.c 2008-06-04 18:20:51.762445784 +0200
|
||
|
@@ -31,6 +31,7 @@
|
||
|
static int fd;
|
||
|
static int verbose;
|
||
|
static int nr_keys = 0; /* probably 112, 128, 256 or 512 */
|
||
|
+static char * console;
|
||
|
|
||
|
int keymap_index[MAX_NR_KEYMAPS]; /* inverse of good_keymap */
|
||
|
int good_keymap[MAX_NR_KEYMAPS], keymapnr, allocct;
|
||
|
@@ -560,6 +561,8 @@ valid options are:\n\
|
||
|
--funcs-only display only the function key strings\n\
|
||
|
--keys-only display only key bindings\n\
|
||
|
--compose-only display only compose key combinations\n\
|
||
|
+ -C <vc>\n\
|
||
|
+ --console=<vc> Indicate the virtual console device to be used.\n\
|
||
|
-c --charset="));
|
||
|
list_charsets(stderr);
|
||
|
fprintf(stderr, _("\
|
||
|
@@ -571,7 +574,7 @@ valid options are:\n\
|
||
|
|
||
|
int
|
||
|
main (int argc, char *argv[]) {
|
||
|
- const char *short_opts = "hilvsnf1S:c:V";
|
||
|
+ const char *short_opts = "hilvsnf1S:c:C:V";
|
||
|
const struct option long_opts[] = {
|
||
|
{ "help", no_argument, NULL, 'h' },
|
||
|
{ "short-info", no_argument, NULL, 'i' },
|
||
|
@@ -584,6 +587,7 @@ main (int argc, char *argv[]) {
|
||
|
{ "keys-only", no_argument, NULL, 'k' },
|
||
|
{ "compose-only",no_argument, NULL, 'd' },
|
||
|
{ "charset", required_argument, NULL, 'c' },
|
||
|
+ { "console", required_argument, NULL, 'C' },
|
||
|
{ "verbose", no_argument, NULL, 'v' },
|
||
|
{ "version", no_argument, NULL, 'V' },
|
||
|
{ NULL, 0, NULL, 0 }
|
||
|
@@ -642,6 +646,9 @@ main (int argc, char *argv[]) {
|
||
|
usage();
|
||
|
printf("charset \"%s\"\n", optarg);
|
||
|
break;
|
||
|
+ case 'C':
|
||
|
+ console = optarg;
|
||
|
+ break;
|
||
|
case 'V':
|
||
|
print_version_and_exit();
|
||
|
case 'h':
|
||
|
@@ -653,7 +660,7 @@ main (int argc, char *argv[]) {
|
||
|
if (optind < argc)
|
||
|
usage();
|
||
|
|
||
|
- fd = getfd(NULL);
|
||
|
+ fd = getfd(console);
|
||
|
|
||
|
find_nr_keys();
|
||
|
|