X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_in.c;h=44c6aac1b04169c92e6b5bf7f6b8377235c74d3c;hb=07c33a14eb8a32cfc537033ec2146c48e98ece8f;hp=8d17c37ff27d8950ff024fc8f3f306c5fa6f0cc8;hpb=6854ba96cbb436d52b8baaf251c57f1fa33226fa;p=16.git diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 8d17c37f..44c6aac1 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -501,11 +501,17 @@ IN_GetJoyButtonsDB(word joy) static void INL_StartKbd() { + byte far *lock_key; INL_KeyHook = 0; // Clear key hook IN_ClearKeysDown(); OldKeyVect = _dos_getvect(KeyInt); + + // turn off num-lock via BIOS + lock_key = MK_FP(0x040, 0x017); // Pointing to the address of the bios shift state keys + *lock_key&=(~(16 | 32 | 64)); // toggle off the locks by changing the values of the 4th, 5th, and 6th bits of the address byte of 0040:0017 + OldKeyVect(); // call BIOS keyhandler to change keyboard lights _dos_setvect(KeyInt,INL_KeyService); } @@ -1275,3 +1281,13 @@ boolean IN_qb(byte kee) if(inpu.Keyboard[kee]==true) return 1; else return 0; } + +ScanCode IN_GetLastScan() +{ + return inpu.LastScan; +} + +ScanCode IN_GetCurCode() +{ + return inst.CurCode; +}