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

Facilitate implementation of <Alt>, <Meta> etc. keyboard triggers #1933

Open
smeech opened this issue Apr 6, 2024 · 3 comments
Open

Facilitate implementation of <Alt>, <Meta> etc. keyboard triggers #1933

smeech opened this issue Apr 6, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@smeech
Copy link
Collaborator

smeech commented Apr 6, 2024

We have many requests to extend Espanso triggers to keyboard combinations including <Alt> and <Meta> etc. keys.

Operating systems have their own keybinding facilities which could be linked to commands such as espanso match exec -t <trigger>, but Espanso attempts to delete the trigger phrase, which doesn't exist when called in this manner, and therefore deletes the preceding text instead.

Currently, the best workaround I have found is to bind a key combination to a command using an external utility, e.g. xdotool sleep 0.2 type <trigger>, which invokes Espanso indirectly.

An additional parameter to espanso match exec -t which suppresses the trigger deletion, would enable anyone to link such a command to a keybinding and invoke it directly with that key-combination.

#1259, #1188, #1932,

@smeech smeech added the enhancement New feature or request label Apr 6, 2024
@smeech smeech changed the title Possible impelemntation of <Alt>, <Meta> etec. Keyboard triggers Possible impelemntation of <Alt>, <Meta> etc. Keyboard triggers Apr 6, 2024
@smeech smeech changed the title Possible impelemntation of <Alt>, <Meta> etc. Keyboard triggers Possible implementation of <Alt>, <Meta> etc. Keyboard triggers Apr 6, 2024
@smeech smeech changed the title Possible implementation of <Alt>, <Meta> etc. Keyboard triggers Possible implementation of <Alt>, <Meta> etc. keyboard triggers Apr 6, 2024
@DoctorSubtilis
Copy link

Interesting. I have Linux and xdotool, but I don't understand how to do. Maybe you are speaking of a modification of espanso code? And not about something we can do?

@smeech
Copy link
Collaborator Author

smeech commented Apr 7, 2024

Yes, my idea requires modification of the codebase, but I'm hoping it's simple enough to implement.

In the meantime, you can use the xdotool command I mentioned above. Happy to help if you need it.

@smeech smeech changed the title Possible implementation of <Alt>, <Meta> etc. keyboard triggers Facilitate implementation of <Alt>, <Meta> etc. keyboard triggers Apr 9, 2024
@percit
Copy link

percit commented Apr 12, 2024

Yeah, would be lovely to have this instead of having one tool for alt shortcuts and another for other text application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants