diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-06-19 17:13:38 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-06-22 17:48:12 +1000 |
commit | 8728b5b38f4999b79c3ed954e5f584e48e784902 (patch) | |
tree | 28db2aeeb1bb26d09b3e8a43d7d470f670d65d04 /tools | |
parent | 933ab0e95f573ed60a4bce80e3331d0e9f2a4c82 (diff) |
tools: shorten the --help output for the commands
The full information is now in the man page, the usage() now just tells you
how to use it. This way there's only one place to maintain it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libinput-debug-events.1 | 60 | ||||
-rw-r--r-- | tools/libinput-debug-gui.1 | 24 | ||||
-rwxr-xr-x | tools/libinput-list-devices.c | 16 | ||||
-rw-r--r-- | tools/libinput-measure-touchpad-tap.c | 9 | ||||
-rw-r--r-- | tools/libinput-measure.c | 15 | ||||
-rw-r--r-- | tools/libinput-tool.c | 18 | ||||
-rw-r--r-- | tools/shared.c | 35 |
7 files changed, 89 insertions, 88 deletions
diff --git a/tools/libinput-debug-events.1 b/tools/libinput-debug-events.1 index ab95fc3..f29ae95 100644 --- a/tools/libinput-debug-events.1 +++ b/tools/libinput-debug-events.1 @@ -2,7 +2,7 @@ .SH NAME libinput\-debug\-events \- debug helper for libinput .SH SYNOPSIS -.B libinput debug\-events [\-\-help] [\-\-show\-keycodes] +libinput debug\-events [\-\-help] [\-\-show\-keycodes] [\-\-udev [<seat>]|\-\-device /dev/input/event0] [configuration options] .SH DESCRIPTION .PP The @@ -16,17 +16,69 @@ This tool usually needs to be run as root to have access to the /dev/input/eventX nodes. .SH OPTIONS .TP 8 +.B \-\-device /dev/input/event0 +Use the given device with the path backend. +.TP 8 +.B \-\-grab +Exclusively grab all opened devices. This will prevent events from being +delivered to the host system. +.TP 8 .B \-\-help Print help .TP 8 +.B \-\-quiet +Only print libinput messages, don't print anything from this tool. This is +useful in combination with --verbose for internal state debugging. +.TP 8 .B \-\-show\-keycodes Key events shown by this tool are partially obfuscated to avoid passwords and other sensitive information showing up in the output. Use the .B \-\-show\-keycodes argument to make all keycodes visible. -.PP -For all other options, see the output from \-\-help. Options may be added or -removed at any time. +.TP 8 +.B \-\-udev [<seat>] +Use the udev backend to listen for device notifications. If a seat is given, +use that seat, otherwise default to "seat0". +.TP 8 +.B \-\-verbose +Use verbose output +.SS libinput configuration options +.TP 8 +.B \-\-enable\-tap|\-\-disable\-tap +Enable or disable tap-to-click. +.TP 8 +.B \-\-enable-drag|\-\-disable\-drag +Enable or disable tap-and-drag +.TP 8 +.B \-\-enable\-drag-lock|\-\-disable\-drag\-lock +Enable or disable tap-and-drag. +.TP 8 +.B \-\-enable\-natural\-scrolling|\-\-disable\-natural\-scrolling +Enable or disable natural scrolling. +.TP 8 +.B \-\-enable\-left\-handed|\-\-disable\-left\-handed +Enable or disable left handed button configuration. +.TP 8 +.B \-\-enable\-dwt|\-\-disable\-dwt +Enable or disable disable-while-typing. +.TP 8 +.B \-\-set\-click\-method=[none|clickfinger|buttons] +Set the desired click method +.TP 8 +.B \-\-set\-scroll\-method=[none|twofinger|edge|button] +Set the desired scroll method. +.TP 8 +.B \-\-set\-scroll\-button=BTN_MIDDLE +Set the button to the given button code. +.TP 8 +.B \-\-set\-profile=[adaptive|flat] +Set pointer acceleration profile. +.TP 8 +.B \-\-set\-speed=<value> +Set pointer acceleration speed. The allowed range is [-1, 1]. +.TP 8 +.B \-\-set\-tap\-map=[lrm|lmr] +Set button mapping for tapping. .SH NOTES .PP Events shown by this tool may not correspond to the events seen by a diff --git a/tools/libinput-debug-gui.1 b/tools/libinput-debug-gui.1 index e6d4d21..59a796a 100644 --- a/tools/libinput-debug-gui.1 +++ b/tools/libinput-debug-gui.1 @@ -2,7 +2,7 @@ .SH NAME libinput\-debug\-gui \- visual debug helper for libinput .SH SYNOPSIS -.B libinput debug\-gui [\-\-help] +.B libinput debug\-gui [\-\-help] [\-\-udev [<seat>]|\-\-device /dev/input/event0] [configuration options] .SH DESCRIPTION .PP The @@ -10,6 +10,7 @@ The tool creates a libinput context and a full-screen GTK window to visualize events processed by libinput. This tool exclusively grabs pointing devices and stops them from interacting with the rest of the GUI. +.PP .B Hit Esc to exit this tool. .PP This is a debugging tool only, its output or behavior may change at any @@ -19,11 +20,28 @@ This tool usually needs to be run as root to have access to the /dev/input/eventX nodes. .SH OPTIONS .TP 8 +.B \-\-device /dev/input/event0 +Use the given device with the path backend. +.TP 8 +.B \-\-grab +Exclusively grab all opened devices. This will prevent events from being +delivered to the host system. +.TP 8 .B \-\-help Print help +.TP 8 +.B \-\-quiet +Only print libinput messages, don't print anything from this tool. This is +useful in combination with --verbose for internal state debugging. +.TP 8 +.B \-\-udev [<seat>] +Use the udev backend to listen for device notifications. If a seat is given, +use that seat, otherwise default to "seat0". +.TP 8 +.B \-\-verbose +Use verbose output .PP -For all other options, see the output from \-\-help. Options may be added or -removed at any time. +For libinput configuration options, see libinput-debug-events(1) .SH NOTES .PP Events shown by this tool may not correspond to the events seen by a diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c index 2e19c01..b98bb78 100755 --- a/tools/libinput-list-devices.c +++ b/tools/libinput-list-devices.c @@ -354,17 +354,11 @@ print_device_notify(struct libinput_event *ev) static inline void usage(void) { - printf("Usage: libinput list-devices [--help]\n"); + printf("Usage: libinput list-devices [--help|--version]\n"); printf("\n" - "This tool creates a libinput context on the default seat \"seat0\"\n" - "and lists all devices recognized by libinput and the configuration options.\n" - "Where multiple options are possible, the default is prefixed with \"*\".\n" - "\n" - "Options:\n" - "--help ...... show this help\n" - "--version ... show version information\n" - "\n" - "This tool requires access to the /dev/input/eventX nodes.\n"); + "--help ...... show this help and exit\n" + "--version ... show version information and exit\n" + "\n"); } int @@ -374,6 +368,8 @@ main(int argc, char **argv) struct tools_context context; struct libinput_event *ev; + /* This is kept for backwards-compatibility with the old + libinput-list-devices */ if (argc > 1) { if (streq(argv[1], "--help")) { usage(); diff --git a/tools/libinput-measure-touchpad-tap.c b/tools/libinput-measure-touchpad-tap.c index 6064d61..0b2b195 100644 --- a/tools/libinput-measure-touchpad-tap.c +++ b/tools/libinput-measure-touchpad-tap.c @@ -420,15 +420,6 @@ static inline void usage(void) { printf("Usage: libinput measure touchpad-tap [--help] [/dev/input/event0]\n"); - printf("\n" - "Measure various properties related to tap-to-click.\n" - "If a path to the device is provided, that device is used. Otherwise, this tool\n" - "will pick the first suitable touchpad device.\n" - "\n" - "Options:\n" - "--help ...... show this help\n" - "\n" - "This tool requires access to the /dev/input/eventX nodes.\n"); } int diff --git a/tools/libinput-measure.c b/tools/libinput-measure.c index af9c1cf..9b489ed 100644 --- a/tools/libinput-measure.c +++ b/tools/libinput-measure.c @@ -38,20 +38,7 @@ static inline void usage(void) { - printf("Usage: libinput measure [--help] FEATURE [/dev/input/event0]\n"); - printf("\n" - "Collect measurements related to FEATURE on the given device.\n" - "\n" - "Options:\n" - "--help ...... show this help\n" - "\n" - "Available features are:\n" - " touchpad-tap-time\n" - " Measures the time for tap-to-click interactions\n" - " " - "For information about each feature, see the --help output for that feature.\n" - "\n" - "This tool requires access to the /dev/input/eventX nodes.\n"); + printf("Usage: libinput measure [--help] <feature> [/dev/input/event0]\n"); } int diff --git a/tools/libinput-tool.c b/tools/libinput-tool.c index aa07c42..5c605a3 100644 --- a/tools/libinput-tool.c +++ b/tools/libinput-tool.c @@ -39,19 +39,11 @@ static void usage(void) { - printf("Usage: libinput [GLOBAL OPTIONS] [COMMAND] [ARGS]\n" - "\n" - "This tool creates a libinput context and interacts with that context.\n" - "For detailed information about the options below, see the" - "libinput(1) man page.\n" - "\n" - "This tool usually requires access to the /dev/input/eventX nodes.\n" + printf("Usage: libinput [--help|--version] <command> [<args>]\n" "\n" "Global options:\n" - " --help ...... show this help\n" - " --version ... show version information\n" - " --verbose ... enable verbose output for debugging\n" - " --quiet ..... reduce output (may be used with --verbose)\n" + " --help ...... show this help and exit\n" + " --version ... show version information and exit\n" "\n" "Commands:\n" " list-devices\n" @@ -63,8 +55,8 @@ usage(void) " debug-gui\n" " Display a simple GUI to visualize libinput's events.\n" "\n" - " measure\n" - " Measure various device properties. See the --help output for more info\n" + " measure <feature>\n" + " Measure various device properties. See the man page for more info\n" "\n"); } diff --git a/tools/shared.c b/tools/shared.c index 5eaca3f..7df9f68 100644 --- a/tools/shared.c +++ b/tools/shared.c @@ -97,41 +97,6 @@ tools_usage(const char *command) { printf("Usage: libinput %s [options] [--udev [<seat>]|--device /dev/input/event0]\n", command); - printf("--udev <seat>.... Use udev device discovery (default).\n" - " Specifying a seat ID is optional.\n" - "--device /path/to/device .... open the given device only\n" - "\n" - "Features:\n" - "--enable-tap\n" - "--disable-tap.... enable/disable tapping\n" - "--enable-drag\n" - "--disable-drag.... enable/disable tap-n-drag\n" - "--enable-drag-lock\n" - "--disable-drag-lock.... enable/disable tapping drag lock\n" - "--enable-natural-scrolling\n" - "--disable-natural-scrolling.... enable/disable natural scrolling\n" - "--enable-left-handed\n" - "--disable-left-handed.... enable/disable left-handed button configuration\n" - "--enable-middlebutton\n" - "--disable-middlebutton.... enable/disable middle button emulation\n" - "--enable-dwt\n" - "--disable-dwt..... enable/disable disable-while-typing\n" - "--set-click-method=[none|clickfinger|buttonareas] .... set the desired click method\n" - "--set-scroll-method=[none|twofinger|edge|button] ... set the desired scroll method\n" - "--set-scroll-button=BTN_MIDDLE ... set the button to the given button code\n" - "--set-profile=[adaptive|flat].... set pointer acceleration profile\n" - "--set-speed=<value>.... set pointer acceleration speed (allowed range [-1, 1]) \n" - "--set-tap-map=[lrm|lmr] ... set button mapping for tapping\n" - "--show-keycodes.... show all key codes while typing\n" - "\n" - "These options apply to all applicable devices, if a feature\n" - "is not explicitly specified it is left at each device's default.\n" - "\n" - "Other options:\n" - "--grab .......... Exclusively grab all openend devices\n" - "--help .......... Print this help.\n" - "--verbose ....... Print debugging output.\n" - "--quiet ......... Only print libinput messages, useful in combination with --verbose.\n"); } void |