Skip to content

Conversation

goinginblind
Copy link

@goinginblind goinginblind commented Oct 7, 2025

Description:
This pull request addresses the installation issue where users selecting a non-US keyboard layout during installation would find their Hyprland system "bricked" due to a lack of a working input method for system shortcuts and text editing (especially in nvim which is the default editor).

Problem Addressed (Fixes #2054):
Previously, if a user chose a keyboard layout like ru or any other non-US layout, the Hyprland configuration would only include that single layout. This led to a situation where essential system shortcuts (which often rely on a us layout interpretation) would not function, and users would be unable to type effectively in applications like nvim (the default editor), making it impossible to even enter insert mode or modify configuration files.

Solution:
This script modification ensures that:

  1. If the detected keyboard layout from /etc/vconsole.conf is anything other than us, the us layout is prepended to the kb_layout variable (e.g., us,ru).
  2. The kb_options are set to grp:alt_shift_toggle to allow users to easily switch between us and their chosen layout (e.g., Russian) using Alt+Shift.
  3. If the detected layout is us, the configuration remains simple, setting only kb_layout = us without additional options.
  4. Existing kb_layout, kb_variant, and kb_options lines are removed before appending new ones to prevent duplication and ensure a clean configuration update.

This fix prevents the system from becoming unusable for non-US keyboard users, providing a reliable fallback to the us layout when needed for system interactions and ensuring a smooth user experience.

Testing:

  • Tested with XKBLAYOUT="ru" in /etc/vconsole.conf: kb_layout correctly set to us,ru, and kb_options to grp:alt_shift_toggle.
  • Tested with XKBLAYOUT="us" in /etc/vconsole.conf: kb_layout correctly set to us, and kb_options remained

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.

Can't switch between keyboard layouts. Stuck on Russian.

1 participant