diff options
author | Ran Benita <ran@unusedvar.com> | 2020-07-27 11:51:53 +0300 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2020-07-27 11:51:53 +0300 |
commit | 64bff65a6a548a36f8316a789660ffeab2a261b0 (patch) | |
tree | 448db7966892eb011a15cb312da1da52da3c1fe9 | |
parent | 81842f7fbbca2d7ce4fbfb36b21e215d102404f4 (diff) | |
download | libxkbcommon-64bff65a6a548a36f8316a789660ffeab2a261b0.tar.gz libxkbcommon-64bff65a6a548a36f8316a789660ffeab2a261b0.tar.bz2 libxkbcommon-64bff65a6a548a36f8316a789660ffeab2a261b0.zip |
tools/interactive-evdev: change --evdev-offset to --without-x11-offset
There is no reason to give full control rather than just enable/disable.
Signed-off-by: Ran Benita <ran@unusedvar.com>
-rw-r--r-- | tools/interactive-evdev.c | 16 | ||||
-rw-r--r-- | tools/xkbcli-interactive-evdev.1 | 5 |
2 files changed, 10 insertions, 11 deletions
diff --git a/tools/interactive-evdev.c b/tools/interactive-evdev.c index 36e7a14..8c14bd3 100644 --- a/tools/interactive-evdev.c +++ b/tools/interactive-evdev.c @@ -381,7 +381,7 @@ usage(FILE *fp, char *progname) " --report-state-changes (report changes to the state)\n" " --enable-compose (enable Compose)\n" " --consumed-mode={xkb|gtk} (select the consumed modifiers mode, default: xkb)\n" - " --evdev-offset=NUM (default: 8)\n" + " --without-x11-offset (don't add X11 keycode offset)\n" ); } @@ -408,7 +408,7 @@ main(int argc, char *argv[]) OPT_VARIANT, OPT_OPTION, OPT_KEYMAP, - OPT_EVDEV_OFFSET, + OPT_WITHOUT_X11_OFFSET, OPT_CONSUMED_MODE, OPT_COMPOSE, OPT_REPORT_STATE, @@ -421,7 +421,7 @@ main(int argc, char *argv[]) {"variant", required_argument, 0, OPT_VARIANT}, {"options", required_argument, 0, OPT_OPTION}, {"keymap", required_argument, 0, OPT_KEYMAP}, - {"evdev-offset", required_argument, 0, OPT_EVDEV_OFFSET}, + {"without-x11-offset", required_argument, 0, OPT_WITHOUT_X11_OFFSET}, {"consumed-mode", required_argument, 0, OPT_CONSUMED_MODE}, {"enable-compose", no_argument, 0, OPT_COMPOSE}, {"report-state-changes", no_argument, 0, OPT_REPORT_STATE}, @@ -457,14 +457,8 @@ main(int argc, char *argv[]) case OPT_KEYMAP: keymap_path = optarg; break; - case OPT_EVDEV_OFFSET: - errno = 0; - evdev_offset = strtol(optarg, NULL, 10); - if (errno) { - fprintf(stderr, "error: --evdev-offset option expects a number\n"); - usage(stderr, argv[0]); - return EXIT_INVALID_USAGE; - } + case OPT_WITHOUT_X11_OFFSET: + evdev_offset = 0; break; case OPT_REPORT_STATE: report_state_changes = true; diff --git a/tools/xkbcli-interactive-evdev.1 b/tools/xkbcli-interactive-evdev.1 index 1c0022c..ac315fa 100644 --- a/tools/xkbcli-interactive-evdev.1 +++ b/tools/xkbcli-interactive-evdev.1 @@ -63,6 +63,11 @@ Enable Compose functionality .B \-\-consumed\-mode={xkb|gtk} Set the consumed modifiers mode (default: xkb) . +.TP +.B \-\-without\-x11\-offset +Don't add an offset of 8 when converting an evdev keycode to an XKB keycode. +You probably don't want this option. +. .SH "SEE ALSO" \fBxkbcli\fR(1), \fBxkbcli\-interactive\-wayland\fR(1), \fBxkbcli\-interactive\-x11\fR(1) . |