Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input/keyboard: don't reset layout for same keymap #4343

Merged
merged 1 commit into from
Aug 1, 2019

Conversation

RedSoxFan
Copy link
Member

@RedSoxFan RedSoxFan commented Jul 17, 2019

This is built on #4342 so that'll have to be merged first. #4342 has been merged

In sway_keyboard_config, do not change the keymap when the new keymap
is unchanged, unless this is during a config reload. The reasoning for
this is to prevent the effective layout from being reset to index 0 for
input config changes unrelated to the keymap.

For example,

swaymsg "input type:keyboard xkb_layout 'us,us'"
swaymsg "input type:keyboard xkb_variant ',dvorak'"
swaymsg "input type:keyboard xkb_options caps:toggle"
# Switch to English (Dvorak) by pressing caps
swaymsg "input type:keyboard repeat_delay 1000"
# On master, the layout will be reset to `English (US)`
# With this PR, the layout remains `English (Dvorak)`

@RedSoxFan RedSoxFan mentioned this pull request Jul 23, 2019
5 tasks
@RedSoxFan RedSoxFan force-pushed the keymap-prevent-layout-reset branch from 8e26a75 to 9c5827f Compare July 23, 2019 18:32
@RedSoxFan RedSoxFan marked this pull request as ready for review July 23, 2019 18:32
@RedSoxFan
Copy link
Member Author

Rebased and ready for review

sway/input/keyboard.c Outdated Show resolved Hide resolved
In sway_keyboard_config, do not change the keymap when the new keymap
is unchanged, unless this is during a config reload. The reasoning for
this is to prevent the effective layout from being reset to index 0 for
input config changes unrelated to the keymap.
Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

Thanks!

@emersion emersion merged commit 14562fd into swaywm:master Aug 1, 2019
@RedSoxFan RedSoxFan deleted the keymap-prevent-layout-reset branch August 1, 2019 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants