LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   mapping keyboard custom keys (https://www.linuxquestions.org/questions/linux-general-1/mapping-keyboard-custom-keys-634479/)

Hewson 04-10-2008 04:26 PM

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

jimmy512 04-10-2008 05:08 PM

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.

David the H. 04-10-2008 05:39 PM

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

Hewson 04-11-2008 11:19 AM

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

Tinkster 04-13-2008 08:48 PM

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


All times are GMT -5. The time now is 06:55 PM.