You are not logged in.

#1 2006-09-10 14:55:16

Eliatamby
Member
Registered: 2005-05-06
Posts: 80

How do I hide a keymapped media button function's output?

I just have mapped a couple of media keys on my keyboard to amixer -q volume controls.  It all went rather smoothly with with my .inputrc have executing the amixer -q etc. command when the relevant buttons are pressed.  The only issue with this, however, is that whenever I press the key, it actually get prints the the command to the vt that I'm currently on.  This is a pain because I can't, for example, be browsing lynx, and press the Vol+ button since lynx.  It also means that if I want to increase the volume from 50 to 100, I fill up 50 lines of the screen with amixer -q etc. just raising the volume

So, I'm wondering if there is anyway to call the associated command without it actually going through any terminal.  I would like to press a the button and have a background process actually call the command and not disturb my other apps or screen estate.  Can cron do something like that?  I know it's a scheduler -- can it run on button press or some such? 
If that's not feasible, maybe I can route it through to an unsed vt?

Anyone have any ideas?

Offline

#2 2006-09-10 22:47:26

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: How do I hide a keymapped media button function's output?

adding:

2&> /dev/null

at the end of your amixer commands should remove all output.

Offline

#3 2006-09-13 07:14:30

Eliatamby
Member
Registered: 2005-05-06
Posts: 80

Re: How do I hide a keymapped media button function's output?

Thanks Snowman, but it didn't work.  I was getting the whole amixer.../dev/nul line printed to the console.  I think I'll try esekeyd or something

Offline

Board footer

Powered by FluxBB