テンキーを押すとAキーがが出るプログラムを作っているのですが、
これだとテンキーの数字も入力されてしまいます。
数字を出さない方法はあるでしょうか...
import pyperclip from pyhooked import Hook, KeyboardEvent, MouseEvent import pyautogui as pg from time import sleep def handle_events(args): if isinstance(args, KeyboardEvent): if args.key_code == 103 and args.event_type == 'key down': pg.keyDown('a') hk = Hook() hk.handler = handle_events hk.hook()
あなたの回答
tips
プレビュー