smartydebater
Baseband Member
- Messages
- 39
Hi. I'm trying to make a program that would make a beep noise (on a computers motherboard) every time a user presses a certain key such as "A" or "B" etc... So far I've come up with the code to make the beep noise, but I'm not sure how to gather the keystrokes. Any suggestions?
Thanks,
David
Code:
//C++ code -- motherboard beep
//compiled in dev-c++ version 4.9.9.2
#include <iostream>
#include <windows.h> // WinApi header
using namespace std;
int main()
{
Beep(523,500); // 523 hertz for 500 milliseconds
cin.get(); // wait
return 0; //no errors
}
Thanks,
David