Codificação do Teclado no IUP

IUP - Portable User Interface

Keyboard Codes

The table below shows the IUP codification of every key in the keyboard. Each key is represented by an integer value, defined in the iupkey.h file, which must be included in the application. Normally these keys are used in K_ANY and KEYPRESS_CB callbacks to inform the key that was pressed in the keyboard.

IUP uses the US default codification this means that if you installed a keyboard specific for your country the key codes will be different from the real keys for a small group of keys. Except for the Brazilian ABNT keyboard which works in Windows and Linux. This does not affect the IupText and IupMultiline text input.

Notice that somes key combinations are not available, like: Shift+Ins, Shift+Del, Alt+Space, Alt/Ctrl/Shift+Backspace, Alt/Ctrl/Shift+Pause, Alt/Ctrl/Shift+Esc, Ctrl/Alt+Enter. When CapsLock is active the Shift+<Key> combination is used, except for Esc and Backspace that will ignore the combination.

The isxkey(key) macro defined in the <iupkey.h> file informs whether a given key is an extended code instead of an alphanumeric key.

In IUP the codification implies that some keys have the same code: K_BS=K_cH, K_TAB=K_cI and K_CR=K_cM.

Key Code /
Attribute
SPACE K_SP
! K_exclam
" K_quotedbl
# K_numbersign
$ K_dollar
% K_percent
& K_ampersand
' K_apostrophe
( K_parentleft
) K_parentright
* K_asterisk
+ K_plus
, K_comma
- K_minus
. K_period
/ K_slash
0 K_0
1 K_1
2 K_2
3 K_3
4 K_4
5 K_5
6 K_6
7 K_7
8 K_8
9 K_9
: K_colon
; K_semicolon
< K_less
= K_equal
> K_greater
? K_question
@ K_at
A K_A
B K_B
C K_C
D K_D
E K_E
F K_F
G K_G
H K_H
I K_I
J K_J
K K_K
L K_L
M K_M
N K_N
O K_O
P K_P
Q K_Q
R K_R
S K_S
T K_T
U K_U
V K_V
W K_W
X K_X
Y K_Y
Z K_Z
[ K_bracketleft
\ K_backslash
] K_bracketright
^ K_circum
_ K_underscore
` K_grave
a K_a
b K_b
c K_c
d K_d
e K_e
f K_f
g K_g
h K_h
i K_i
j K_j
k K_k
l K_l
m K_m
n K_n
o K_o
p K_p
q K_q
r K_r
s K_s
t K_t
u K_u
v K_v
w K_w
x K_x
y K_y
z K_z
{ K_braceleft
| K_bar
} K_braceright
~ K_tilde
ESC K_ESC
Enter K_CR
BackSpace K_BS
Insert K_INS
Del K_DEL
Tab K_TAB
Home K_HOME
UP K_UP
PgUp K_PGUP
LEFT K_LEFT
MIDDLE K_MIDDLE
RIGHT K_RIGHT
END K_END
DOWN K_DOWN
PgDn K_PGDN
Pause K_PAUSE
F1 K_F1
F2 K_F2
F3 K_F3
F4 K_F4
F5 K_F5
F6 K_F6
F7 K_F7
F8 K_F8
F9 K_F9
F10 K_F10
F11 K_F11
F12 K_F12
Key Code /
Attribute
Alt-A K_mA
Alt-B K_mB
Alt-C K_mC
Alt-D K_mD
Alt-E K_mE
Alt-F K_mF
Alt-G K_mG
Alt-H K_mH
Alt-I K_mI
Alt-J K_mJ
Alt-K K_mK
Alt-L K_mL
Alt-M K_mM
Alt-N K_mN
Alt-O K_mO
Alt-P K_mP
Alt-Q K_mQ
Alt-R K_mR
Alt-S K_mS
Alt-T K_mT
Alt-U K_mU
Alt-V K_mV
Alt-W K_mW
Alt-X K_mX
Alt-Y K_mY
Alt-Z K_mZ
Alt-1 K_m1
Alt-2 K_m2
Alt-3 K_m3
Alt-4 K_m4
Alt-5 K_m5
Alt-6 K_m6
Alt-7 K_m7
Alt-8 K_m8
Alt-9 K_m9
Alt-0 K_m0
Alt-Tab K_mTAB
Alt-Home K_mHOME
Alt-UP K_mUP
Alt-PgUp K_mPGUP
Alt-LEFT K_mLEFT
Alt-RIGHT K_mRIGHT
Alt-END K_mEND
Alt-DOWN K_mDOWN
Alt-PgDn K_mPGDN
Alt-Insert K_mINS
Alt-Del K_mDEL
Alt-F1 K_mF1
Alt-F2 K_mF2
Alt-F3 K_mF3
Alt-F4 K_mF4
Alt-F5 K_mF5
Alt-F6 K_mF6
Alt-F7 K_mF7
Alt-F8 K_mF8
Alt-F9 K_mF9
Alt-F10 K_mF10
Alt-F11 K_mF11
Alt-F12 K_mF12
Key Code /
Attribute
Ctrl-SPACE K_cSP
Ctrl-A K_cA
Ctrl-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