Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

SendKeys Mute/Volume

If you have a question or need help, this is the place to be.
Post Reply
StevenPr
Posts: 20
Joined: Sun Oct 08, 2006 1:02 pm

SendKeys Mute/Volume

Post by StevenPr »

How do I send the Windows key for Mute, Vol Up/Down, etc?

Using these keys would allow programs that display a volume on screen display to work. By updating the soundcard directly it does change the volume but without the OSD.

This site shows Mute is AD and Meedio shows 173, same value in decimal.
http://search.cpan.org/src/MMUSGROVE/Ke ... rtkeys.txt

If I try {Volume_Mute} it says it's undefined. If I use {173} it sends the keys 1 7 3.

Steve
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

Currently these constants are not defined in the parser. I will add them in the next release as "VolumeUp", "VolumeDown" and "VolumeMute".

You can currently use a simple PythonScript for this as a workaround:

Code: Select all

import win32api

win32api.keybd_event(173,0,0,0)
win32api.keybd_event(173,0,2,0)
This one is for VolumeMute. Just change the first parameter of both lines to the other constants to get the remaining keys.
StevenPr
Posts: 20
Joined: Sun Oct 08, 2006 1:02 pm

It Works

Post by StevenPr »

It worked, thank you.

Steve
Post Reply