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

Search shortcut: CMD+F4 key combination not working #1974

Open
1 task
BarunKGP opened this issue May 24, 2024 · 3 comments
Open
1 task

Search shortcut: CMD+F4 key combination not working #1974

BarunKGP opened this issue May 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@BarunKGP
Copy link

Description

Setting the search_shortcut: CMD+F4 in the $CONFIG/config/default.yml file does not configure the CMD+F4 key combo to launch espanso search. I tried this on a Macbook Pro M3 with MacOS Sonoma 14.1

Steps to reproduce

  1. Add the search_shortcut: CMD+F4 key in $CONFIG/config/default.yml
  2. Reload the espanso config and use the above key combination.

Expected behavior

Launches espanso search bar

Screenshots

No response

Logs

15:44:48 [worker(39510)] [INFO] waiting for engine exit mode...
15:44:48 [worker(39510)] [INFO] exiting worker process...
15:44:48 [worker(39536)] [INFO] reading configs from: "/Users/dasb/Library/Application Support/espanso"
15:44:48 [worker(39536)] [INFO] reading packages from: "/Users/dasb/Library/Application Support/espanso/match/packages"
15:44:48 [worker(39536)] [INFO] using runtime dir: "/Users/dasb/Library/Caches/espanso"
15:44:48 [worker(39536)] [INFO] system info: Darwin v14.1 - kernel: 23.1.0
15:44:48 [worker(39536)] [INFO] using CocoaAppInfoProvider
15:44:48 [worker(39536)] [INFO] using CocoaSource
15:44:48 [worker(39536)] [INFO] using MacInjector
15:44:48 [worker(39536)] [INFO] using CocoaClipboard
15:44:48 [worker(39536)] [INFO] binded to IPC unix socket: /Users/dasb/Library/Caches/espanso/espansoworkerv2.sock
15:44:48 [worker(39536)] [INFO] monitoring the status of the daemon process
15:44:48 [worker(39536)] [INFO] monitoring the status of secure input
15:44:59 [worker(39536)] [INFO] engine eventloop has terminated, propagating exit event...
15:45:01 [worker(39536)] [ERROR] unable to send UIEvent to engine: sending on a disconnected channel
15:45:01 [worker(39536)] [ERROR] thread 'main' panicked at 'broken UI->Engine channel': espanso/src/cli/worker/mod.rs:157
dasb@ADSKHKNQQWVR71 ~ % clear
dasb@ADSKHKNQQWVR71 ~ % espanso log
15:48:17 [daemon(39653)] [INFO] reading configs from: "/Users/dasb/Library/Application Support/espanso"
15:48:17 [daemon(39653)] [INFO] reading packages from: "/Users/dasb/Library/Application Support/espanso/match/packages"
15:48:17 [daemon(39653)] [INFO] using runtime dir: "/Users/dasb/Library/Caches/espanso"
15:48:17 [daemon(39653)] [INFO] system info: Darwin v14.1 - kernel: 23.1.0
15:48:17 [daemon(39653)] [INFO] espanso version: 2.2.1
15:48:17 [daemon(39653)] [INFO] watching for changes in path: "/Users/dasb/Library/Application Support/espanso"
15:48:17 [daemon(39653)] [INFO] spawning the worker process...
15:48:17 [daemon(39653)] [INFO] binded to IPC unix socket: /Users/dasb/Library/Caches/espanso/espansodaemonv2.sock
15:48:17 [worker(39654)] [INFO] reading configs from: "/Users/dasb/Library/Application Support/espanso"
15:48:17 [worker(39654)] [INFO] reading packages from: "/Users/dasb/Library/Application Support/espanso/match/packages"
15:48:17 [worker(39654)] [INFO] using runtime dir: "/Users/dasb/Library/Caches/espanso"
15:48:17 [worker(39654)] [INFO] system info: Darwin v14.1 - kernel: 23.1.0
15:48:17 [worker(39654)] [INFO] using CocoaAppInfoProvider
15:48:17 [worker(39654)] [INFO] using CocoaSource
15:48:17 [worker(39654)] [INFO] using MacInjector
15:48:17 [worker(39654)] [INFO] using CocoaClipboard
15:48:17 [worker(39654)] [INFO] binded to IPC unix socket: /Users/dasb/Library/Caches/espanso/espansoworkerv2.sock
15:48:17 [worker(39654)] [INFO] monitoring the status of the daemon process
15:48:17 [worker(39654)] [INFO] monitoring the status of secure input
15:48:30 [worker(39654)] [WARN] detected inconsistent modifier state for keys [(Meta, 55)], sending compensating events...
15:48:42 [daemon(39653)] [INFO] configuration change detected, restarting worker process...
15:48:42 [worker(39654)] [INFO] engine eventloop has terminated, propagating exit event...
15:48:42 [worker(39654)] [INFO] waiting for engine exit mode...
15:48:42 [worker(39654)] [INFO] exiting worker process...
15:48:42 [daemon(39653)] [INFO] spawning the worker process...
15:48:42 [worker(39662)] [INFO] reading configs from: "/Users/dasb/Library/Application Support/espanso"
15:48:42 [worker(39662)] [INFO] reading packages from: "/Users/dasb/Library/Application Support/espanso/match/packages"
15:48:42 [worker(39662)] [INFO] using runtime dir: "/Users/dasb/Library/Caches/espanso"
15:48:42 [worker(39662)] [INFO] system info: Darwin v14.1 - kernel: 23.1.0
15:48:42 [worker(39662)] [INFO] using CocoaAppInfoProvider
15:48:42 [worker(39662)] [INFO] using CocoaSource
15:48:42 [worker(39662)] [INFO] using MacInjector
15:48:42 [worker(39662)] [INFO] using CocoaClipboard
15:48:42 [worker(39662)] [INFO] binded to IPC unix socket: /Users/dasb/Library/Caches/espanso/espansoworkerv2.sock
15:48:42 [worker(39662)] [INFO] monitoring the status of the daemon process
15:48:42 [worker(39662)] [INFO] monitoring the status of secure input
15:49:05 [daemon(39653)] [INFO] configuration change detected, restarting worker process...
15:49:05 [worker(39662)] [INFO] engine eventloop has terminated, propagating exit event...
15:49:05 [worker(39662)] [INFO] waiting for engine exit mode...
15:49:05 [worker(39662)] [INFO] exiting worker process...
15:49:06 [daemon(39653)] [INFO] spawning the worker process...
15:49:06 [worker(39666)] [INFO] reading configs from: "/Users/dasb/Library/Application Support/espanso"
15:49:06 [worker(39666)] [INFO] reading packages from: "/Users/dasb/Library/Application Support/espanso/match/packages"
15:49:06 [worker(39666)] [INFO] using runtime dir: "/Users/dasb/Library/Caches/espanso"
15:49:06 [worker(39666)] [INFO] system info: Darwin v14.1 - kernel: 23.1.0
15:49:06 [worker(39666)] [INFO] using CocoaAppInfoProvider
15:49:06 [worker(39666)] [INFO] using CocoaSource
15:49:06 [worker(39666)] [INFO] using MacInjector
15:49:06 [worker(39666)] [INFO] using CocoaClipboard
15:49:06 [worker(39666)] [INFO] binded to IPC unix socket: /Users/dasb/Library/Caches/espanso/espansoworkerv2.sock
15:49:06 [worker(39666)] [INFO] monitoring the status of the daemon process
15:49:06 [worker(39666)] [INFO] monitoring the status of secure input

Your environment

  • Operating system and version (e.g., Ubuntu 20.04.2 LTS): macOS Sonoma 14.1
  • Espanso version (e.g., 2.1.4-beta): 2.2.1

Self-service

  • I'd be willing to fix this bug myself.
@BarunKGP BarunKGP added the bug Something isn't working label May 24, 2024
@joh6nn
Copy link
Collaborator

joh6nn commented May 24, 2024

can you share the relevant portion of your config file, please?

@BarunKGP
Copy link
Author

Sure, here is my config:

# espanso configuration file

# For a complete introduction, visit the official docs at: https://espanso.org/docs/

# You can use this file to define the global configuration options for espanso.
# These are the parameters that will be used by default on every application,
# but you can also override them on a per-application basis.

# To make customization easier, this file contains some of the commonly used
# parameters. Feel free to uncomment and tune them to fit your needs!

# --- Toggle key

# Customize the key used to disable and enable espanso (when double tapped)
# Available options: CTRL, SHIFT, ALT, CMD, OFF
# You can also specify the key variant, such as LEFT_CTRL, RIGHT_SHIFT, etc...
# toggle_key: ALT
# You can also disable the toggle key completely with
# toggle_key: OFF

# --- Injection Backend

# Espanso supports multiple ways of injecting text into applications. Each of
# them has its quirks, therefore you may want to change it if you are having problems.
# By default, espanso uses the "Auto" backend which should work well in most cases,
# but you may want to try the "Clipboard" or "Inject" backend in case of issues.
# backend: Clipboard

# --- Auto-restart

# Enable/disable the config auto-reload after a file change is detected.
# auto_restart: false

# --- Clipboard threshold

# Because injecting long texts char-by-char is a slow operation, espanso automatically
# uses the clipboard if the text is longer than 'clipboard_threshold' characters.
# clipboard_threshold: 100

# For a list of all the available options, visit the official docs at: https://espanso.org/docs/
search_shortcut: CMD+F4 

I've only added the search_shortcut key to the default config. I've also noticed that changing the search shortcut to something else works. I have it set up to CMD + E currently, and it's working as expected. So, this is probably an issue only with that specific configuration.

@BarunKGP
Copy link
Author

It also appears that making changes to the config can sometimes break espanso. I tried to edit the config file, changing the search shortcut to something else. Upon saving, the logs show some errors with secure input:

18:17:49 [daemon(58186)] [INFO] reading configs from: "/Users/dasb/Library/Application Support/espanso"
18:17:49 [daemon(58186)] [INFO] reading packages from: "/Users/dasb/Library/Application Support/espanso/match/packages"
18:17:49 [daemon(58186)] [INFO] using runtime dir: "/Users/dasb/Library/Caches/espanso"
18:17:49 [daemon(58186)] [INFO] system info: Darwin v14.1 - kernel: 23.1.0
18:17:49 [daemon(58186)] [INFO] watching for changes in path: "/Users/dasb/Library/Application Support/espanso"
18:17:49 [daemon(58186)] [INFO] espanso version: 2.2.1
18:17:49 [daemon(58186)] [INFO] spawning the worker process...
18:17:49 [daemon(58186)] [INFO] binded to IPC unix socket: /Users/dasb/Library/Caches/espanso/espansodaemonv2.sock
18:17:49 [worker(58187)] [INFO] reading configs from: "/Users/dasb/Library/Application Support/espanso"
18:17:49 [worker(58187)] [INFO] reading packages from: "/Users/dasb/Library/Application Support/espanso/match/packages"
18:17:49 [worker(58187)] [INFO] using runtime dir: "/Users/dasb/Library/Caches/espanso"
18:17:49 [worker(58187)] [INFO] system info: Darwin v14.1 - kernel: 23.1.0
18:17:49 [worker(58187)] [INFO] using CocoaAppInfoProvider
18:17:49 [worker(58187)] [INFO] using CocoaSource
18:17:49 [worker(58187)] [INFO] using MacInjector
18:17:49 [worker(58187)] [INFO] using CocoaClipboard
18:17:49 [worker(58187)] [INFO] binded to IPC unix socket: /Users/dasb/Library/Caches/espanso/espansoworkerv2.sock
18:17:49 [worker(58187)] [INFO] monitoring the status of the daemon process
18:17:49 [worker(58187)] [INFO] monitoring the status of secure input
18:17:49 [worker(58187)] [INFO] secure input has been acquired, preventing espanso from working correctly. Our guess is that this is caused by 'Terminal', but there are cases in which the detection is unreliable. Full path: /System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal

Something like this happened earlier today when I was investigating this issue but I was able to run espanso restart and the service resumed working as expected. This time around however, the issue persists even beyond restarting espanso. The onscreen hints suggested retrying after turning the screen off and on again, but that did not help either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants