Skip to content

Instantly share code, notes, and snippets.

View Peaches491's full-sized avatar

Daniel Miller Peaches491

  • Zoox
  • San Jose, CA
View GitHub Profile
@Peaches491
Peaches491 / show_keycodes.py
Created June 18, 2019 05:10
Code to print keyboard keycodes for debugging keystroke delays
#! /usr/bin/env python2
import sys
import termios
import tty
stdin_fd = sys.stdin.fileno()
old = termios.tcgetattr(stdin_fd)
try:
tty.setcbreak(sys.stdin)