Skip to content

xkb_file should accept an empty value #8329

@thblt

Description

@thblt

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or incremental improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions