MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / sendmmcodes

Function sendmmcodes

src/inputdevice.cpp:8819–8837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8817#define STEALTHF_E1KEY 0x01
8818
8819static void sendmmcodes (int code, int newstate)
8820{
8821 uae_u8 b;
8822
8823 b = RAW_STEALTH | IECODE_UP_PREFIX;
8824 record_key(((b << 1) | (b >> 7)) & 0xff, true);
8825 b = IECODE_UP_PREFIX;
8826 if ((code >> 8) == 0x01)
8827 b |= STEALTHF_E0KEY;
8828 if ((code >> 8) == 0x02)
8829 b |= STEALTHF_E1KEY;
8830 if (!newstate)
8831 b |= STEALTHF_UPSTROKE;
8832 record_key(((b << 1) | (b >> 7)) & 0xff, true);
8833 b = ((code >> 4) & 0x0f) | IECODE_UP_PREFIX;
8834 record_key(((b << 1) | (b >> 7)) & 0xff, true);
8835 b = (code & 0x0f) | IECODE_UP_PREFIX;
8836 record_key(((b << 1) | (b >> 7)) & 0xff, true);
8837}
8838
8839// main keyboard press/release entry point
8840int inputdevice_translatekeycode (int keyboard, int scancode, int state, bool alwaysrelease)

Callers 1

Calls 1

record_keyFunction · 0.85

Tested by

no test coverage detected