bevyengine / bevyengine/bevy

XKB configuration is ignored

Open
#17,750 2 comments 0 reactions 0 assignees View on GitHub
A-Input A-Windowing C-Bug I-Accessibility O-Linux S-Waiting-on-Author
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

`bevy = { version = "0.15.2", features = ["dynamic_linking", "wayland"] }`

## \[Optional\] Relevant system information

Arch Linux 6.12.10-zen1-1-zen. Wayland Sway WM.

## What you did

I'm using xkb_file sway command to modify default keyboard layout, it includes swapping Ctrl with Caps Lock keys functionality. Every other application, games, steam games, wine and etc uses my overridden configuration. But bevy does not. So to be clear

| Physical key | Key functionality |
|--------------|-------------------|
| Ctrl | Caps Lock |
| Caps Lock | Ctrl |

xkb file: https://github.com/SL-RU/i3config/blob/think/default.xkb

command to reproduce: `swaymsg input '*' xkb_file ./default.xkb`

## What went wrong

When I press physical key CapsLock `ButtonInput` receives press `KeyCode::CapsLock` and when I press physical key Ctrl `ButtonInput receives `KeyCode::Ctrl`. So it is ignoring system setting and seems to be using some default xkb configuration

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue on Arch Linux with Wayland and Sway using the linked default.xkb file and `swaymsg input '*' xkb_file ./default.xkb`. Trace Bevy's keyboard input handling and compare its reported KeyCode values with the system remapping. Done means the swapped Ctrl and Caps Lock keys produce the corresponding remapped input in Bevy.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
desktop, game-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.