Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pynput import keyboard
- def keyPress(key):
- if key == keyboard.Key.up:
- print('Up pressed')
- with keyboard.Listener(
- on_press=keyPress) as kb:
- kb.join()
- pip install pynput
- #include<stdio.h>
- #include<conio.h>
- int main() {
- while (1) {
- printf("%c", getch());
- }
- return 0;
- }
- import msvcrt
- while True:
- print(msvcrt.getch().decode('utf-8'))
Add Comment
Please, Sign In to add comment