You are not logged in.

#1 2010-04-12 17:56:54

bamdad
Member
Registered: 2010-04-03
Posts: 51

espeak shortcut

hi everybody,

i'm trying to set up a keyboard shortcut to read the selected text in the active application. this is really useful if i want to work on something and listen to something else (e.g. a webpage) in the meantime.

the closest i could get is to install xsel, and set up a custom key combination in Preferences > Keyboard shortcuts, like this:

bash -c "xsel --clipboard | espeak"

the problem is that this way i have to ctrl-c the text after selecting it. it's not a big thing, but it would be nice to know how to get the selected text directly, since that way the contents of the clipboard would remain unchanged. i'm guessing i have to get the data from metacity or the panel, but i'm not sure how. can someone point me in the right direction?

thanks,
bamdad

Offline

#2 2010-04-12 20:18:05

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: espeak shortcut

Why have --clipboard as an option if you don't want to use the clipboard?

Do read xsel(1).

Offline

#3 2010-04-13 09:25:27

bamdad
Member
Registered: 2010-04-03
Posts: 51

Re: espeak shortcut

Peasantoid wrote:

Why have --clipboard as an option if you don't want to use the clipboard?

Do read xsel(1).

thanks. i was being really stupid there. smile

Offline

Board footer

Powered by FluxBB