Hyprland: hyprland 0.35 xkb_layout keyboard config no longer works

Hyprland Version

System/Version info
Hyprland, built from branch  at commit 84ab8d11e8951a6551d1e1bf87796a8589da6d47  ().
Date: 2024-02-05
Tag:

flags: (if any)

Bug or Regression?

Regression

Description

System/Version info
Hyprland, built from branch  at commit 84ab8d11e8951a6551d1e1bf87796a8589da6d47  ().
Date: 2024-02-05
Tag:

flags: (if any)

How to reproduce

I have a custom xkb map set for my keyboard which works fine with Hyprland 0.34 (03ebbe18ed8517ee22591eac82cd54322f42cb7d)

With 0.35 it seems to be ignored, even though the log report that the layout has been set to what I was expecting (de_hhkb in my case), there are some warnings about xkb in the log though.

Relevant Hyprland config:

device:pfu-limited-hhkb-hybrid {
  kb_layout = de_hhkb
}

device:pfu-limited-hhkb-hybrid-consumer-control {
  kb_layout = de_hhkb
}

device:pfu-limited-hhkb-hybrid-keyboard {
  kb_layout = de_hhkb
}

device:hhkb-hybrid_1-keyboard {
  kb_layout = de_hhkb
}

.config/xkb/symbols/de_hhkb:

default partial alphanumeric_keys

xkb_symbols "basic" {
  include "de"
  name[Group1] = "Custom HHKB DE layout by pschmitt";
  // https://github.com/swaywm/sway/issues/4250

  // 1. Determine the scancode of the key
  // $ wev
  //
  // 2. Get the internal ID
  // $ </usr/share/X11/xkb/keycodes/evdev | grep -E "=\s+(132)"
  // <AE13> = 132;   // Yen
  //
  // 3. The key name to map to can be fetched via:
  // $ </usr/include/X11/keysymdef.h grep -E "#define XK_"

  // The mapping goes as follows:
  // key <KEY_ID> { [ map1, map2, map3, map4 ]};
  // Where:
  // map1: normal key press
  // map2: shift + key
  // map3: AltGr + key
  // map4: AltGr + shift + key

  // YEN KEY (Insert) -> "pipe" char
  key <AE13> { [ bar, bar, bar, bar ] };

  // HYPHEN/BACKSLASH KEY -> "<>|"
  key <AB11> { [ less, greater, bar, bar ] };

  // TILDE/CIRCUMFLEXE KEY (F12) -> caret
  key <AE12> { [ dead_acute, dead_grave, asciitilde, caret ] };

  // Z KEY (ie Y in qwertz)
  key <AB01> { [ y, Y, bar, bar ] };

  // ESC Key
  key <ESC> { [escape, dead_circumflex, dead_circumflex, escape] };
};

Crash reports, logs, images, videos

hyprland log: https://gist.github.com/pschmitt/2451947a16b3ba26059edeca2b4f6ad6

Probably relevant excerpt:

EDIT: I actually also see the xkbcomp warning/error in the hyprland logs on 0.34

Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Attempting to create a keymap for layout de_hhkb with variant  (rules: , model: , options: )
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Set the keyboard layout to de_hhkb and variant to  for keyboard "PFU Limited HHKB-Hybrid"
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] New keyboard created, pointers Hypr: 2591c70 and WLR: 2937e08
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Attached a keyboard with name PFU Limited HHKB-Hybrid Consumer Control
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Registered signal for owner 199af80: 2975190 -> 199af88 (owner: Keyboard)
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Registered signal for owner 199af80: 2975180 -> 199aff0 (owner: Keyboard)
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Registered signal for owner 199af80: 2975060 -> 199b0c0 (owner: Keyboard)
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Registered signal for owner 199af80: 29751a0 -> 199b058 (owner: Keyboard)
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] ApplyConfigToKeyboard for "pfu-limited-hhkb-hybrid-consumer-control", hasconfig: 1
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Attempting to create a keymap for layout de_hhkb with variant  (rules: , model: , options: )
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Set the keyboard layout to de_hhkb and variant to  for keyboard "PFU Limited HHKB-Hybrid Consumer Control"
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] New keyboard created, pointers Hypr: 199af80 and WLR: 2975048
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Attached a keyboard with name PFU Limited HHKB-Hybrid Keyboard
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Registered signal for owner 29b0b20: 29b0730 -> 29b0b28 (owner: Keyboard)
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Registered signal for owner 29b0b20: 29b0720 -> 29b0b90 (owner: Keyboard)
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Registered signal for owner 29b0b20: 29b0600 -> 29b0c60 (owner: Keyboard)
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Registered signal for owner 29b0b20: 29b0740 -> 29b0bf8 (owner: Keyboard)
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] ApplyConfigToKeyboard for "pfu-limited-hhkb-hybrid-keyboard", hasconfig: 1
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Attempting to create a keymap for layout de_hhkb with variant  (rules: , model: , options: )
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] Set the keyboard layout to de_hhkb and variant to  for keyboard "PFU Limited HHKB-Hybrid Keyboard"
Feb 10 16:07:49 ge2 hyprland[2382428]: [LOG] New keyboard created, pointers Hypr: 29b0b20 and WLR: 29b05e8
[...]
Feb 10 16:07:53 ge2 hyprland[2386307]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86CameraAccessEnable
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86CameraAccessDisable
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86CameraAccessToggle
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86NextElement
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86PreviousElement
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86AutopilotEngageToggle
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86MarkWaypoint
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86Sos
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86NavChart
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86FishingChart
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86SingleRangeRadar
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86DualRangeRadar
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86RadarOverlay
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86TraditionalSonar
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86ClearvuSonar
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86SidevuSonar
Feb 10 16:07:53 ge2 hyprland[2386307]: > Warning:          Could not resolve keysym XF86NavInfo
Feb 10 16:07:53 ge2 hyprland[2386307]: Errors from xkbcomp are not fatal to the X server
Feb 10 16:07:53 ge2 hyprland[2386308]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Feb 10 16:07:53 ge2 hyprland[2386308]: > Warning:          Unsupported maximum keycode 708, clipping.
Feb 10 16:07:53 ge2 hyprland[2386308]: >                   X11 cannot support keycodes above 255.
Feb 10 16:07:53 ge2 hyprland[2386308]: Errors from xkbcomp are not fatal to the X server

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 17 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Here’s an update:

given the fact that pressing the YEN/RO keys triggered chayang I went on debugging why that even occurs.

Turns out I have the following in my hyprland config:

bindl = , switch:off:Lid Switch, exec, $lock
bindl = , switch:on:Lid Switch, exec, hyprctl dispatch dpms on

which is responsible for triggering chayang+swaylock and indeed: commenting these 2 binds out “fixes” the xkb layout. My hhkb now produce the right keys and does not trigger chayang and cie.

So somehow the YEN/RO keys from my hhkb are sending lid switch events since https://github.com/hyprwm/Hyprland/commit/37b76cd1caed209e20e0e353671abf6ba4346b42 🤷

can I get a git bisect for this one?