Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xkb_file should accept an empty value #8329

Open
thblt opened this issue Sep 5, 2024 · 2 comments
Open

xkb_file should accept an empty value #8329

thblt opened this issue Sep 5, 2024 · 2 comments
Labels
enhancement New feature or incremental improvement

Comments

@thblt
Copy link

thblt commented Sep 5, 2024

I want to use the same default layout for all keyboards, but devices like yubikeys (or barcode scanners, or any devices that pretend to be keyboards) use the US-QWERTY layout. Because my keyboard layout (for real keyboards) is hugely customized, I use a xkb file. My config thus looks like this:

input 4176:1031:Yubico_YubiKey_OTP+FIDO+CCID { 
  xkb_layout us 
} 
input type:keyboard { 
  xkb_file ~/.config/sway/my_weird_layout.xkb 
} 

with this config, the yubikey uses the layout described in my_weird_layout.xkb instead of US-QWERTY. I guess this happens because xkb_file gets merged from input type:keyboard into input 4176:1031:Yubico_YubiKey_OTP+FIDO+CCID.

A nice solution for that issue would be for xkb_file to accept an empty value:

input 4176:1031:Yubico_YubiKey_OTP+FIDO+CCID { 
  xkb_layout us
  xkb_file 
} 
input type:keyboard { 
  xkb_file ~/.config/sway/my_weird_layout.xkb 
} 

I'm aware there are other solutions with the actual config syntax (use a xkb file for us qwerty as well, or configure each keyboard individually), but they're not as nice :)

@thblt thblt added the enhancement New feature or incremental improvement label Sep 5, 2024
@emersion
Copy link
Member

emersion commented Sep 5, 2024

Should we reset xkb_file when merged into with a config which specifies xkb_layout since these two are conflicting? (And the other way around)

@bitozoid
Copy link

I'm having similar a similar issue. I'm trying to setup a kmonad config, but my custom mapping (xkb_file) seems to apply to KMonad input as well.

  input "1452:598:TrulyErgonomic.com_Truly_Ergonomic_CLEAVE_Keyboard" {
      xkb_file "~/.xkb/keymap/cleave"
  }

  input "4661:22137:KMonad" {
      xkb_layout "es"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or incremental improvement
Development

No branches or pull requests

3 participants