Skip to content

Comments

Fix x11 options and toggle layout#112

Merged
Aetf merged 1 commit intoAetf:developfrom
kdj0c:fix_x11options
May 15, 2025
Merged

Fix x11 options and toggle layout#112
Aetf merged 1 commit intoAetf:developfrom
kdj0c:fix_x11options

Conversation

@kdj0c
Copy link
Collaborator

@kdj0c kdj0c commented May 7, 2025

If you set multiple layout with localectl, and have an options to toggle layout, you can't toggle the layout in kmscon.

for example, with this localectl settings:
System Locale: LANG=el_GR.UTF-8
VC Keymap: gr
X11 Layout: gr,us
X11 Model: pc105
X11 Variant: ,
X11 Options: grp:alt_space_toggle

The reason is that xkbcommon won't use the XKB_DEFAULT_OPTIONS environment variable if options is an empty string. So if all variables are empty, use NULL instead.

https://github.com/xkbcommon/libxkbcommon/blob/dd642359f8d43c09968e34ca7f1eb1121b2dfd70/src/context-priv.c#L176

If you set multiple layout with localectl, and have an options to
toggle layout, you can't toggle the layout in kmscon.

for example, with this localectl settings:
System Locale: LANG=el_GR.UTF-8
    VC Keymap: gr
   X11 Layout: gr,us
    X11 Model: pc105
  X11 Variant: ,
  X11 Options: grp:alt_space_toggle

The reason is that xkbcommon won't use the XKB_DEFAULT_OPTIONS
environment variable if options is an empty string.
So if all variables are empty, use NULL instead.

https://github.com/xkbcommon/libxkbcommon/blob/dd642359f8d43c09968e34ca7f1eb1121b2dfd70/src/context-priv.c#L176

Signed-off-by: Jocelyn Falempe <[email protected]>
Copy link
Owner

@Aetf Aetf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Aetf Aetf merged commit 25f4b81 into Aetf:develop May 15, 2025
@kdj0c kdj0c deleted the fix_x11options branch October 10, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants