--- np2/keystat.c 2004/04/05 09:45:06 1.14 +++ np2/keystat.c 2005/02/07 14:46:07 1.17 @@ -88,7 +88,7 @@ const KEYNAME *n; const KEYNAME *nterm; n = keyname; - nterm = keyname + (sizeof(keyname) / sizeof(KEYNAME)); + nterm = keyname + NELEMENTS(keyname); while(n < nterm) { if (!milstr_cmp(n->str, str)) { return(n->num); @@ -197,8 +197,6 @@ void keystat_ctrlreset(void) { void keystat_ctrlsend(REG8 dat) { - return; - if (!keyctrl.reqparam) { keyctrl.mode = dat; switch(dat) { @@ -272,10 +270,22 @@ void keystat_down(const UINT8 *key, REG8 keydata = *key++; keycode = (keydata & 0x7f); if (keycode < 0x70) { +#if 1 // 05/02/04 + if (keystat.ref[keycode] != NKEYREF_NC) { + if (!(kbexflag[keycode] & KBEX_NONREP)) { + keyboard_send((REG8)(keycode + 0x80)); + keystat.ref[keycode] = NKEYREF_NC; + } + } + if (keystat.ref[keycode] == NKEYREF_NC) { + keyboard_send(keycode); + } +#else if ((keystat.ref[keycode] == NKEYREF_NC) || (!(kbexflag[keycode] & KBEX_NONREP))) { keyboard_send(keycode); } +#endif keystat.ref[keycode] = ref; } else {