hardpass-passwordmanager/send_hid# ls LICENSE Makefile README.md hardpass-demo.sh main.c scan scancodes.c scancodes.h root@raspberrypi:/tmp/hardpass-passwordmanager/send_hid# make gcc -std=c99 -Wall -Werror main.c scancodes.c -o scan 编译生成的scan工具可以完成字符串的输入 缺点:只能实现字符串输入,无法实现控制字符串如GUI r等操作(可通过改源码实现) 演示 视频中演示了
,同时使用keyboard->keymap[scancode]拿到扫描码对应的SDL按键值,具体在SDL_default_keymap[SDL_NUM_SCANCODES]存储。
): key_down( scancode ) time.sleep( press_time ) key_up( scancode ) # Press 'A' key # Scancodes references : https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html #key_press(0x1E) VK_CODE = {
helppc/8042.html 键盘扫描码:http://www.mouseos.com/os/doc/scan_code.html http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html
usr1mkqgl919blen 控制台终端 http://www.os2site.com/sw/info/memory/ports.txt 端口映射 https://www.win.tue.nl/~aeb/linux/kbd/scancodes