Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-10-24 21:41:50

bobdrad
Member
Registered: 2014-03-25
Posts: 3

How to bind a string to a key?

I'd like to bind a text string to a function key, in an application-independent manner (e.g. whenever I press F12 it issues my phone number to whatever app has focus).

Can this be done in Xfce?

This is for Fedora 20, Xfce version 4.10

Thanks,
    Bob

Last edited by bobdrad (2014-10-24 21:44:03)

Offline

#2 2014-10-25 13:39:08

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: How to bind a string to a key?

Try creating an application shortcut (Settings Manager >> Keyboard >> Application Shortcuts) that uses the following command:

bash -c "sleep 0.5 && xdotool type 'my@email.com '"

...and assign it to the F12 key.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2014-10-25 17:28:41

bobdrad
Member
Registered: 2014-03-25
Posts: 3

Re: How to bind a string to a key?

Lol - brilliant! I wonder why the sleep is necessary however? I experimented without it, and it didn't work, so it is really required for some reason...
I was stuck looking for a solution like xmodmap or loadkeys and couldn't get them to work. This is good out-of-box thinking.

Thanks!
Bob

Offline

#4 2014-10-25 18:10:52

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: How to bind a string to a key?

Yeah, its like the command executes too quickly. Learned long ago to delay it slightly.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2014-10-25 19:33:33

bobdrad
Member
Registered: 2014-03-25
Posts: 3

Re: How to bind a string to a key?

Have you filed a bug?

Offline

Board footer

Powered by FluxBB