Maniphest T96170

Keys mismapped when using NeoQwertz/Bone keyboard layouts under Wayland
Closed, Resolved

Assigned To
Campbell Barton (campbellbarton)
Authored By
MultisampledNight (multisn8)
Mar 4 2022, 6:15 PM
Tags
  • BF Blender
  • Platform: Linux
Subscribers
Campbell Barton (campbellbarton)
MultisampledNight (multisn8)
Omar Emara (OmarSquircleArt)

Description

System Information
Operating system: Linux-5.16.12-zen1-1-zen-x86_64-with-glibc2.35 64 Bits
Graphics card: Mesa Intel(R) Iris(R) Plus Graphics (ICL GT2) Intel 4.6 (Core Profile) Mesa 21.3.7
Wayland compositor: Sway

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-03-04 12:59, hash: rB1763ffa0be48
Build command line: make CMAKE_CONFIG_ARGS='-DWITH_GHOST_WAYLAND=ON -DOPENGLES_EGL_LIBRARY=/usr/lib/libwayland-egl.so' release

Short description of error
I'm referring to key positions as on a standard Qwerty keyboard.
Some keys, such as 4, do nothing when typed with the NeoQwertz or Bone keyboard layouts active. Other keys, such as W or 8, are mismapped, e.g. W does the same as Backspace, 8 does the same as Tab.

Exact steps for others to reproduce the error

  1. Ensure your keyboard layout is set to NeoQwertz, e.g. under Sway xkb_layout should be set to de and xkb_variant to neo_qwertz (take a look at the bottom of https://neo-layout.org/Layouts/neoqwertz/ in case you feel yourself lost)
  2. Open up Blender's default scene
  3. Select the Location X textfield in the inspector on the right and try to type 4, 8 or W.

Revisions and Commits

rB Blender

Event Timeline

MultisampledNight (multisn8) created this task.Mar 4 2022, 6:15 PM
Omar Emara (OmarSquircleArt) added a subscriber: Omar Emara (OmarSquircleArt).Mar 7 2022, 1:34 PM

Does it work correctly in the text editor?

MultisampledNight (multisn8) updated the task description.Mar 7 2022, 5:08 PM
MultisampledNight (multisn8) added a comment.Mar 7 2022, 5:16 PM

No, unfortunately not. From trying out spontaneously I found out that 8 seems to be mapped to Tab instead, not as my original bug report lists.

MultisampledNight (multisn8) updated the task description.Mar 7 2022, 5:34 PM
Omar Emara (OmarSquircleArt) added a project: Platform: Linux.Mar 25 2022, 1:17 PM
Campbell Barton (campbellbarton) added a subscriber: Campbell Barton (campbellbarton).EditedJun 16 2022, 6:36 AM

I wasn't able to set the neo_qwertz key map, please include details for how the layout is setup/installed https://neo-layout.org/Layouts/neoqwertz/ links to a git repository with many files, it's not clear which need to be used to redo this error.

Also, it seems likely this error happens between selecting any other variant, so if this can be redone with a more standard variant, that would be helpful.

MultisampledNight (multisn8) added a comment.EditedJun 16 2022, 2:33 PM

The layout seems to be included with xkb on my system, at least I didn't need to install anything additional on my system (Arch Linux) other than libinput and Sway to make it work. The following sway configuration is enough:

input type:keyboard {
	xkb_layout "de"
	xkb_variant "neo_qwertz"
}

From random testing, the important factor for the bug to occur seems to be with keyboard layouts which have more than 3 layers (in the case of de/qwertz, normal, shift and alt gr). And indeed, Tab, which is inserted on just pressing 8 in Blender, is on layer 4 on 8. Same with d, which is Backspace on layer 4.

But that doesn't happen with the CSA multilingual layout which is used in Canada, or the French BÉPO layout. I don't know any other "common" layouts with more than 3 layers, and CSA/BÉPO also "only" have 4, not 6.

(By the way, I doubt it's relevant here, on BÉPO (key positions in qwerty) Alt Gr + m popped up the quick menu, even while in the text editor. It should probably just insert q instead.)

Campbell Barton (campbellbarton) closed this task as Resolved by committing rBfd7c07086113: Fix T96170: keys mis-mapped with NeoQwertz layout under Wayland.Jun 28 2022, 5:49 AM
Campbell Barton (campbellbarton) claimed this task.
Campbell Barton (campbellbarton) added a commit: rBfd7c07086113: Fix T96170: keys mis-mapped with NeoQwertz layout under Wayland.
Campbell Barton (campbellbarton) added a comment.Jun 28 2022, 5:50 AM

Thanks, having the sway configuration entry made it easy to redo this behavior.

Turning on num-lock caused layer-4 to be enabled, I've committed a fix that limits number lock lookups to key-pad kays.

MultisampledNight (multisn8) added a comment.Jun 28 2022, 7:32 AM

Thank you for looking into this! This is awesome.