Edit

kc3-lang/libxkbcommon/tools/xkbcli-interactive-evdev.1

Branch :

  • Show log

    Commit

  • Author : Pierre Le Marre
    Date : 2025-02-14 10:35:49
    Hash : 5cfd36ab
    Message : 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.

  • tools/xkbcli-interactive-evdev.1
  • .Dd June 4, 2024
    .Dt XKBCLI\-INTERACTIVE\-EVDEV 1
    .Os
    .
    .Sh NAME
    .Nm "xkbcli\-interactive\-evdev"
    .Nd interactive debugger for X Keyboard keymaps
    .
    .Sh SYNOPSIS
    .Nm
    .Op Ar options
    .Op Ar KEYMAP_PATH
    .
    .Sh DESCRIPTION
    .Nm
    is a commandline tool to interactively debug XKB keymaps by listening to
    .Pa /dev/input/eventX
    evdev devices.
    .
    .Pp
    .Nm
    requires permission to open the evdev device nodes.
    This usually requires being the
    .Dq root
    user or belonging to the
    .Dq input
    group.
    .
    .Pp
    Press the
    .Aq Escape
    key to exit.
    .
    .Pp
    This is a debugging tool, its behavior or output is not guaranteed to be stable.
    .
    .Bl -tag -width Ds
    .It Ar KEYMAP_PATH
    Path to a keymap file, or
    .Dq \-
    to read the standard input
    .
    .It Fl \-help
    Print help and exit
    .
    .It Fl \-include Ar 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
    .Fl \-include\-defaults
    to add the default include paths.
    .
    .It Fl \-include\-defaults
    Add the default set of include directories.
    This option is order-dependent, include paths given first are searched first.
    .
    .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 \-option 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 \-keymap Ar file
    Specify a keymap path.
    This option is mutually exclusive with the RMLVO options.
    .
    .It Fl \-short
    Do not print layout nor Unicode keysym translation.
    .
    .It Fl \-report\-state\-changes
    Report changes to the keyboard state
    .
    .It Fl \-enable\-compose
    Enable Compose functionality
    .
    .It Fl \-consumed\-mode Brq xkb|gtk
    Set the consumed modifiers mode (default: xkb)
    .
    .It Fl \-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.
    .El
    .
    .Sh SEE ALSO
    .Xr xkbcli 1 ,
    .Xr xkbcli\-interactive\-wayland 1 ,
    .Xr xkbcli\-interactive\-x11 1 ,
    .Lk https://xkbcommon.org "The libxkbcommon online documentation"