Download
Documentation
Development
Examples
Donations
Contributions
Forum
Sources
API
Display
Window
keys.h
1
/*
2
** ClanLib SDK
3
** Copyright (c) 1997-2015 The ClanLib Team
4
**
5
** This software is provided 'as-is', without any express or implied
6
** warranty. In no event will the authors be held liable for any damages
7
** 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
11
** freely, subject to the following restrictions:
12
**
13
** 1. The origin of this software must not be misrepresented; you must not
14
** claim that you wrote the original software. If you use this software
15
** in a product, an acknowledgment in the product documentation would be
16
** appreciated but is not required.
17
** 2. Altered source versions must be plainly marked as such, and must not be
18
** misrepresented as being the original software.
19
** 3. This notice may not be removed or altered from any source distribution.
20
**
21
** Note: Some of the libraries ClanLib may link to may have additional
22
** requirements or restrictions.
23
**
24
** File Author(s):
25
**
26
** Magnus Norddahl
27
** Chu Chin Kuan
28
*/
29
30
#pragma once
31
32
#include "input_code.h"
33
34
namespace
clan
35
{
36
38
enum class
Key
39
{
40
none
= 0x00,
41
backspace
= 0x08,
42
tab
= 0x09,
// ASCII HT, Horizontal tab
43
linefeed
= 0x0a,
// ASCII LF
44
clear
= 0x0b,
// ASCII VT
45
scroll
= 0x0c,
// ASCII FF, Clear screen
46
key_return
= 0x0d,
// ASCII CR, Enter key
47
select
= 0x0e,
48
execute
= 0x1a,
49
escape
= 0x1b,
50
pause
= 0x1c,
51
print
= 0x1d,
52
53
space
= 0x20,
54
55
prior
= 0x21,
56
next
= 0x22,
57
home
= 0x23,
58
end
= 0x24,
59
left
= 0x25,
60
up
= 0x26,
61
right
= 0x27,
62
down
= 0x28,
63
64
kanji
= 0x29,
65
convert
= 0x2a,
66
nonconvert
= 0x2b,
67
separator
= 0x2c,
// ASCII ','
68
69
help
= 0x3f,
// ASCII '?'
70
71
key_0
=
'0'
,
// 0x30
72
key_1
=
'1'
,
73
key_2
=
'2'
,
74
key_3
=
'3'
,
75
key_4
=
'4'
,
76
key_5
=
'5'
,
77
key_6
=
'6'
,
78
key_7
=
'7'
,
79
key_8
=
'8'
,
80
key_9
=
'9'
,
81
82
a
=
'A'
,
// 0x41
83
b
=
'B'
,
84
c
=
'C'
,
85
d
=
'D'
,
86
e
=
'E'
,
87
f
=
'F'
,
88
g
=
'G'
,
89
h
=
'H'
,
90
i
=
'I'
,
91
j
=
'J'
,
92
k
=
'K'
,
93
l
=
'L'
,
94
m
=
'M'
,
95
n
=
'N'
,
96
o
=
'O'
,
97
p
=
'P'
,
98
q
=
'Q'
,
99
r
=
'R'
,
100
s
=
'S'
,
101
t
=
'T'
,
102
u
=
'U'
,
103
v
=
'V'
,
104
w
=
'W'
,
105
x
=
'X'
,
106
y
=
'Y'
,
107
z
=
'Z'
,
108
109
f1
= 0x61,
// ASCII 'a'
110
f2
= 0x62,
111
f3
= 0x63,
112
f4
= 0x64,
113
f5
= 0x65,
114
f6
= 0x66,
115
f7
= 0x67,
116
f8
= 0x68,
117
f9
= 0x69,
118
f10
= 0x6a,
119
f11
= 0x6b,
120
f12
= 0x6c,
121
f13
= 0x6d,
122
f14
= 0x6e,
123
f15
= 0x6f,
124
f16
= 0x70,
125
f17
= 0x71,
126
f18
= 0x72,
127
f19
= 0x73,
128
f20
= 0x74,
129
f21
= 0x75,
130
f22
= 0x76,
131
f23
= 0x77,
132
f24
= 0x78,
133
134
insert
= 0x7e,
135
key_delete
= 0x7f,
// ASCII DEL
136
137
// Numpad numbers
138
numpad_0
= 0x80,
139
numpad_1
= 0x81,
140
numpad_2
= 0x82,
141
numpad_3
= 0x83,
142
numpad_4
= 0x84,
143
numpad_5
= 0x85,
144
numpad_6
= 0x86,
145
numpad_7
= 0x87,
146
numpad_8
= 0x88,
147
numpad_9
= 0x89,
148
149
// Numpad buttons
150
multiply
= 0x8a,
151
add
= 0x8b,
152
seperator
= 0x8c,
153
subtract
= 0x8d,
154
decimal
= 0x8e,
155
divide
= 0x8f,
156
157
// Modifiers
158
lshift
= 0xe0,
159
rshift
= 0xe1,
160
lcontrol
= 0xe2,
161
rcontrol
= 0xe3,
162
lalt
= 0xe4,
loption
=
lalt
,
163
ralt
= 0xe5,
roption
=
ralt
,
164
lmenu
= 0xe6,
apps
=
lmenu
,
165
rmenu
= 0xe7,
166
lsuper
= 0xe8,
lcmd
=
lsuper
,
167
rsuper
= 0xe9,
rcmd
=
rsuper
,
168
169
scrolllock
= 0xea,
170
capslock
= 0xeb,
171
numlock
= 0xec
172
};
173
174
Key
decode_ic
(
InputCode
);
175
176
}
clan::Key::key_return
@ key_return
clan::Key::w
@ w
clan::Key::numpad_6
@ numpad_6
clan::Key::f11
@ f11
clan::Key::rcontrol
@ rcontrol
clan::Key::f1
@ f1
clan::Key::z
@ z
clan::Key::end
@ end
clan::Key::key_6
@ key_6
clan::Key::q
@ q
clan::Key::next
@ next
clan::Key::s
@ s
clan::Key::f7
@ f7
clan::Key
Key
Enumeration of keyboard keys recognized on ClanLib.
Definition:
keys.h:39
clan::Key::f21
@ f21
clan::Key::u
@ u
clan::Key::k
@ k
clan::Key::select
@ select
clan::Key::add
@ add
clan::Key::loption
@ loption
clan::Key::x
@ x
clan::Key::multiply
@ multiply
clan::decode_ic
Key decode_ic(InputCode)
clan::Key::space
@ space
clan::Key::ralt
@ ralt
clan::Key::numpad_4
@ numpad_4
clan::Key::f3
@ f3
clan::Key::f5
@ f5
clan::Key::g
@ g
clan::Key::kanji
@ kanji
clan::Key::f10
@ f10
clan::Key::f14
@ f14
clan::Key::apps
@ apps
clan::Key::key_5
@ key_5
clan::Key::f15
@ f15
clan::Key::numpad_3
@ numpad_3
clan::Key::up
@ up
clan::Key::numlock
@ numlock
clan::Key::numpad_9
@ numpad_9
clan::Key::linefeed
@ linefeed
clan::Key::backspace
@ backspace
clan::Key::home
@ home
clan::Key::rcmd
@ rcmd
clan::Key::scroll
@ scroll
clan::Key::key_2
@ key_2
clan::Key::d
@ d
clan::Key::print
@ print
clan::Key::t
@ t
clan::Key::l
@ l
clan::Key::numpad_5
@ numpad_5
clan::Key::key_8
@ key_8
clan::Key::key_delete
@ key_delete
clan::Key::convert
@ convert
clan::Key::r
@ r
clan::Key::lsuper
@ lsuper
clan::Key::f18
@ f18
clan::Key::seperator
@ seperator
clan::Key::f
@ f
clan::Key::key_3
@ key_3
clan::Key::y
@ y
clan::Key::rshift
@ rshift
clan::Key::divide
@ divide
clan::Key::v
@ v
clan::Key::f9
@ f9
clan::Key::numpad_0
@ numpad_0
clan::Key::key_7
@ key_7
clan::Key::separator
@ separator
clan::Key::numpad_2
@ numpad_2
clan::Key::execute
@ execute
clan::Key::key_0
@ key_0
clan::Key::m
@ m
clan::Key::a
@ a
clan::Key::f17
@ f17
clan::Key::p
@ p
clan::Key::key_4
@ key_4
clan::Key::lalt
@ lalt
clan::Key::lshift
@ lshift
clan::Key::f13
@ f13
clan::Key::roption
@ roption
clan::Key::f2
@ f2
clan::Key::e
@ e
clan::Key::o
@ o
clan::Key::i
@ i
clan::InputCode
InputCode
Definition:
input_code.h:47
clan::Key::f22
@ f22
clan::Key::capslock
@ capslock
clan::Key::h
@ h
clan::Key::insert
@ insert
clan
Definition:
clanapp.h:36
clan::Key::right
@ right
clan::Key::lmenu
@ lmenu
clan::Key::subtract
@ subtract
clan::Key::pause
@ pause
clan::Key::f19
@ f19
clan::Key::f23
@ f23
clan::Key::f6
@ f6
clan::Key::b
@ b
clan::Key::escape
@ escape
clan::Key::none
@ none
clan::Key::left
@ left
clan::Key::tab
@ tab
clan::Key::j
@ j
clan::Key::f16
@ f16
clan::Key::numpad_7
@ numpad_7
clan::Key::down
@ down
clan::Key::key_1
@ key_1
clan::Key::numpad_1
@ numpad_1
clan::Key::nonconvert
@ nonconvert
clan::Key::f12
@ f12
clan::Key::rmenu
@ rmenu
clan::Key::f4
@ f4
clan::Key::scrolllock
@ scrolllock
clan::Key::c
@ c
clan::Key::lcontrol
@ lcontrol
clan::Key::prior
@ prior
clan::Key::key_9
@ key_9
clan::Key::numpad_8
@ numpad_8
clan::Key::decimal
@ decimal
clan::Key::f8
@ f8
clan::Key::clear
@ clear
clan::Key::f24
@ f24
clan::Key::lcmd
@ lcmd
clan::Key::f20
@ f20
clan::Key::rsuper
@ rsuper
clan::Key::n
@ n
clan::Key::help
@ help