Skip to content

Uinput output for other layouts than US #1726

@LilleAila

Description

@LilleAila

Describe the bug

Using the modified qwerty layout from #1721 will not work with non-US layouts, as many symbols such as "-", "/", "?" etc. will not be at the same locations. For example, in norwegian the / is at shift+7 rather than at a dedicated key as in US.

The reason i did not include any special characters at all in #1679, was because it should be possible to use any layout. I suggest having separate layout options for generic (minimal) qwerty, and another for US qwerty. I also think the characters should be not in BASE_LAYOUT but in specifically qwerty-us, as BASE_LAYOUT should be the keys which are the same regardless of layout.

Relevant commit: https://github.com/openstenoproject/plover/pull/1679/files/18aaf5174a0feaa5b4e3fea2fbce72bcc1d9f561..5279766d11ad6405eb08e168a01c438f25d103de

If we would want to have all possible keyboards emulated with direct keys, we would have to implement something similar to the code that was removed, but the xkbcommon dependency caused some problems as it requires a system-wide dependency and i experienced version conflicts.


Also, i saw some confusion about this line: https://github.com/openstenoproject/plover/pull/1721/files#diff-6b4281e6a4006cf3e22f4cfbcaf9fcc8ff7337cf721c33d5051f1e6cbd369844R279

The reason it was done like that, is because that is used by the keyboard capture, which does not care about what the actual layout is, but which keys were pressed.

To Reproduce

Steps to reproduce the behavior:

  1. Use another layout than US (for example norwegian)
  2. Type some of the characters added in Add more keys to uinput output #1721

Expected behavior

The correct character is output

Operating system

Linux / Wayland on latest main branch

CC @user202729 @mkrnr

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions