Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Keyboard Shortcut #51

Open
ghost opened this issue Jan 25, 2022 · 2 comments
Open

Keyboard Shortcut #51

ghost opened this issue Jan 25, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 25, 2022

Hey! Just wondering if it is possible to implement a keyboard shortcut functionality?

@jn64
Copy link

jn64 commented Apr 25, 2022

You can do it using xclip or similar tool to get selections, and assign it to a keyboard shortcut using your desktop environment.

For example using GNOME:

  1. Write a script containing the following:

     larynx -v en "$(xclip -selection primary -out)"
    
  2. Save it somewhere in your PATH, e.g. ~/.local/bin/tts

  3. In GNOME Settings > Keyboard > Custom Shortcuts, create a new shortcut with the command tts. I have chosen Super + D as the shortcut key.

  4. Now you can select text in programs such as a browser or text editor and press Super + D to read it using larynx.

@ghost
Copy link
Author

ghost commented Apr 25, 2022

Thanks! Working

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant