2014-09-18 11:57:55 +00:00
|
|
|
Index: docs/man/man1/dumpkeys.1.in
|
2010-09-06 15:36:50 +00:00
|
|
|
===================================================================
|
2017-09-27 18:52:42 +00:00
|
|
|
--- docs/man/man1/dumpkeys.1.in.orig
|
|
|
|
+++ docs/man/man1/dumpkeys.1.in
|
2008-06-05 15:31:52 +00:00
|
|
|
@@ -4,6 +4,7 @@
|
|
|
|
dumpkeys \- dump keyboard translation tables
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B dumpkeys
|
|
|
|
+.RI [ \-C\ '<vc>' | \-\-console='<vc>' ]
|
|
|
|
[
|
2017-09-27 18:52:42 +00:00
|
|
|
.\".B \-1Vdfhiklnstv
|
|
|
|
.B \-h \-\-help \-i \-\-short\-info \-l \-s \-\-long\-info
|
|
|
|
@@ -212,6 +213,12 @@ loadkeys how to interpret the keymap. (F
|
|
|
|
.B \-V \-\-version
|
|
|
|
Prints version number and exits.
|
2008-06-05 15:31:52 +00:00
|
|
|
.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
|
2010-09-06 15:36:50 +00:00
|
|
|
Index: src/dumpkeys.c
|
|
|
|
===================================================================
|
2017-09-27 18:52:42 +00:00
|
|
|
--- src/dumpkeys.c.orig
|
|
|
|
+++ src/dumpkeys.c
|
2020-03-05 00:25:17 +00:00
|
|
|
@@ -41,6 +41,8 @@ usage(int rc)
|
|
|
|
" -t, --funcs-only display only the function key strings;\n"
|
|
|
|
" -k, --keys-only display only key bindings;\n"
|
|
|
|
" -d, --compose-only display only compose key combinations;\n"
|
|
|
|
+ " -C <vc>\n"
|
|
|
|
+ " --console=<vc> Indicate the virtual console device to be used;\n"
|
|
|
|
" -c, --charset="));
|
2014-09-18 11:57:55 +00:00
|
|
|
lk_list_charsets(stderr);
|
2020-03-05 00:25:17 +00:00
|
|
|
fprintf(stderr, _(
|
|
|
|
@@ -55,7 +57,7 @@ usage(int rc)
|
2008-06-05 15:31:52 +00:00
|
|
|
|
2017-09-27 18:52:42 +00:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
- const char *short_opts = "hilvsnf1tkdS:c:V";
|
|
|
|
+ const char *short_opts = "hilvsnf1tkdS:C:c:V";
|
2008-06-05 15:31:52 +00:00
|
|
|
const struct option long_opts[] = {
|
2017-09-27 18:52:42 +00:00
|
|
|
{ "help", no_argument, NULL, 'h' },
|
|
|
|
{ "short-info", no_argument, NULL, 'i' },
|
2020-03-05 00:25:17 +00:00
|
|
|
@@ -68,6 +70,7 @@ int main(int argc, char *argv[])
|
2017-09-27 18:52:42 +00:00
|
|
|
{ "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 }
|
2020-03-05 00:25:17 +00:00
|
|
|
@@ -82,6 +85,7 @@ int main(int argc, char *argv[])
|
2017-09-27 18:52:42 +00:00
|
|
|
char funcs_only = 0;
|
|
|
|
char keys_only = 0;
|
|
|
|
char diac_only = 0;
|
2014-09-18 11:57:55 +00:00
|
|
|
+ char * console = NULL;
|
|
|
|
|
|
|
|
struct lk_ctx *ctx;
|
|
|
|
|
2020-03-05 00:25:17 +00:00
|
|
|
@@ -135,6 +139,9 @@ int main(int argc, char *argv[])
|
2014-09-18 11:57:55 +00:00
|
|
|
}
|
2008-06-05 15:31:52 +00:00
|
|
|
printf("charset \"%s\"\n", optarg);
|
|
|
|
break;
|
|
|
|
+ case 'C':
|
|
|
|
+ console = optarg;
|
|
|
|
+ break;
|
|
|
|
case 'V':
|
|
|
|
print_version_and_exit();
|
2020-03-05 00:25:17 +00:00
|
|
|
break;
|
|
|
|
@@ -150,7 +157,7 @@ int main(int argc, char *argv[])
|
2008-06-05 15:31:52 +00:00
|
|
|
if (optind < argc)
|
2020-03-05 00:25:17 +00:00
|
|
|
usage(EX_USAGE);
|
2008-06-05 15:31:52 +00:00
|
|
|
|
2017-09-27 18:52:42 +00:00
|
|
|
- if ((fd = getfd(NULL)) < 0)
|
|
|
|
+ if ((fd = getfd(console)) < 0)
|
|
|
|
kbd_error(EXIT_FAILURE, 0, _("Couldn't get a file descriptor referring to the console"));
|
2008-06-05 15:31:52 +00:00
|
|
|
|
2014-09-18 11:57:55 +00:00
|
|
|
/* check whether the keyboard is in Unicode mode */
|