PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

external keyboard with GAPI

Is there anyway to detect input from an external keyboard such as a Targus Stowaway when using the GAPI? I ask because my math program SpaceTime is done using the GAPI.

Thanks in advance.
As far as I am aware, GAPI will only detect the hardware buttons actually on the device.

Why not use the 'WM_KEYUP' Windows message?

Example:

Code:

LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
switch (iMsg)
{
case WM_KEYUP:
{
if(wParam == 'A')
{
//'A' Key pressed...
return 0;
}

}
}

return DefWindowProc (hwnd, iMsg, wParam, lParam);
}
gamefreaks wrote:
As far as I am aware, GAPI will only detect the hardware buttons actually on the device.


GAPI doesn't even do that. GAPI only does 2 things for input:

1) Disable the launch of applications associated with the buttons (contacts, inbox, ...)

2) Report the virtual key codes for the buttons.


gamefreaks wrote:
Why not use the 'WM_KEYUP' Windows message?


That should do it.
Thanks for your help! It works!
No probs. :wink: