Hash :
5cfd36ab
Author :
Date :
2025-02-14T10:35:49
tools: Do not load names from the environment by default Our tools are debugging tools and as such we need to have complete control to be able to reproduce setups. This is not currently the case, as we do not use `XKB_CONTEXT_NO_ENVIRONMENT_NAMES` by default nor can we set it. So it is very easy to forget about the various `XKB_DEFAULT_*` environement variables for the default RMLVO values, then to get puzzled by unexpected results. Added to that, these environment variables do not work correctly in `xkbcli-compile-xeymap`: calling the tool without RMLVO values will use these variables only if the RMLVO values are set explicitly empty or if the various *constants* `DEFAULT_XKB_*` are empty. This is unexpected, as the environment variables should *always* be used unless: - `XKB_CONTEXT_NO_ENVIRONMENT_NAMES` is used (not the case here); - the variable is empty; in this case the constants `DEFAULT_XKB_*` are used. Fixed by the following *breaking change*: make the tools use `XKB_CONTEXT_NO_ENVIRONMENT_NAMES` *by default*, unless the new `--enable-environment-names` option is used. We also make `rmlvo` incompatible with `--enable-environment-names` for now in the public tool, as else it requires a private API.
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
.Dd September 11, 2024
.Dt XKBCLI\-HOW\-TO\-TYPE 1
.Os
.
.Sh NAME
.Nm "xkbcli\-how\-to\-type"
.Nd query how to type a given Unicode code point or keysym
.
.Sh SYNOPSIS
.Nm
.Op options
.Ar character/codepoint/keysym
.
.Sh DESCRIPTION
.Nm
prints the key combinations (keycode + modifiers) in the keymap's layouts which
would produce the given Unicode code point or keysym.
.
.Pp
.Ar codepoint/keysym
is either:
.
.Bl -bullet -compact
.It
a single character (requires a terminal which uses UTF-8 character encoding);
.It
a Unicode code point, interpreted as hexadecimal if prefixed with
.Li 0x
or
.Li U+
else as decimal;
.
.It
a keysym if
.Fl \-keysym
is used: either a \fInumeric\fP value (hexadecimal if prefixed with
.Li 0x
else decimal) or a keysym \fIname\fP.
.El
.
.Sh EXAMPLES
.Bl -tag -width Ds
.It Nm Fl \-layout Ar us 97
.It Nm Fl \-layout Ar us 0x61
.It Nm Fl \-layout Ar us U+0061
.It Nm Fl \-layout Ar us a
Print the key combinations that produce the letter "a"
.Po
decimal code point:
.Ar 97 ,
hexadecimal code point:
.Ar 61
.Pc
in the default
.Ar us
layout.
.It Nm Fl \-layout Ar us Fl \-keysym Ar 97
.It Nm Fl \-layout Ar us Fl \-keysym Ar 0x61
.It Nm Fl \-layout Ar us Fl \-keysym Ar a
Print the key combinations that produce the keysym "a"
.Po
decimal code:
.Ar 97 ,
hexadecimal code:
.Ar 61
.Pc
in the default
.Ar us
layout.
.Be
.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl \-keysym
Treat the argument as a keysym, not a Unicode code point
.
.It Fl \-rules Ar rules
The XKB ruleset
.
.It Fl \-model Ar model
The XKB model
.
.It Fl \-layout Ar layout
The XKB layout
.
.It Fl \-variant Ar variant
The XKB layout variant
.
.It Fl \-options Ar options
The XKB options
.
.It Fl \-enable\-environment\-names
Allow to set the default RMLVO values via the following environment variables:
.Bl -dash -compact -hang
.It
.Ev XKB_DEFAULT_RULES
.It
.Ev XKB_DEFAULT_MODEL
.It
.Ev XKB_DEFAULT_LAYOUT
.It
.Ev XKB_DEFAULT_VARIANT
.It
.Ev XKB_DEFAULT_OPTIONS
.El
Note that this option may affect the default values of the previous options.
.
.It Fl \-help
Print a help message and exit.
.El
.
.Sh SEE ALSO
.Xr xkbcli 1 ,
.Lk https://xkbcommon.org "The libxkbcommon online documentation"