← 返回命令列表

Linux command

xkbcli 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

xkbcli list

Compile

xkbcli compile-keymap

Compile a keymap

xkbcli compile-keymap --layout [us] --variant [dvorak]

Show how to type

xkbcli how-to-type [0x00e9]

Interactively debug

xkbcli interactive-wayland

Interactively debug

xkbcli interactive-x11

Interactively debug

sudo xkbcli interactive-evdev

Print

xkbcli --version

说明

xkbcli is the user-facing front-end shipped with libxkbcommon, the keymap library used by Wayland compositors, the X.Org server (since 1.20), GTK, Qt, EFL and most modern toolkits. It exposes the library's compilation, lookup and inspection APIs as a single multiplexed binary with sub-commands. It is most often used in three ways. First, xkbcli list answers the question "which layouts/variants does my system know about?" — the same data shown by graphical keyboard pickers but in a machine-parseable form. Second, xkbcli compile-keymap reproduces exactly what a compositor or X server does when it compiles a keymap, which is invaluable when diagnosing why a custom layout is not being applied. Third, the interactive-* sub-commands print the live keysym, modifier state, group and Unicode codepoint of every keypress, making xkbcli the equivalent of xev(1) for the libxkbcommon era. The tool relies on the system's xkeyboard-config data files (typically under /usr/share/X11/xkb), so its output reflects the keymaps that any libxkbcommon-based program would see.

参数

--help
Show usage and exit.
--version
Print the libxkbcommon version and exit.

FAQ

What is the xkbcli command used for?

xkbcli is the user-facing front-end shipped with libxkbcommon, the keymap library used by Wayland compositors, the X.Org server (since 1.20), GTK, Qt, EFL and most modern toolkits. It exposes the library's compilation, lookup and inspection APIs as a single multiplexed binary with sub-commands. It is most often used in three ways. First, xkbcli list answers the question "which layouts/variants does my system know about?" — the same data shown by graphical keyboard pickers but in a machine-parseable form. Second, xkbcli compile-keymap reproduces exactly what a compositor or X server does when it compiles a keymap, which is invaluable when diagnosing why a custom layout is not being applied. Third, the interactive-* sub-commands print the live keysym, modifier state, group and Unicode codepoint of every keypress, making xkbcli the equivalent of xev(1) for the libxkbcommon era. The tool relies on the system's xkeyboard-config data files (typically under /usr/share/X11/xkb), so its output reflects the keymaps that any libxkbcommon-based program would see.

How do I run a basic xkbcli example?

Run `xkbcli list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --help do in xkbcli?

Show usage and exit.