CSFML - C binding of the Simple and Fast Multimedia Library

CSFML

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

Keyboard.h
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2023 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
38typedef 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 sfKeyHyphen,
98 sfKeySpace,
99 sfKeyEnter,
100 sfKeyBackspace,
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
145 // Deprecated values:
146
147 sfKeyDash = sfKeyHyphen,
148 sfKeyBack = sfKeyBackspace,
149 sfKeyBackSlash = sfKeyBackslash,
150 sfKeySemiColon = sfKeySemicolon,
151 sfKeyReturn = sfKeyEnter
152} sfKeyCode;
153
154
163CSFML_WINDOW_API sfBool sfKeyboard_isKeyPressed(sfKeyCode key);
164
177CSFML_WINDOW_API void sfKeyboard_setVirtualKeyboardVisible(sfBool visible);
178
179#endif // SFML_KEYBOARD_H