Skip to content

Instantly share code, notes, and snippets.

@proteneer
proteneer / gist:8839171
Created February 6, 2014 06:20
Keyboard events Linux
#define LINUX
#ifndef LINUX
#include <conio.h> /* kbhit(), getch() */
#else
#include <sys/time.h> /* struct timeval, select() */
/* ICANON, ECHO, TCSANOW, struct termios */
#include <termios.h> /* tcgetattr(), tcsetattr() */
#include <cstdlib> /* atexit(), exit() */