I'm just trying to write a little autopilot plugin, and want to switch it on and off by some key (let's say F5), but I just don't get it working.
Here's the code, nothing is happening when I press F5:
:thankyou:
Here's the code, nothing is happening when I press F5:
Code:
#define STRICT
#define ORBITER_MODULE
#include <Orbitersdk.h>
DLLCLBK void opcPreStep(double simt, double simdt, double mjd)
{
}
DLLCLBK int clbkConsumeDirectKey(char *kstate)
{
if(KEYDOWN(kstate,OAPI_KEY_F5))
{
sprintf(oapiDebugString(),"PRESSED");
}
return 0;
}
:thankyou: