Skip to content

Conversation

@tyrypyrking
Copy link

Solves the issues with multiple layouts and exotic xkb keymaps behaving undesirably. By allowing for binds to physical keys and/or resolving all keybinds against default xkb layout. This allows niri to match behavior of majority of applications in regards with keysym resolution and mapping.

Related discussions: #3255 (solves), #2134 (useful proposal, but stale), #1919 (solves),
Related issues: #283 (solves)
Similar PR: #1920 (draft)

Note on variants: Pull request contains two variants for the same functionality provided in two commits. Cleaner (var2) and "Safer" (var1). Var1 is not much safer because avoiding xkb mutex lock and unwrap doesn't yeild any significant performance, nor will it remove other unwraps used by the libraries handling xkb connection.

@Jappie3
Copy link

Jappie3 commented Feb 7, 2026

works with my corne kb that uses a layout that doesn't need to be interpreted as dvorak (unlike my laptop keyboard), thanks!

combined with #3061 to set different layouts for both:

input  {
  bind-to-keysyms
  keyboard  {
    numlock
    xkb  {
      layout "us"
      variant "dvorak"
    }
  }
  keyboard "ZMK Project Corne Keyboard"  {
    xkb  {
      layout "us"
      variant ""
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants