Is there a way for my program to be able to "fire" the special keys on my keyboard, such as the media keys (play, pause, next etc..). I'm trying to create an app that performs those functions and an easy way would be to simulate those keys being pressed. If it makes it easier, this is a personal project so I don't mind if the solution isn't generic and/or won't work for all keyboards. I've looked around and I think SendKey might be one way to go, but I don't know what the scan codes are for these special keys.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
The following link provided the great idea to using the multimedia keyboard keys in your application but this article is for c++, you have to find out by yourself to how should to use those functions.
EDIT : Based on these articles, I implemented some of media function key which lets you to control volume from your application.
Just copy and use wherever you want.
Low-Level Keyboard Hook in C#
Using Multimedia Keyboard Keys in Your Own Program