MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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;
38 #endif
39 
40 };
41 
42 
43 #endif
44 
int getkey()
int kbhit()
Definition: rtiSimpleKeyboard.h:14
struct termios initial_settings new_settings
Definition: rtiSimpleKeyboard.h:36
int peek_character
Definition: rtiSimpleKeyboard.h:37
int keybrdTick()

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)