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