Panda3D
 All Classes Functions Variables Enumerations
keyboardButton.h
1 // Filename: keyboardButton.h
2 // Created by: drose (01Mar00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef KEYBOARDBUTTON_H
16 #define KEYBOARDBUTTON_H
17 
18 #include "pandabase.h"
19 
20 #include "buttonHandle.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : KeyboardButton
24 // Description : This class is just used as a convenient namespace for
25 // grouping all of these handy functions that return
26 // buttons which map to standard keyboard keys.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDA_PUTIL KeyboardButton {
29 PUBLISHED:
30  static ButtonHandle ascii_key(char ascii_equivalent);
31 
32  static ButtonHandle space();
33  static ButtonHandle backspace();
34  static ButtonHandle tab();
35  static ButtonHandle enter();
36  static ButtonHandle escape();
37 
38  static ButtonHandle f1();
39  static ButtonHandle f2();
40  static ButtonHandle f3();
41  static ButtonHandle f4();
42  static ButtonHandle f5();
43  static ButtonHandle f6();
44  static ButtonHandle f7();
45  static ButtonHandle f8();
46  static ButtonHandle f9();
47  static ButtonHandle f10();
48  static ButtonHandle f11();
49  static ButtonHandle f12();
50 
51  // PC keyboards don't have these four buttons, but Macs do.
52  static ButtonHandle f13();
53  static ButtonHandle f14();
54  static ButtonHandle f15();
55  static ButtonHandle f16();
56 
57  static ButtonHandle left();
58  static ButtonHandle right();
59  static ButtonHandle up();
60  static ButtonHandle down();
61  static ButtonHandle page_up();
62  static ButtonHandle page_down();
63  static ButtonHandle home();
64  static ButtonHandle end();
65  static ButtonHandle insert();
66  static ButtonHandle del(); // delete is a C++ keyword.
67  static ButtonHandle help();
68  static ButtonHandle menu();
69 
70  static ButtonHandle shift();
71  static ButtonHandle control();
72  static ButtonHandle alt();
73  static ButtonHandle meta();
74  static ButtonHandle caps_lock();
75  static ButtonHandle shift_lock();
76  static ButtonHandle num_lock();
77  static ButtonHandle scroll_lock();
78  static ButtonHandle print_screen();
79  static ButtonHandle pause();
80 
81  static ButtonHandle lshift();
82  static ButtonHandle rshift();
83  static ButtonHandle lcontrol();
84  static ButtonHandle rcontrol();
85  static ButtonHandle lalt();
86  static ButtonHandle ralt();
87  static ButtonHandle lmeta();
88  static ButtonHandle rmeta();
89 
90 public:
91  static void init_keyboard_buttons();
92 };
93 
94 #endif
A ButtonHandle represents a single button from any device, including keyboard buttons and mouse butto...
Definition: buttonHandle.h:28
This class is just used as a convenient namespace for grouping all of these handy functions that retu...