DFNgen  2.0
DFN Model Generator
hotkey.cpp File Reference
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/select.h>
#include <termios.h>
#include "hotkey.h"
Include dependency graph for hotkey.cpp:

Go to the source code of this file.

Functions

void reset_terminal_mode ()
 
void set_conio_terminal_mode ()
 
int kbhit ()
 
int getch ()
 

Function Documentation

§ getch()

int getch ( )

Get char of key press. Returns char as int.

Definition at line 57 of file hotkey.cpp.

Here is the caller graph for this function:

§ kbhit()

int kbhit ( )

Check if a key has been pressed. Returns non-zero on key press.

Definition at line 44 of file hotkey.cpp.

Here is the caller graph for this function:

§ reset_terminal_mode()

void reset_terminal_mode ( )

Restores original terminal settings

Definition at line 12 of file hotkey.cpp.

Here is the caller graph for this function:

§ set_conio_terminal_mode()

void set_conio_terminal_mode ( )

Sets custom terminal settings. This allows us to listen for a key press without halting execution of program

Definition at line 23 of file hotkey.cpp.

Here is the caller graph for this function: