Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-10-2008, 04:26 PM   #1
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Rep: Reputation: 32
mapping keyboard custom keys

Hi LQers,

I have a cheap micro$oft keyboard. It includes volume, calculator, and mail buttons. Is there a way i could map them to applications under linux?

for example: mail button should open thunderbird or calculator button should open a terminal window with python loaded (i use python for simple a calculator)


Old 04-10-2008, 05:08 PM   #2
Registered: Oct 2006
Location: London
Distribution: Arch
Posts: 183

Rep: Reputation: 31
You should take a look at keytouch (check it has a module for your keyboard first). It works great on my logitech internet keyboard. There seem to be quite a few microsoft keyboards in there, so there may well be one which works with your keyboard. You can assign default actions to the keys, (like back and forward in your web browser), or supply a custom command, like opening a terminal or email application.
Old 04-10-2008, 05:39 PM   #3
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,826

Rep: Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973
The easiest way is probably by using lineak. It should already have keymaps for most of the major keyboards. But if you don't want the extra daemon to run in the background, you can map the buttons to keycodes with xmodmap, then assign desktop shortcuts to them. See here:
Old 04-11-2008, 11:19 AM   #4
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Original Poster
Rep: Reputation: 32
Jimmy & Dave,

Thanks for the responses! I tried out '' Sound volume/mute are working great. Mail and web not so much.

I'm guessing I need to map the XF86Calculator event into some KDE thing? I'll look into it when I have a chance. Dave, if you happen to know the direction to point me in that would be great.


Old 04-13-2008, 08:48 PM   #5
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I'm not Dave, but you could start by firing up xev and see whether those keys produce
scan-codes. My "UltraNav" keyboard for instance has several keys that don't.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mapping Keyboard Special Keys(some success at long last) RedShirt SUSE / openSUSE 0 11-13-2005 09:43 PM
mapping non standard keyboard keys gravesb Linux - Hardware 13 08-31-2005 07:16 PM
mapping custom keys TomalakBORG Linux - General 8 04-24-2005 03:27 PM
mapping the keyboard scroll whell to emulate + & - keys micker Linux - Software 2 01-25-2005 07:15 AM
mapping keyboard keys fedetxf Linux - Newbie 1 03-23-2004 08:49 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration