Yeah... so I wanted a rapidfire/turbo button to use with Castlevania SotN, but noticed that neither ePSXe nor pSX have such a thing. Given that I know a little bit about programming, I thought it would be a good idea to try to make a simple program that could accomplish this for me.
So... basically what I wrote sends a keybd_event (in this case, NUMPAD8, which is what the [ ] key is set to in ePSXe) about every tenth of a second. I've tested the program with numerous different programs such as my source editor, notepad, firefox, PCSX2, ZSNES and it works fine with all of them. But not ePSXe... or pSX...
What gives? Why isn't ePSXe seeing the keybd_event? I was under the impression that that particular function is a system-wide event that the driver for the keyboard uses oO
If anyone here knows anything about this, I'd appreciate the help. Here's the code if that helps:
So... basically what I wrote sends a keybd_event (in this case, NUMPAD8, which is what the [ ] key is set to in ePSXe) about every tenth of a second. I've tested the program with numerous different programs such as my source editor, notepad, firefox, PCSX2, ZSNES and it works fine with all of them. But not ePSXe... or pSX...
What gives? Why isn't ePSXe seeing the keybd_event? I was under the impression that that particular function is a system-wide event that the driver for the keyboard uses oO
If anyone here knows anything about this, I'd appreciate the help. Here's the code if that helps:
Code:
#include <windows.h>
#include <stdlib.h>
void PressKey(DWORD nSleepTime)
{
keybd_event(VK_NUMPAD8, 0x75, KEYEVENTF_EXTENDEDKEY, 0);
keybd_event(VK_NUMPAD8, 0xF075, KEYEVENTF_KEYUP, 0);
Sleep(nSleepTime);
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
while(!(GetAsyncKeyState(VK_F8)))
{
PressKey(100);
}
return 0;
}