MAK RTIspy API Documentation for HLA 1516
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
examples
rtisimple
rtiSimpleKeyboard.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Adapted from "Beginning Linux Programming", from Wrox Press -- www.wrox.com
3
*******************************************************************************/
4
5
// Utility to allow keyboard input without blocking
6
7
#ifndef MYKBHIT_H_
8
#define MYKBHIT_H_
9
10
#ifndef WIN32
11
#include <termios.h>
12
#endif
13
14
class
keyboard
15
{
16
public
:
17
18
keyboard
();
19
20
~keyboard
();
21
22
// Returns 1 if keyboard input is ready; otherwise, 0
23
int
kbhit
();
24
25
// Returns character from keyboard if avaialable; otherwise, 0
26
int
keybrdTick
();
27
28
protected
:
29
30
// Return character from keyboard input
31
int
getkey
();
32
33
private
:
34
35
#ifndef WIN32
36
struct
termios initial_settings,
new_settings
;
37
int
peek_character
;
38
#endif
39
40
};
41
42
43
#endif
44
keyboard::getkey
int getkey()
keyboard::~keyboard
~keyboard()
keyboard::kbhit
int kbhit()
keyboard
Definition:
rtiSimpleKeyboard.h:14
keyboard::new_settings
struct termios initial_settings new_settings
Definition:
rtiSimpleKeyboard.h:36
keyboard::keyboard
keyboard()
keyboard::peek_character
int peek_character
Definition:
rtiSimpleKeyboard.h:37
keyboard::keybrdTick
int keybrdTick()
Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (
www.mak.com
)