Commit f439ce188904f7a83c8e73d4ebc7a583a141c60f

Ran Benita 2020-07-25T11:17:11

tools: some minor changes to xkbcli Signed-off-by: Ran Benita <ran@unusedvar.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
diff --git a/meson.build b/meson.build
index 268925d..a62e97b 100644
--- a/meson.build
+++ b/meson.build
@@ -297,6 +297,9 @@ You can disable X11 support with -Denable-x11=false.''')
         'xkbcommon/xkbcommon-x11.h',
         subdir: 'xkbcommon',
     )
+    libxkbcommon_x11_dep = declare_dependency(
+        link_with: libxkbcommon_x11,
+    )
     pkgconfig.generate(
         libxkbcommon_x11,
         name: 'xkbcommon-x11',
@@ -308,8 +311,6 @@ You can disable X11 support with -Denable-x11=false.''')
     )
 endif
 
-man_pages = []
-
 # libxkbregistry
 if get_option('enable-xkbregistry')
     dep_libxml = dependency('libxml-2.0')
@@ -553,7 +554,7 @@ if build_tools
                install: true,
                install_dir: dir_libexec)
     install_man('tools/xkbcli-compile-keymap.1')
-    # The same tool again, but with access to some private APIS
+    # The same tool again, but with access to some private APIs.
     executable('compile-keymap',
                'tools/compile-keymap.c',
                libxkbcommon_sources,
@@ -579,7 +580,7 @@ if build_tools
     endif
     if get_option('enable-x11')
         x11_tools_dep = declare_dependency(
-            link_with: libxkbcommon_x11_internal,
+            link_with: libxkbcommon_x11,
             dependencies: [
                 tools_dep,
                 xcb_dep,
@@ -599,8 +600,8 @@ if build_tools
         wayland_protocols_dep = dependency('wayland-protocols', version: '>=1.12', required: false)
         wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)
         if not wayland_client_dep.found() or not wayland_protocols_dep.found() or not wayland_scanner_dep.found()
-            error('''The Wayland demo programs require wayland-client >= 1.2.0, wayland-protocols >= 1.7 which were not found.
-    You can disable the Wayland demo programs with -Denable-wayland=false.''')
+            error('''The Wayland xkbcli programs require wayland-client >= 1.2.0, wayland-protocols >= 1.7 which were not found.
+You can disable the Wayland xkbcli programs with -Denable-wayland=false.''')
         endif
 
         wayland_scanner = find_program(wayland_scanner_dep.get_pkgconfig_variable('wayland_scanner'))
diff --git a/meson_options.txt b/meson_options.txt
index 95c5a10..5eaa081 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -62,9 +62,3 @@ option(
     value: true,
     description: 'Enable building libxkbregistry',
 )
-option(
-    'enable-manpages',
-    type: 'boolean',
-    value: true,
-    description: 'Enable building man pages',
-)
diff --git a/tools/interactive-evdev.c b/tools/interactive-evdev.c
index 0868b4f..36e7a14 100644
--- a/tools/interactive-evdev.c
+++ b/tools/interactive-evdev.c
@@ -372,15 +372,17 @@ sigintr_handler(int signum)
 static void
 usage(FILE *fp, char *progname)
 {
-        fprintf(fp, "Usage: %s [--rules <rules>] [--model <model>] "
-                "[--layout <layout>] [--variant <variant>] [--options <options>]\n",
+        fprintf(fp, "Usage: %s [--rules=<rules>] [--model=<model>] "
+                "[--layout=<layout>] [--variant=<variant>] [--options=<options>]\n",
                 progname);
         fprintf(fp, "      or: %s --keymap <path to keymap file>\n",
                 progname);
         fprintf(fp, "For both:\n"
                         "          --report-state-changes (report changes to the state)\n"
-                        "          --enable-compose (enable compose)\n"
-                        "          --consumed-mode={gtk|xkb} (select the consumed mode)\n");
+                        "          --enable-compose (enable Compose)\n"
+                        "          --consumed-mode={xkb|gtk} (select the consumed modifiers mode, default: xkb)\n"
+                        "          --evdev-offset=NUM (default: 8)\n"
+        );
 }
 
 int
@@ -406,6 +408,7 @@ main(int argc, char *argv[])
         OPT_VARIANT,
         OPT_OPTION,
         OPT_KEYMAP,
+        OPT_EVDEV_OFFSET,
         OPT_CONSUMED_MODE,
         OPT_COMPOSE,
         OPT_REPORT_STATE,
@@ -418,6 +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},
         {"consumed-mode",        required_argument,      0, OPT_CONSUMED_MODE},
         {"enable-compose",       no_argument,            0, OPT_COMPOSE},
         {"report-state-changes", no_argument,            0, OPT_REPORT_STATE},
@@ -453,6 +457,15 @@ 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;
+            }
+            break;
         case OPT_REPORT_STATE:
             report_state_changes = true;
             break;
@@ -465,6 +478,7 @@ main(int argc, char *argv[])
             } else if (strcmp(optarg, "xkb") == 0) {
                 consumed_mode = XKB_CONSUMED_MODE_XKB;
             } else {
+                fprintf(stderr, "error: invalid --consumed-mode \"%s\"\n", optarg);
                 usage(stderr, argv[0]);
                 return EXIT_INVALID_USAGE;
             }
diff --git a/tools/xkbcli-compile-keymap.1 b/tools/xkbcli-compile-keymap.1
index 64c4263..98498f7 100644
--- a/tools/xkbcli-compile-keymap.1
+++ b/tools/xkbcli-compile-keymap.1
@@ -7,7 +7,7 @@
 \fBxkbcli\fR compile\-keymap [\-\-help] [OPTIONS]
 .
 .SH "DESCRIPTION"
-\fBxkbcli compile\-keymap\fR compiles and prints a keymap based on the given options\.
+\fBxkbcli compile\-keymap\fR compiles and prints a keymap based on the given options.
 .
 .SH "OPTIONS"
 .
@@ -16,51 +16,55 @@
 Print help and exit
 .
 .TP
-\fB\-\-verbose\fR
+.B \-\-verbose
 Enable verbose debugging output
 .
 .TP
-\fB\-\-rmlvo\fR
+.B \-\-rmlvo
 Print the full RMLVO with the defaults filled in for missing elements
 .
 .TP
-\fB\-\-from\-xkb\fR
-Load the XKB file from stdin, ignore RMLVO options\. This option must not be used with \fB\-\-kccgst\fR\.
+.B \-\-from\-xkb
+Load the XKB file from stdin, ignore RMLVO options.
+This option must not be used with \fB\-\-kccgst\fR.
 .
 .TP
-\fB\-\-include\fR
-Add the given path to the include path list\. This option is order\-dependent, include paths given first are searched first\. If an include path is given, the default include path list is not used\. Use \fB\-\-include\-defaults\fR to add the default include paths
+.B \-\-include=PATH
+Add the given path to the include path list.
+This option is order\-dependent, include paths given first are searched first.
+If an include path is given, the default include path list is not used.
+Use \fB\-\-include\-defaults\fR to add the default include paths.
 .
 .TP
-\fB\-\-include\-defaults\fR
-Add the default set of include directories\. This option is order\-dependent, include paths given first are searched first\.
+.B \-\-include\-defaults
+Add the default set of include directories.
+This option is order-dependent, include paths given first are searched first.
 .
 .TP
-\fB\-\-rules <rules>\fR
+.B \-\-rules=<rules>
 The XKB ruleset
 .
 .TP
-\fB\-\-model <model>\fR
+.B \-\-model=<model>
 The XKB model
 .
 .TP
-\fB\-\-layout <layout>\fR:
-.
-.IP
+.B \-\-layout=<layout>
 The XKB layout
 .
 .TP
-\fB\-\-variant <variant>\fR:
-.
-.IP
+.B \-\-variant=<variant>
 The XKB layout variant
 .
 .TP
-\fB\-\-options <options>\fR
+.B \-\-options=<options>
 The XKB options
 .
 .SH "SEE ALSO"
 \fBxkbcli\fR(1)
 .
 .P
-The libxkbcommon online documentation at \fIhttps://xkbcommon\.org\fR
+The
+.UR https://xkbcommon.org
+libxkbcommon online documentation
+.UE
diff --git a/tools/xkbcli-how-to-type.1 b/tools/xkbcli-how-to-type.1
index 60d42ff..aca5280 100644
--- a/tools/xkbcli-how-to-type.1
+++ b/tools/xkbcli-how-to-type.1
@@ -7,35 +7,38 @@
 \fBxkbcli\fR how\-to\-type [OPTIONS] <codepoint>
 .
 .SH "DESCRIPTION"
-\fBxkbcli how\-to\-type\fR prints key sequences to type the given Unicode codepoint\.
+\fBxkbcli how\-to\-type\fR prints key sequences to type the given Unicode codepoint.
 .
 .P
-Pipe into \fBcolumn \-ts $\'\e\et\'\fR for nicely aligned output\.
+Pipe into \fBcolumn \-ts $\'\e\et\'\fR for nicely aligned output.
 .
 .SH "OPTIONS"
 .
 .TP
-\fB\-\-rules <rules>\fR
+.B \-\-rules=<rules>
 The XKB ruleset
 .
 .TP
-\fB\-\-model <model>\fR
+.B \-\-model=<model>
 The XKB model
 .
 .TP
-\fB\-\-layout <layout>\fR
+.B \-\-layout=<layout>
 The XKB layout
 .
 .TP
-\fB\-\-variant <variant>\fR
+.B \-\-variant=<variant>
 The XKB layout variant
 .
 .TP
-\fB\-\-options <options>\fR
+.B \-\-options=<options>
 The XKB options
 .
 .SH "SEE ALSO"
 \fBxkbcli\fR(1)
 .
 .P
-The libxkbcommon online documentation at \fIhttps://xkbcommon\.org\fR
+The
+.UR https://xkbcommon.org
+libxkbcommon online documentation
+.UE
diff --git a/tools/xkbcli-interactive-evdev.1 b/tools/xkbcli-interactive-evdev.1
index 8b76dc7..1c0022c 100644
--- a/tools/xkbcli-interactive-evdev.1
+++ b/tools/xkbcli-interactive-evdev.1
@@ -1,61 +1,73 @@
 .TH "XKBCLI\-INTERACTIVE\-EVDEV" "1" "" "" "libxkbcommon manual"
 .
 .SH "NAME"
-\fBxkbcli\-interactive\-evdev\fR \- interactive debugger for XKB maps
+\fBxkbcli\-interactive\-evdev\fR \- interactive debugger for XKB keymaps
 .
 .SH "SYNOPSIS"
 \fBxkbcli\fR interactive\-evdev [\-\-help] [OPTIONS]
 .
 .SH "DESCRIPTION"
-\fBxkbcli interactive\-evdev\fR is a commandline tool to interactively debug XKB maps by listening to \fB/dev/input/eventX\fR evdev devices\.
+\fBxkbcli interactive\-evdev\fR is a commandline tool to interactively debug XKB keymaps by listening to \fB/dev/input/eventX\fR evdev devices (Linux).
 .
 .P
-This is a debugging tool, its behavior or output is not guaranteed to be stable\.
+.B xkbcli interactive\-evdev
+requires permission to open the evdev device nodes.
+This usually requires being the \fBroot\fR user or belonging to the \fBinput\fR group.
+.
+.P
+Press the Escape key to exit.
+.
+.P
+This is a debugging tool, its behavior or output is not guaranteed to be stable.
 .
 .SH "OPTIONS"
 .
 .TP
-\fB\-\-help\fR
+.B \-\-help
 Print help and exit
 .
 .TP
-\fB\-\-rules <rules>\fR
+.B \-\-rules=<rules>
 The XKB ruleset
 .
 .TP
-\fB\-\-model <model>\fR
+.B \-\-model=<model>
 The XKB model
 .
 .TP
-\fB\-\-layout <layout>\fR
+.B \-\-layout=<layout>
 The XKB layout
 .
 .TP
-\fB\-\-variant <variant>\fR
+.B \-\-variant=<variant>
 The XKB layout variant
 .
 .TP
-\fB\-\-options <options>\fR
+.B \-\-options=<options>
 The XKB options
 .
 .TP
-\fB\-\-keymap\fR
-Specify a keymap path\. This option is mutually exclusive with the rmlvo options\.
+.B \-\-keymap=PATH
+Specify a keymap path.
+This option is mutually exclusive with the RMLVO options.
 .
 .TP
-\fB\-\-report\-state\-changes\fR
+.B \-\-report\-state\-changes
 Report changes to the keyboard state
 .
 .TP
-\fB\-\-enable\-compose\fR
-Enable compose functionality
+.B \-\-enable\-compose
+Enable Compose functionality
 .
 .TP
-\fB\-\-consumed\-mode={gtk|xkb}\fR
+.B \-\-consumed\-mode={xkb|gtk}
 Set the consumed modifiers mode (default: xkb)
 .
 .SH "SEE ALSO"
 \fBxkbcli\fR(1), \fBxkbcli\-interactive\-wayland\fR(1), \fBxkbcli\-interactive\-x11\fR(1)
 .
 .P
-The libxkbcommon online documentation at \fIhttps://xkbcommon\.org\fR
+The
+.UR https://xkbcommon.org
+libxkbcommon online documentation
+.UE
diff --git a/tools/xkbcli-interactive-wayland.1 b/tools/xkbcli-interactive-wayland.1
index 3d1aec3..4c534ad 100644
--- a/tools/xkbcli-interactive-wayland.1
+++ b/tools/xkbcli-interactive-wayland.1
@@ -1,25 +1,34 @@
 .TH "XKBCLI\-INTERACTIVE\-WAYLAND" "1" "" "" "libxkbcommon manual"
 .
 .SH "NAME"
-\fBxkbcli\-interactive\-wayland\fR \- interactive debugger for XKB maps
+\fBxkbcli\-interactive\-wayland\fR \- interactive debugger for XKB keymaps
 .
 .SH "SYNOPSIS"
 \fBxkbcli\fR interactive\-wayland [\-\-help] [OPTIONS]
 .
 .SH "DESCRIPTION"
-\fBxkbcli interactive\-wayland\fR is a commandline tool to interactively debug XKB maps by listening to wayland events\. This requires a Wayland compositor to be running\.
+\fBxkbcli interactive\-wayland\fR is a commandline tool to interactively debug XKB keymaps by listening to wayland events.
 .
 .P
-This is a debugging tool, its behavior or output is not guaranteed to be stable\.
+This requires a Wayland compositor to be running.
+.
+.P
+Press the Escape key to exit.
+.
+.P
+This is a debugging tool, its behavior or output is not guaranteed to be stable.
 .
 .SH "OPTIONS"
 .
 .TP
-\fB\-\-help\fR
+.B \-\-help
 Print help and exit
 .
 .SH "SEE ALSO"
 \fBxkbcli\fR(1), \fBxkbcli\-interactive\-evdev\fR(1), \fBxkbcli\-interactive\-x11\fR(1)
 .
 .P
-The libxkbcommon online documentation at \fIhttps://xkbcommon\.org\fR
+The
+.UR https://xkbcommon.org
+libxkbcommon online documentation
+.UE
diff --git a/tools/xkbcli-interactive-x11.1 b/tools/xkbcli-interactive-x11.1
index 36e58e1..72007c0 100644
--- a/tools/xkbcli-interactive-x11.1
+++ b/tools/xkbcli-interactive-x11.1
@@ -1,25 +1,34 @@
 .TH "XKBCLI\-INTERACTIVE\-X11" "1" "" "" "libxkbcommon manual"
 .
 .SH "NAME"
-\fBxkbcli\-interactive\-x11\fR \- interactive debugger for XKB maps
+\fBxkbcli\-interactive\-x11\fR \- interactive debugger for XKB keymaps
 .
 .SH "SYNOPSIS"
 \fBxkbcli\fR interactive\-x11 [\-\-help] [OPTIONS]
 .
 .SH "DESCRIPTION"
-\fBxkbcli interactive\-x11\fR is a commandline tool to interactively debug XKB maps by listening to X11 events\. This requires an X server to be running\.
+\fBxkbcli interactive\-x11\fR is a commandline tool to interactively debug XKB keymaps by listening to X11 events.
 .
 .P
-This is a debugging tool, its behavior or output is not guaranteed to be stable\.
+This requires an X server to be running.
+.
+.P
+Press the Escape key to exit.
+.
+.P
+This is a debugging tool, its behavior or output is not guaranteed to be stable.
 .
 .SH "OPTIONS"
 .
 .TP
-\fB\-\-help\fR
+.B \-\-help
 Print help and exit
 .
 .SH "SEE ALSO"
 \fBxkbcli\fR(1), \fBxkbcli\-interactive\-evdev\fR(1), \fBxkbcli\-interactive\-wayland\fR(1)
 .
 .P
-The libxkbcommon online documentation at \fIhttps://xkbcommon\.org\fR
+The
+.UR https://xkbcommon.org
+libxkbcommon online documentation
+.UE
diff --git a/tools/xkbcli-list.1 b/tools/xkbcli-list.1
index 3211efb..6f20cc1 100644
--- a/tools/xkbcli-list.1
+++ b/tools/xkbcli-list.1
@@ -1,41 +1,44 @@
 .TH "XKBCLI\-LIST" "1" "" "" "libxkbcommon manual"
 .
 .SH "NAME"
-\fBxkbcli\-list\fR \- list available XKB rules, models, layouts, variants and options
+\fBxkbcli\-list\fR \- list available XKB models, layouts, variants and options
 .
 .SH "SYNOPSIS"
-\fBxkbcli\fR list [\-\-help] [/path/to/xkbbase [/path/to/xkbbase] \.\.\.]
+\fBxkbcli\fR list [\-\-help] [/path/to/xkbbase [/path/to/xkbbase] ...]
 .
 .SH "DESCRIPTION"
-\fBxkbcli list\fR is a commandline tool to list available model, layout, variant and option (MLVO) values from the XKB registry\.
+\fBxkbcli list\fR is a commandline tool to list available model, layout, variant and option (MLVO) values from the XKB registry.
 .
 .P
-Arguments provided on the commandline are treated as XKB base directory installations\.
+Arguments provided on the commandline are treated as XKB base directory installations.
 .
 .SH "OPTIONS"
 .
 .TP
-\fB\-\-help\fR
+.B \-\-help
 Print help and exit
 .
 .TP
-\fB\-v, \-\-verbose\fR
+.B \-v, \-\-verbose
 Increase verbosity, use multiple times for debugging output
 .
 .TP
-\fB\-\-ruleset <name>\fR
+.B \-\-ruleset=<name>
 Load the ruleset with the given name
 .
 .TP
-\fB\-\-skip\-default\-paths\fR
+.B \-\-skip\-default\-paths
 Do not load the default XKB include paths
 .
 .TP
-\fB\-\-load\-exotic\fR
+.B \-\-load\-exotic
 Load exotic (extra) layouts
 .
 .SH "SEE ALSO"
 \fBxkbcli\fR(1)
 .
 .P
-The libxkbcommon online documentation at \fIhttps://xkbcommon\.org\fR
+The
+.UR https://xkbcommon.org
+libxkbcommon online documentation
+.UE
diff --git a/tools/xkbcli.1 b/tools/xkbcli.1
index 6cfe4a4..6250291 100644
--- a/tools/xkbcli.1
+++ b/tools/xkbcli.1
@@ -7,42 +7,42 @@
 \fBxkbcli\fR [\-\-help|\-\-version] <command> [\fIargs\fR]
 .
 .SH "DESCRIPTION"
-\fBxkbcli\fR is a commandline tool to query, compile and test XKB keymaps, layouts and other elements\.
+\fBxkbcli\fR is a commandline tool to query, compile and test XKB keymaps, layouts and other elements.
 .
 .SH "OPTIONS"
 .
 .TP
-\fB\-\-help\fR
+.B \-\-help
 Print help and exit
 .
 .TP
-\fB\-\-version\fR
+.B \-\-version
 Print the version and exit
 .
 .SH "COMMANDS"
 .
 .TP
-\fBhow\-to\-type\fR
-Show how to type a given unicode codepoint, see \fBxkbcli\-how\-to\-type\fR(1)
+.B how\-to\-type
+Show how to type a given Unicode codepoint, see \fBxkbcli\-how\-to\-type\fR(1)
 .
 .TP
-\fBinteractive\-x11\fR
-Interactive debugger for XKB maps for X11, see \fBxbkcli\-interactive\-x11\fR(1)
+.B interactive\-x11
+Interactive debugger for XKB keymaps for X11, see \fBxbkcli\-interactive\-x11\fR(1)
 .
 .TP
-\fBinteractive\-wayland\fR
-Interactive debugger for XKB maps for Wayland, see \fBxkbcli\-interactive\-wayland\fR(1)
+.B interactive\-wayland
+Interactive debugger for XKB keymaps for Wayland, see \fBxkbcli\-interactive\-wayland\fR(1)
 .
 .TP
-\fBinteractive\-evdev\fR
-Interactive debugger for XKB maps for evdev, see \fBxkbcli\-interactive\-evdev\fR
+.B interactive\-evdev
+Interactive debugger for XKB keymaps for evdev (Linux), see \fBxkbcli\-interactive\-evdev\fR
 .
 .TP
-\fBlist\fR
+.B list
 List available layouts and more, see \fBxkbcli\-list\fR(1)
 .
 .P
-Note that not all tools may be available on your system\.
+Note that not all tools may be available on your system.
 .
 .SH "EXIT STATUS"
 .
@@ -59,4 +59,7 @@ an error occured
 program was called with invalid arguments
 .
 .SH "SEE ALSO"
-The libxkbcommon online documentation at \fIhttps://xkbcommon\.org\fR
+The
+.UR https://xkbcommon.org
+libxkbcommon online documentation
+.UE
diff --git a/tools/xkbcli.c b/tools/xkbcli.c
index 78a9aa5..ecab655 100644
--- a/tools/xkbcli.c
+++ b/tools/xkbcli.c
@@ -45,22 +45,22 @@ usage(void)
 #endif
 #if HAVE_XKBCLI_INTERACTIVE_WAYLAND
            "  interactive-wayland\n"
-           "    Interactive debugger for XKB maps for wayland\n"
+           "    Interactive debugger for XKB keymaps for Wayland\n"
            "\n"
 #endif
 #if HAVE_XKBCLI_INTERACTIVE_x11
            "  interactive-x11\n"
-           "    Interactive debugger for XKB maps for X11\n"
+           "    Interactive debugger for XKB keymaps for X11\n"
            "\n"
 #endif
 #if HAVE_XKBCLI_INTERACTIVE_EVDEV
            "  interactive-evdev\n"
-           "    Interactive debugger for XKB maps for evdev\n"
+           "    Interactive debugger for XKB keymaps for evdev (Linux)\n"
            "\n"
 #endif
 #if HAVE_XKBCLI_COMPILE_KEYMAP
            "  compile-keymap\n"
-           "    Compile n XKB keymap\n"
+           "    Compile an XKB keymap\n"
            "\n"
 #endif
 #if HAVE_XKBCLI_HOW_TO_TYPE