--- np2/keystat.c 2004/04/02 19:31:26 1.13 +++ np2/keystat.c 2005/02/04 05:32:22 1.16 @@ -5,6 +5,7 @@ #include "iocore.h" #include "keystat.h" #include "keystat.tbl" +#include "softkbd.h" typedef struct { @@ -179,6 +180,9 @@ static void reloadled(void) { keyctrl.kanaref = keystat.ref[0x72]; keyctrl.capsref = keystat.ref[0x71]; +#if defined(SUPPORT_SOFTKBD) + softkbd_led(getledstat()); +#endif } void keystat_ctrlreset(void) { @@ -186,12 +190,13 @@ void keystat_ctrlreset(void) { keyctrl.reqparam = 0; keystat.ref[0x72] = keyctrl.kanaref; keystat.ref[0x71] = keyctrl.capsref; +#if defined(SUPPORT_SOFTKBD) + softkbd_led(getledstat()); +#endif } void keystat_ctrlsend(REG8 dat) { - return; - if (!keyctrl.reqparam) { keyctrl.mode = dat; switch(dat) { @@ -265,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 {