CSFML

- Main Page
- Data Structures
- Files

- File List
- Globals

Keyboard.h
Go to the documentation of this file.
1 //
3 // SFML - Simple and Fast Multimedia Library
4 // Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
5 //
6 // This software is provided 'as-is', without any express or implied warranty.
7 // In no event will the authors be held liable for any damages arising from the use of this software.
8 //
9 // Permission is granted to anyone to use this software for any purpose,
10 // including commercial applications, and to alter it and redistribute it freely,
11 // subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented;
14 // you must not claim that you wrote the original software.
15 // If you use this software in a product, an acknowledgment
16 // in the product documentation would be appreciated but is not required.
17 //
18 // 2. Altered source versions must be plainly marked as such,
19 // and must not be misrepresented as being the original software.
20 //
21 // 3. This notice may not be removed or altered from any source distribution.
22 //
24
25 #ifndef SFML_KEYBOARD_H
26 #define SFML_KEYBOARD_H
27
29 // Headers
31 #include <SFML/Window/Export.h>
32
33
38 typedef enum
39 {
40 sfKeyUnknown = -1,
41 sfKeyA,
42 sfKeyB,
43 sfKeyC,
44 sfKeyD,
45 sfKeyE,
46 sfKeyF,
47 sfKeyG,
48 sfKeyH,
49 sfKeyI,
50 sfKeyJ,
51 sfKeyK,
52 sfKeyL,
53 sfKeyM,
54 sfKeyN,
55 sfKeyO,
56 sfKeyP,
57 sfKeyQ,
58 sfKeyR,
59 sfKeyS,
60 sfKeyT,
61 sfKeyU,
62 sfKeyV,
63 sfKeyW,
64 sfKeyX,
65 sfKeyY,
66 sfKeyZ,
67 sfKeyNum0,
68 sfKeyNum1,
69 sfKeyNum2,
70 sfKeyNum3,
71 sfKeyNum4,
72 sfKeyNum5,
73 sfKeyNum6,
74 sfKeyNum7,
75 sfKeyNum8,
76 sfKeyNum9,
77 sfKeyEscape,
78 sfKeyLControl,
79 sfKeyLShift,
80 sfKeyLAlt,
81 sfKeyLSystem,
82 sfKeyRControl,
83 sfKeyRShift,
84 sfKeyRAlt,
85 sfKeyRSystem,
86 sfKeyMenu,
87 sfKeyLBracket,
88 sfKeyRBracket,
89 sfKeySemiColon,
90 sfKeyComma,
91 sfKeyPeriod,
92 sfKeyQuote,
93 sfKeySlash,
94 sfKeyBackSlash,
95 sfKeyTilde,
96 sfKeyEqual,
97 sfKeyDash,
98 sfKeySpace,
99 sfKeyReturn,
100 sfKeyBack,
101 sfKeyTab,
102 sfKeyPageUp,
103 sfKeyPageDown,
104 sfKeyEnd,
105 sfKeyHome,
106 sfKeyInsert,
107 sfKeyDelete,
108 sfKeyAdd,
109 sfKeySubtract,
110 sfKeyMultiply,
111 sfKeyDivide,
112 sfKeyLeft,
113 sfKeyRight,
114 sfKeyUp,
115 sfKeyDown,
116 sfKeyNumpad0,
117 sfKeyNumpad1,
118 sfKeyNumpad2,
119 sfKeyNumpad3,
120 sfKeyNumpad4,
121 sfKeyNumpad5,
122 sfKeyNumpad6,
123 sfKeyNumpad7,
124 sfKeyNumpad8,
125 sfKeyNumpad9,
126 sfKeyF1,
127 sfKeyF2,
128 sfKeyF3,
129 sfKeyF4,
130 sfKeyF5,
131 sfKeyF6,
132 sfKeyF7,
133 sfKeyF8,
134 sfKeyF9,
135 sfKeyF10,
136 sfKeyF11,
137 sfKeyF12,
138 sfKeyF13,
139 sfKeyF14,
140 sfKeyF15,
141 sfKeyPause,
142
143 sfKeyCount
144 } sfKeyCode;
145
146
155 CSFML_WINDOW_API sfBool sfKeyboard_isKeyPressed(sfKeyCode key);
156
157
158 #endif // SFML_KEYBOARD_H
sfKeyF11
The F11 key.
Definition: Keyboard.h:136
sfKeyUp
Up arrow.
Definition: Keyboard.h:114
sfKeyRAlt
The right Alt key.
Definition: Keyboard.h:84
sfKeyF10
The F10 key.
Definition: Keyboard.h:135
sfKeyW
The W key.
Definition: Keyboard.h:63
sfKeyO
The O key.
Definition: Keyboard.h:55
sfKeyJ
The J key.
Definition: Keyboard.h:50
sfKeyInsert
The Insert key.
Definition: Keyboard.h:106
sfKeyNumpad3
The numpad 3 key.
Definition: Keyboard.h:119
sfKeyF6
The F6 key.
Definition: Keyboard.h:131
sfKeyY
The Y key.
Definition: Keyboard.h:65
sfKeyNum9
The 9 key.
Definition: Keyboard.h:76
sfKeyNum7
The 7 key.
Definition: Keyboard.h:74
sfKeyComma
The , key.
Definition: Keyboard.h:90
sfKeyP
The P key.
Definition: Keyboard.h:56
sfKeyPause
The Pause key.
Definition: Keyboard.h:141
sfKeyRBracket
The ] key.
Definition: Keyboard.h:88
sfKeyEnd
The End key.
Definition: Keyboard.h:104
sfKeySlash
The / key.
Definition: Keyboard.h:93
sfKeyTab
The Tabulation key.
Definition: Keyboard.h:101
sfKeyNum0
The 0 key.
Definition: Keyboard.h:67
sfKeySemiColon
The ; key.
Definition: Keyboard.h:89
sfKeyF15
The F15 key.
Definition: Keyboard.h:140
sfKeyX
The X key.
Definition: Keyboard.h:64
sfKeyPageUp
The Page up key.
Definition: Keyboard.h:102
sfKeyF12
The F12 key.
Definition: Keyboard.h:137
sfKeyBackSlash
The \ key.
Definition: Keyboard.h:94
sfKeyMultiply
Definition: Keyboard.h:110
sfKeyRControl
The right Control key.
Definition: Keyboard.h:82
sfKeyZ
The Z key.
Definition: Keyboard.h:66
sfKeyReturn
The Return key.
Definition: Keyboard.h:99
sfKeyNumpad7
The numpad 7 key.
Definition: Keyboard.h:123
sfKeyPeriod
The . key.
Definition: Keyboard.h:91
sfKeyNum5
The 5 key.
Definition: Keyboard.h:72
sfKeyNumpad4
The numpad 4 key.
Definition: Keyboard.h:120
sfKeySpace
The Space key.
Definition: Keyboard.h:98
sfKeyG
The G key.
Definition: Keyboard.h:47
sfKeyEqual
The = key.
Definition: Keyboard.h:96
sfKeyRShift
The right Shift key.
Definition: Keyboard.h:83
sfKeyDelete
The Delete key.
Definition: Keyboard.h:107
sfKeyRight
Right arrow.
Definition: Keyboard.h:113
sfKeyNum4
The 4 key.
Definition: Keyboard.h:71
sfKeyLControl
The left Control key.
Definition: Keyboard.h:78
sfKeyF13
The F13 key.
Definition: Keyboard.h:138
Export.h
sfBool
int sfBool
Definition: Config.h:117
CSFML_WINDOW_API
#define CSFML_WINDOW_API
Definition: Window/Export.h:43
sfKeyTilde
The ~ key.
Definition: Keyboard.h:95
sfKeyA
The A key.
Definition: Keyboard.h:41
sfKeyNum3
The 3 key.
Definition: Keyboard.h:70
sfKeyNum6
The 6 key.
Definition: Keyboard.h:73
sfKeyF7
The F7 key.
Definition: Keyboard.h:132
sfKeyS
The S key.
Definition: Keyboard.h:59
sfKeyNumpad6
The numpad 6 key.
Definition: Keyboard.h:122
sfKeyNum1
The 1 key.
Definition: Keyboard.h:68
sfKeyLeft
Left arrow.
Definition: Keyboard.h:112
sfKeyHome
The Home key.
Definition: Keyboard.h:105
sfKeyK
The K key.
Definition: Keyboard.h:51
sfKeyQuote
The ' key.
Definition: Keyboard.h:92
sfKeyNumpad9
The numpad 9 key.
Definition: Keyboard.h:125
sfKeyQ
The Q key.
Definition: Keyboard.h:57
sfKeyF5
The F5 key.
Definition: Keyboard.h:130
sfKeyB
The B key.
Definition: Keyboard.h:42
sfKeyUnknown
Unhandled key.
Definition: Keyboard.h:40
sfKeyDown
Down arrow.
Definition: Keyboard.h:115
sfKeyLAlt
The left Alt key.
Definition: Keyboard.h:80
sfKeyD
The D key.
Definition: Keyboard.h:44
sfKeySubtract
Definition: Keyboard.h:109
sfKeyF2
The F2 key.
Definition: Keyboard.h:127
sfKeyLSystem
The left OS specific key: window (Windows and Linux), apple (MacOS X), ...
Definition: Keyboard.h:81
sfKeyBack
The Backspace key.
Definition: Keyboard.h:100
sfKeyNumpad8
The numpad 8 key.
Definition: Keyboard.h:124
sfKeyE
The E key.
Definition: Keyboard.h:45
sfKeyNumpad2
The numpad 2 key.
Definition: Keyboard.h:118
sfKeyboard_isKeyPressed
CSFML_WINDOW_API sfBool sfKeyboard_isKeyPressed(sfKeyCode key)
Check if a key is pressed.
sfKeyF
The F key.
Definition: Keyboard.h:46
sfKeyLShift
The left Shift key.
Definition: Keyboard.h:79
sfKeyCount
Keep last â€“ the total number of keyboard keys.
Definition: Keyboard.h:143
sfKeyF4
The F4 key.
Definition: Keyboard.h:129
sfKeyV
The V key.
Definition: Keyboard.h:62
sfKeyU
The U key.
Definition: Keyboard.h:61
sfKeyNumpad1
The numpad 1 key.
Definition: Keyboard.h:117
sfKeyNum8
The 8 key.
Definition: Keyboard.h:75
sfKeyLBracket
The [ key.
Definition: Keyboard.h:87
sfKeyPageDown
The Page down key.
Definition: Keyboard.h:103
sfKeyF8
The F8 key.
Definition: Keyboard.h:133
sfKeyDivide
/
Definition: Keyboard.h:111
sfKeyH
The H key.
Definition: Keyboard.h:48
sfKeyC
The C key.
Definition: Keyboard.h:43
sfKeyRSystem
The right OS specific key: window (Windows and Linux), apple (MacOS X), ...
Definition: Keyboard.h:85
sfKeyNumpad0
The numpad 0 key.
Definition: Keyboard.h:116
sfKeyF1
The F1 key.
Definition: Keyboard.h:126
sfKeyL
The L key.
Definition: Keyboard.h:52
sfKeyF3
The F3 key.
Definition: Keyboard.h:128
sfKeyNum2
The 2 key.
Definition: Keyboard.h:69
sfKeyAdd
Definition: Keyboard.h:108
sfKeyR
The R key.
Definition: Keyboard.h:58
sfKeyN
The N key.
Definition: Keyboard.h:54
sfKeyNumpad5
The numpad 5 key.
Definition: Keyboard.h:121
sfKeyF14
The F14 key.
Definition: Keyboard.h:139
sfKeyF9
The F8 key.
Definition: Keyboard.h:134
sfKeyM
The M key.
Definition: Keyboard.h:53
sfKeyI
The I key.
Definition: Keyboard.h:49
sfKeyCode
sfKeyCode
Key codes.
Definition: Keyboard.h:38
sfKeyDash
The - key.
Definition: Keyboard.h:97
sfKeyMenu
The Menu key.
Definition: Keyboard.h:86
sfKeyEscape
The Escape key.
Definition: Keyboard.h:77
sfKeyT
The T key.
Definition: Keyboard.h:60