LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 04-10-2008, 04:26 PM   #1
Hewson
Member
 
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)

thanks,

Steve
 
Old 04-10-2008, 05:08 PM   #2
jimmy512
Member
 
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,823

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
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:

http://cweiske.de/howto/xmodmap/allinone.html
 
Old 04-11-2008, 11:19 AM   #4
Hewson
Member
 
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 'http://cweiske.de/howto/xmodmap/allinone.html' 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.

Cheers,

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

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
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.



Cheers,
Tink
 
  


Reply


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/Novell 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


All times are GMT -5. The time now is 02:49 AM.

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