MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / KeybAnyKeyDown

Function KeybAnyKeyDown

source/Keyboard.cpp:383–402  ·  view source on GitHub ↗

NB. Don't need to be concerned about if numpad/cursors are used for joystick, since parent calls JoyProcessKey() just before this.

Source from the content-addressed store, hash-verified

381// NB. Don't need to be concerned about if numpad/cursors are used for joystick,
382// since parent calls JoyProcessKey() just before this.
383void KeybAnyKeyDown(UINT message, WPARAM wparam, bool bIsExtended)
384{
385 if (wparam > 255)
386 {
387 _ASSERT(0);
388 return;
389 }
390
391 if (IsVirtualKeyAnAppleIIKey(wparam))
392 {
393 WPARAM offset = wparam >> 6;
394 UINT bit = wparam & 0x3f;
395 UINT idx = !bIsExtended ? 0 : 1;
396
397 if (message == WM_KEYDOWN)
398 g_AKDFlags[idx][offset] |= (1LL<<bit);
399 else
400 g_AKDFlags[idx][offset] &= ~(1LL<<bit);
401 }
402}
403
404static bool IsAKD(void)
405{

Callers 1

WndProcMethod · 0.85

Calls 1

IsVirtualKeyAnAppleIIKeyFunction · 0.85

Tested by

no test coverage detected