[GH-ISSUE #3133] Keyboard: XKB option caps:swapescape is ignored (Caps Lock and Escape not swapped in game) #833

Closed
opened 2026-11-02 15:42:14 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Vadyanik on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3133

Summary
Horizon ignores the system keymap's caps:swapescape option. Every other app treats the physical Caps Lock key as Escape and the physical Escape key as Caps Lock. In Horizon the two keys keep their original meaning, so Caps Lock doesn't open the pause menu or close screens, and Escape still works as Escape.

Steps to reproduce

  1. Set the XKB option caps:swapescape (here in niri's config: input { keyboard { xkb { options "caps:swapescape" } } }).
  2. Start Horizon and open a world.
  3. Press the physical Caps Lock key: expected Escape (pause menu); nothing happens.
  4. Press the physical Escape key: expected Caps Lock; the pause menu opens instead.

Expected
Non-printable keys like Escape follow the active XKB keymap, as they do in every other app on this desktop. My guess is that Horizon reads the physical key/scancode instead of the keysym the keymap resolves to. #3001 (Portuguese layout, /) may have the same cause.

Environment

  • Horizon v0.2.93, launcher 0.2.19
  • NixOS 26.11, niri 26.04 (Wayland session)
  • NVIDIA RTX 4060, driver 595.104.02, Vulkan
Originally created by @Vadyanik on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3133 **Summary** Horizon ignores the system keymap's `caps:swapescape` option. Every other app treats the physical Caps Lock key as Escape and the physical Escape key as Caps Lock. In Horizon the two keys keep their original meaning, so Caps Lock doesn't open the pause menu or close screens, and Escape still works as Escape. **Steps to reproduce** 1. Set the XKB option `caps:swapescape` (here in niri's config: `input { keyboard { xkb { options "caps:swapescape" } } }`). 2. Start Horizon and open a world. 3. Press the physical Caps Lock key: expected Escape (pause menu); nothing happens. 4. Press the physical Escape key: expected Caps Lock; the pause menu opens instead. **Expected** Non-printable keys like Escape follow the active XKB keymap, as they do in every other app on this desktop. My guess is that Horizon reads the physical key/scancode instead of the keysym the keymap resolves to. #3001 (Portuguese layout, `/`) may have the same cause. **Environment** - Horizon v0.2.93, launcher 0.2.19 - NixOS 26.11, niri 26.04 (Wayland session) - NVIDIA RTX 4060, driver 595.104.02, Vulkan
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#833
No description provided.