//fuckaid driver
//xxx by MJ0011 2007-12-4 14:44
#include <ntddk.h>
#include <zwfunc.h>
#include <stdafx.h>
#include <ntifs_48.h>
#define DEVICE_KBD_DEVICE 0x9801
#define IOCTL_SET_KBD_INPUT CTL_CODE(DEVICE_KBD_DEVICE , 0x912 , METHOD_BUFFERED , FILE_ANY_ACCESS )
// ================================================================
// KEYBOARD I/O REGISTERS ON THE PC
// ================================================================
// 60h data
// 64h command (write)
// 64h Status (read)
//
// Bits in Status register (names from Linux source)
// b7 PERR parity error in data received from keyboard
// b6 GTO receive timeout
// b5 transmit timeout (or PS/2 mouse?)
// b4 keyboard is locked
// b3 0=60h was the port last accessed, 1=61h was last (?)
// b2 System Flag status: 0=power-up/reset, 1=selftest OK (?)
// b1 IBF input buffer full (data from host to keyboard)
// b0 OBF output buffer full (data from keyboard to host)
//
// Bits in Output Port of 8042 chip (Table P0383 in PORTS.A)
// The Output Port is written by controller command D1h,
//xxx by MJ0011 2007-12-4 14:44
#include <ntddk.h>
#include <zwfunc.h>
#include <stdafx.h>
#include <ntifs_48.h>
#define DEVICE_KBD_DEVICE 0x9801
#define IOCTL_SET_KBD_INPUT CTL_CODE(DEVICE_KBD_DEVICE , 0x912 , METHOD_BUFFERED , FILE_ANY_ACCESS )
// ================================================================
// KEYBOARD I/O REGISTERS ON THE PC
// ================================================================
// 60h data
// 64h command (write)
// 64h Status (read)
//
// Bits in Status register (names from Linux source)
// b7 PERR parity error in data received from keyboard
// b6 GTO receive timeout
// b5 transmit timeout (or PS/2 mouse?)
// b4 keyboard is locked
// b3 0=60h was the port last accessed, 1=61h was last (?)
// b2 System Flag status: 0=power-up/reset, 1=selftest OK (?)
// b1 IBF input buffer full (data from host to keyboard)
// b0 OBF output buffer full (data from keyboard to host)
//
// Bits in Output Port of 8042 chip (Table P0383 in PORTS.A)
// The Output Port is written by controller command D1h,