GLBasic Benutzerhandbuch

Main sections

KEY()

a%=KEY(code%)



Gibt 1 zurück, wenn Taste mit dem Code code% gedrückt ist, sonst 0.
Um Codes für alle Tasten zu erhalten, bitte unter den Tools suchen nach dem Programm 'Keycode.exe'

Als Konsolenprogrammm funktioniert dieser Befehl nicht. Bitte INKEY$, INPUT oder KEYWAIT verwenden.

Folgende Tasten werden für PocketPC/Smartphones verwendet:

// D-Pad (any device)
Key PC-Key
--------------
<- 203 Cursors
-> 205
^ 200
V 208
o 28 Return

// Application_Buttons (PocketPC)

Key iPAQ3600 PC-Key
----------------------
199 calender home
207 mail end
210 Q insert
211 -> del
157,29 audiorec ctrl


Num-Pad (Smartphone)

SMPH | Key
-------+--------------------
| PC-NUM PC-Main
1 2 3 | 71 72 73 2 3 4 (Nummern)
4 5 6 | 75 76 77 5 6 7
7 8 9 | 79 80 81 8 9 10
* 0 # | 55 81 83 27 11 43 (+ 0 #)

SMPH Key PC-Key
-----------------
dial 211 del
hangup 207 end
home 199 home
back 1 esc


Application Buttons - SmartPhone

SMPH Key PC-Key
---------------
(@t) 67 F9
prev 68 F10
play 87 F11
next 88 F12

Application Buttons - GP2X

GP2X Key(s) PC-Key
--------------------------------------------
DPad 203,205,200,208,57 Cursor Keys/Space
Volume 201,209 PageDn/PageUp
Shoulder 42, 54 LShift/RShift
Start 28 Enter
Select 15 Tab
A,B,X,Y 44,45,29,58 A,D,S,W
30,32,31,17 Y,X,LCtr,CapsLock
Vol +&- 01 ESC


Sample:
// Beenden mit ESC
WHILE TRUE // Endlos-Schleife
IF KEY(57) = 1; PRINT "Leertaste gedrückt", 100, 100; ENDIF
SHOWSCREEN
WEND

See also...