This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# THIS FILE GENERATED BY GEMINI 2.5 PRO,SO WTFPL. | |
import os | |
from evdev import InputDevice, UInput, ecodes as e | |
# --- 配置 --- | |
# 这是你要监听的键盘设备路径。根据你的 evtest 输出,它是 /dev/input/event2 | |
# 注意:这个数字在重启后可能会改变。 | |
# 如果你想让脚本更稳定,可以考虑通过设备名称来查找路径。 | |
KEYBOARD_DEVICE_PATH = "/dev/input/event2" |