Results 1 to 8 of 8
  1. #1
    Joined
    May 2002
    Location
    The Lost Continent of Atlantis
    Age
    48
    Posts
    3,694

    bind a key to an audio event?

    I want to use my microphone on my computer....but i dont want is on all the time

    can i somehow bind a key that is not used like say, the windows key on my keyboard, to mute/unmute my microphone

    or maybe bind a key to activate the microphone while it remains by default in the off position...like a push-to-talk key

    reson why i ask is I have a need to run ventrilo, I am one of the oddballs that i hang around that is not using windows...

    I got ventrilo installed via wine and it works very well, however if the aplication is minimized or behind another program the key binds do not work...basically you have to be looking at the ventrilo window to use it...kind of sux if you want to play a game and talk

  2. #2
    Joined
    Oct 2001
    Location
    Southern Ontario
    Age
    46
    Posts
    13,194

    Re: bind a key to an audio event?

    There is an application that is called HotKeys that may allow you to achieve what you are looking for. The documentation isn't all that great so you'll have to do some digging.

    I set it up on my computer some time ago. But to be honest, I can't remember how I was able to determine each of the key codes from my keyboard. But once you've found them, then it's easy to configure. Just one single configuration file that's placed in the /etc directory.
    Last edited by Spankin Partier; 06-22-2006 at 12:49 AM.

  3. #3
    Joined
    Aug 2003
    Location
    American Desert Southwest
    Posts
    314

    Re: bind a key to an audio event?

    use xev to get the keycodes
    Testing - Please Ignore!

  4. #4
    Joined
    May 2002
    Location
    The Lost Continent of Atlantis
    Age
    48
    Posts
    3,694

    Re: bind a key to an audio event?

    i got the key codes, but I think the application will not allow a hot key to work when the program is not in focus...

    if another application takes focus, the hotkeys do not work.

    maybe if there is some way to hold the application in focus while another program is runnig without this one being in front of it.

    would making the application run in tray or as a service work...if so can a wine program be made to run in those ways?

  5. #5
    Joined
    Jan 2003
    Location
    Sweden
    Posts
    1,618

    Re: bind a key to an audio event?

    Don't know if it will work at all (and I per usual have lost the guide I used...) with that app but if you are using KDE you can bind hotkeys to DCOM commands and various other ways of interaction with applications. Worked great for getting the volume up/down buttons on my keyboard working in linux.
    Check the control centre its in there somewhere...

  6. #6
    Joined
    Sep 2002
    Location
    In and out of Detroit
    Posts
    1,556

    Re: bind a key to an audio event?

    Should be able to bind the alsa mute/unmute command (or a script that does it) to the key via one of a variety of apps (Hotkeys, lineakd, xbindkeys).

    So first you'll need to find out the command for muting the mic with amixer

    "Well, let's just say, 'if your VCR is still blinking 12:00,you don't want Linux.'"
    - Bruce Perens, Former Debian Project Leader

  7. #7
    Joined
    May 2002
    Location
    The Lost Continent of Atlantis
    Age
    48
    Posts
    3,694

    Re: bind a key to an audio event?

    Quote Originally Posted by Provicemo
    Should be able to bind the alsa mute/unmute command (or a script that does it) to the key via one of a variety of apps (Hotkeys, lineakd, xbindkeys).

    So first you'll need to find out the command for muting the mic with amixer
    I Think that would probably work...i wonder how i would find out what that is though

    seems it might be easier to just splice in a momentary switch into the mic cable...

  8. #8
    Joined
    Sep 2002
    Location
    In and out of Detroit
    Posts
    1,556

    Re: bind a key to an audio event?

    Check the man page for amixer.
    I think amixer set Mic toggle should have the effect, but you might need to try around with a few things

    "Well, let's just say, 'if your VCR is still blinking 12:00,you don't want Linux.'"
    - Bruce Perens, Former Debian Project Leader

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •