def mouse_up(): winio = __get_winio() wait_for_buffer_empty() winio.set_port_byte(KBC_KEY_CMD, 0xd3) wait_for_buffer_empty() winio.set_port_dword(KBC_KEY_DATA, 0x08)
def keyDown(scancode): #按下 winio = __get_winio() time.sleep(0.3) wait_for_buffer_empty() winio.set_port_byte(KBC_KEY_CMD, 0xd2) wait_for_buffer_empty() winio.set_port_byte(KBC_KEY_DATA, scancode)
def key_up(scancode): winio = __get_winio() wait_for_buffer_empty() winio.set_port_byte(KBC_KEY_CMD, 0xd2) wait_for_buffer_empty() winio.set_port_byte(KBC_KEY_DATA, scancode | 0x80)
def key_down(scancode): winio = __get_winio() wait_for_buffer_empty(); winio.set_port_byte(KBC_KEY_CMD, 0xd2); wait_for_buffer_empty(); winio.set_port_byte(KBC_KEY_DATA, scancode)