[go: nahoru, domu]

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

Switching Layouts restarts SyncTool and takes focus #1976

Open
1 task
MSBlueVn opened this issue May 26, 2024 · 11 comments · May be fixed by #1982
Open
1 task

Switching Layouts restarts SyncTool and takes focus #1976

MSBlueVn opened this issue May 26, 2024 · 11 comments · May be fixed by #1982
Labels
bug something isn't working wayland related to the Wayland display communication protocol

Comments

@MSBlueVn
Copy link

Description

Related to this:
#1776
I am on Zorin and Wayland, and have that thing as the link. However, when I switch layouts after a few seconds, the Sync Tool restarts and pulls focus to it.

Steps to reproduce

  1. On Zorin OS (or any other Wayland) have espanso running and have 2 keyboard layouts
  2. Start typing in one layout, switch to the other layout
  3. Continue typing, see that focus was switched to the Sync Tool

Expected behavior

No focus shift when changing layouts

Screenshots

No response

Logs

No response

Your environment

  • Public source code:
  • Environment name and version (e.g., Rust 1.59.0):
  • Operating system and version (e.g., Ubuntu 20.04.2 LTS): Latest
  • Espanso version (e.g., 2.1.4-beta): 2.2.1

Self-service

  • I'd be willing to fix this bug myself.
@MSBlueVn MSBlueVn added the bug something isn't working label May 26, 2024
@smeech
Copy link
Collaborator
smeech commented Jun 4, 2024

How are you switching keyboard layouts?

Unlike in Windows, macOS, and X11, Espanso on Wayland doesn't automatically detect keyboard layout, so it has to be specified in config/default.yml using the keyboard_layout: parameter. I guess it won't take kindly to a layout change whilst running.

@smeech smeech added the question further information is requested label Jun 4, 2024
@MSBlueVn
Copy link
Author
MSBlueVn commented Jun 5, 2024

Hello, and thanks for your response, I am switching between the layouts with a keyboard shortcut combo (alt+shift) could it be configured to ignore layout changes and only work in one layout?

@smeech
Copy link
Collaborator
smeech commented Jun 5, 2024

If the layouts are different, you'll have to change the keyboard_layout: parameter in config/default.yml (although you may be able to specify it in a different config file of its own instead).

When you switch layout, you'll need a way of changing that value and restarting Espanso (it might detect the change and reload automatically) to force it to pick up the new configuration. This would probably need a short script associated with your keyboard shortcut.

If you want to pursue this, let me know if you need further help.

What is Sync Tool, by the way?

@smeech smeech removed the bug something isn't working label Jun 5, 2024
@MSBlueVn
Copy link
Author
MSBlueVn commented Jun 5, 2024

But this is the exact problem, it is restarting, and the sync tool is taking the focus when it restarts.

@smeech
Copy link
Collaborator
smeech commented Jun 5, 2024

What's the "Sync Tool"?

@MSBlueVn
Copy link
Author
MSBlueVn commented Jun 5, 2024

image

This, it's a process that is open always, and it closes and reopens when I switch layouts, and takes the focus.

@smeech
Copy link
Collaborator
smeech commented Jun 5, 2024

Thank you. We're puzzled, and now discussing it on Discord.

@MSBlueVn
Copy link
Author
MSBlueVn commented Jun 5, 2024

Cool thanks!

@morgan-dgk
Copy link
Collaborator

Chiming in here the sync tool is required under wayland to sync keyboard modifier state with the rest of espanso (see #972). I will look into this and see if it is possible to prevent focus shifting to this window.

@MSBlueVn
Copy link
Author
MSBlueVn commented Jun 6, 2024

Thanks a lot!

@AucaCoyan AucaCoyan added bug something isn't working wayland related to the Wayland display communication protocol and removed question further information is requested labels Jul 3, 2024
@MSBlueVn
Copy link
Author

Any update on this? It is really disrupting to my flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working wayland related to the Wayland display communication protocol
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants