Python实现模拟按键和改键精灵

"""
Python实现模拟按键和改键精灵,用以控制拳皇97,亲测有效.
VK_CODE:虚拟键码
参考:
https://www.cnblogs.com/Evan-fanfan/p/11097519.html
https://blog.csdn.net/wang8978/article/details/52900048
https://blog.51cto.com/13496943/2347866?source=dra
"""
import time

import win32con
import win32api

# 1.实现模拟按键
VK_CODE = {
    'backspace': 0x08,
    'tab': 0x09,
    'clear': 0x0C,
    'enter': 0x0D,
    'shift': 0x10,
    'ctrl': 0x11,
    'alt': 0x12,
    'pause': 0x13,
    'caps_lock': 0x14,
    'esc': 0x1B,
    'spacebar': 0x20,
    'page_up': 0x21,
    'page_down': 0x22,
    'end': 0x23,
    'home': 0x24,
    'left_arrow': 0x25,
    'up_arrow': 0x26,
    'right_arrow': 0x27,
    'down_arrow': 0x28,
    'select': 0x29,
    'print': 0x2A,
    'execute': 0x2B,
    'pri
相关推荐
©️2020 CSDN 皮肤主题: 点我我会动 设计师:白松林 返回首页