import vgamepad as vg

try:
    gamepad = vg.VX360Gamepad()
    gamepad.press_button(button=vg.XUSB_BUTTON.XUSB_GAMEPAD_A)
    gamepad.update()
    print("✅ 虚拟手柄创建成功")
except Exception as e:
    print("❌ 错误：", e)
