Input problem on Linux (broke when non-printing key was pressed)