Xpra Documentation

Keyboard

Keyboard handling is an area that is constantly seeing improvements and bug fixes. That’s because each platform does things slightly differently and xpra has to somehow convert this data into meaningful keyboard events on the remote end.

Xpra Keyboard Shortcuts

Xpra utilizes keyboard shortcuts to facilitate quick access to its features.

How to Find Keyboard Shortcuts in Xpra

For historical reference, an older list of keyboard shortcuts exists in #1657.

# in Xpra Key Bindings

The # symbol represents one or more modifier keys (like Control or Alt+Shift) in Xpra key bindings. The exact key # stands for varies by platform and can be overriden in configuration.

In the Xpra Keyboard Shortcuts window, the # placeholder is named as “Prefix:”:

The Xpra Keyboard Shortcuts window as of v5.0.5-r27 in Ubuntu 20.04

Common Issues

Debugging

Keyboard events are interpreted on the client and mapped again on the server, so diagnostics from both ends are often needed.

Xpra diagnostics

The Keyboard event viewer in xpra toolbox shows the detected model, layout, variant and options, then reports layout changes, modifiers, keycodes, keysyms and XKB groups in real time. It can also be opened directly:

xpra example view-keyboard

To print the detected keyboard configuration and, on X11, the complete keysym map, use:

xpra keyboard -v

Enable keyboard debug logging on the client and server with -d keyboard:

xpra attach :DISPLAY -d keyboard
xpra seamless :DISPLAY -d keyboard --start=xterm

For an already-running session, logging can be enabled at runtime on the server and on its connected clients:

xpra control :DISPLAY debug enable keyboard
xpra control :DISPLAY client debug enable keyboard

See Logging for log locations and more ways to control debug categories.

To capture the keymap that a client would send and test whether an X11 server can generate all of its keys, use:

xpra keymap keymap.json
xpra keymap-test keymap.json

keymap-test uses a temporary X11 display by default. Passing an explicit display tests that display but modifies its keymap for the duration of the test. Individual keysyms can be checked by adding their names to the command, for example xpra keymap-test keymap.json Alt_R ISO_Level3_Shift.

For detailed server-side mapping logs concerning only specific keysyms, set XPRA_DEBUG_KEYSYMS before starting the server and enable keyboard logging:

XPRA_DEBUG_KEYSYMS=Alt_R,ISO_Level3_Shift \
  xpra seamless :DISPLAY -d keyboard --start=xterm

X11 tools

These utilities help identify which layer is producing an incorrect result:

Compare the output from setxkbmap and xmodmap on the client desktop and inside the Xpra session:

setxkbmap -print
setxkbmap -query
xmodmap -pke
xmodmap -pm

This comparison shows whether the discrepancy originates in the client keymap, the keymap installed in the session, or Xpra’s event translation.

Reporting Bugs

First, please check for existing issues that may match your problem. Failing that, make sure to read the reporting bugs guidelines, and generally you will need to include (only those that apply):