Closed pavelxdd closed 6 months ago
Fixed! The keyboard layout is now restored to default after closing the window.
That was fast! Thanks, it works as expected.
@artemsen actually it only works on window close events. But if I have a window in a sway scratchpad (a text editor or terminal) and show/hide it by hotkey, then the language layout doesn't change to default when scratchpad is hidden.
Also, when switching from text editor to another empty workspace, the language layout doesn't change as well.
Is there a simple solution to solve these two issues?
Currently the swaykbdd handles a few number of events: changing keyboard layout, changing focus and closing window. It knows nothing about a scratchpad with its show/hide operation. Actually I don't know what it is either, so I can't help you here. But you are welcome to create a pull request with implementation of this feature =)
Never mind. I've prepended my launcher hotkey with input type:keyboard xkb_switch_layout 0
to always start it with default layout.
Hello. I have a proposal to treat empty workspaces as distinct windows for language layout.
Current Behavior: 1) Open a text editor in an empty workspace. 2) Switch to a non-English layout and type some text. 3) Close the text editor, leaving the workspace empty. 4) The keyboard layout remains the same as it was in the text editor. 5) Opening a launcher (like bemenu, fuzzel, or wmenu) and trying to enter a command results in text in the non-English layout, necessitating an extra layout switch.
Proposed Change:
Store the keyboard layout for an empty workspace separately. When a window in a workspace is closed, leaving the workspace empty, the keyboard layout would automatically revert to a default layout (e.g., English). This would streamline the user experience, especially when using launchers or command prompts in empty workspaces.
I believe this enhancement would improve the usability of sway in multi-layout environments.
Looking forward to hearing your thoughts.
Thank you for your consideration.