You are not logged in.

#1 2013-03-31 21:53:36

AlecB
Member
Registered: 2013-01-26
Posts: 114

How to map a key to open an application

My keyboard has a custom key to open an email application. How can I set it to open my email client (Thunderbird)? I have read about programming extra keys, but have found nothing about setting them to open applications.


I believe in Christianity as I believe that the sun has risen: not only because I see it, but because by it I see everything else.
C. S. Lewis

Offline

#2 2013-03-31 22:10:53

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: How to map a key to open an application

Possible solutions depend on your personal environment. Desktop Environments often have their own easy to set up methods to map keys. A very flexible method is xbindkeys, which is WE / DE independent.

Have a read:
https://wiki.archlinux.org/index.php/Xbindkeys
https://wiki.archlinux.org/index.php/Ex … ys_in_Xorg

Offline

#3 2013-03-31 22:13:35

dag
Member
From: US
Registered: 2013-01-20
Posts: 216

Re: How to map a key to open an application

xev to find what it is called then map it


--------------------------------------
alcoves wonder creates the wonder unto the ages; never lose that.

Offline

#4 2013-04-01 01:08:59

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: How to map a key to open an application

You may not need to run xev or other programs.  Try going to Activities > Show Applications > System Tools > System Settings > Keyboard > Shortcuts > Launchers or Custom Shortcut.  You should be able to get your program to run from there.  When it says "New Accelerator", press your desired key.

EDIT:  Oops, I thought I was in the Fedora forum.  The above is for Gnome.  For other desktops such as KDE or XFCE they have similar options.

With xev, run xev in terminal and then press the key.  You should see a keycode and keysym, although the results vary.  Following is one example when I press my browser "Forward" key.  Note the keycode in this example is 167.  The keysym is XF86Forward.

KeyPress event, serial 31, synthetic NO, window 0x1000001,
    root 0x96, subw 0x1000002, time 26727650, (54,66), root:(56,189),
    state 0x0, keycode 167 (keysym 0x1008ff27, XF86Forward), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

If you don't get any output in xev, try acpi_listen.

$ acpi_listen
button/fnf11 FF11 00000080 00000000 K

Last edited by David Batson (2013-04-01 01:11:18)

Offline

#5 2013-04-01 02:29:43

AlecB
Member
Registered: 2013-01-26
Posts: 114

Re: How to map a key to open an application

Thanks. I know the keycode and keysym, but I'm not sure how to set the key to open Thunderbird.


I believe in Christianity as I believe that the sun has risen: not only because I see it, but because by it I see everything else.
C. S. Lewis

Offline

#6 2013-04-01 03:40:28

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,830

Re: How to map a key to open an application

AlecB wrote:

Thanks. I know the keycode and keysym, but I'm not sure how to set the key to open Thunderbird.

As mentioned in the first reply, that's desktop specific. Search for instructions for the DE you use.

If you're only using a wm then there are small utility apps like xbindkeys which can do that as well.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#7 2013-04-01 03:48:11

AlecB
Member
Registered: 2013-01-26
Posts: 114

Re: How to map a key to open an application

Ok. I'm using Enlightenment 17, so I'll do some research into what it offers.


I believe in Christianity as I believe that the sun has risen: not only because I see it, but because by it I see everything else.
C. S. Lewis

Offline

#8 2013-04-01 04:58:27

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,830

Re: How to map a key to open an application

AlecB wrote:

Ok. I'm using Enlightenment 17, so I'll do some research into what it offers.

That's a WM not a DE, so you'd likely need some third-party managers.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#9 2013-04-01 09:02:06

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: How to map a key to open an application

I am using Bodhi Enlightenment.  I would think this feature would be the same in Arch.

Left click on the desktop, choose Settings > Settings Panel > scroll to the right until Input is highlighted > scroll down to Key Bindings.  From there you can choose a key or key combo and the path to launch the application (i.e. /usr/bin/opera).

Offline

#10 2013-04-01 14:54:02

AlecB
Member
Registered: 2013-01-26
Posts: 114

Re: How to map a key to open an application

Hmm, I've been trying that, but when I select the keybinding, and select "open application,"  it gives me some "action params." I really don't know what it wants me to tell it. The application's name perhaps, or the filepath?


I believe in Christianity as I believe that the sun has risen: not only because I see it, but because by it I see everything else.
C. S. Lewis

Offline

#11 2013-04-01 20:36:37

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: How to map a key to open an application

The filename and path in one line.  I don't run Thunderbird, so I don't know the exact filename or path.  I gave an example above to launch the Opera browser, so it would be similar to that.  Sometimes things get more complex, but I doubt that would be the case with Thunderbird.

Offline

#12 2013-04-02 03:03:37

AlecB
Member
Registered: 2013-01-26
Posts: 114

Re: How to map a key to open an application

I've been having a little bit of trouble finding Thunderbird's path, so I used the command action to open Thunderbird. It's not the most straightforward way to do it, but it works!


I believe in Christianity as I believe that the sun has risen: not only because I see it, but because by it I see everything else.
C. S. Lewis

Offline

#13 2013-04-02 03:21:22

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,770
Website

Re: How to map a key to open an application

type thunderbird
which thunderbird

Also, not really Kernel & Hardware, moving to NC...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB