BlueDucky-2/payloads/maptrkeyboard

19 lines
484 B
Plaintext
Raw Normal View History

2024-07-03 21:43:41 +00:00
import keyboard
2024-07-03 22:16:50 +00:00
import pyautogui
2024-07-03 21:43:41 +00:00
def main():
print("Press keys on your keyboard to see their mapping. Press 'q' to quit.")
while True:
try:
2024-07-03 22:16:50 +00:00
key = keyboard.read_event(suppress=True).name
if key == "q":
break
print(f"Key: {key}, Character: {pyautogui.KEYBOARD_KEYS.get(key, 'No mapping')}")
2024-07-03 21:43:41 +00:00
except KeyboardInterrupt:
print("\nExiting...")
break
if __name__ == "__main__":
main()