|
HUG KEY
Dec 16, 2022 20:15:31 GMT 1
Post by alexfish on Dec 16, 2022 20:15:31 GMT 1
Hi Peter
got a problem With KEY
two functions the test fail here
FUNCTION CheckCall() IF KEY THEN PRINT KEY RESETKEY END IF RETURN TRUE END FUNCTION
this works
FUNCTION CheckCall() IF hug_gui_properties.last_key_pressed THEN PRINT hug_gui_properties.last_key_pressed hug_gui_properties.last_key_pressed = 0 END IF RETURN TRUE END FUNCTION
BR Alex
|
|
|
HUG KEY
Dec 16, 2022 20:45:29 GMT 1
Post by Pjot on Dec 16, 2022 20:45:29 GMT 1
Hi Alex,
The KEY directive should be used together with parenthesis '()' because it is a function.
So this works for me:
FUNCTION Key_Press
IF KEY() = 32 THEN PRINT "You pressed <space>" ENDIF
RESETKEY
RETURN TRUE
END FUNCTION
HTH Peter
|
|
|
HUG KEY
Dec 16, 2022 22:56:30 GMT 1
Post by alexfish on Dec 16, 2022 22:56:30 GMT 1
Hi Peter
Many Thanks for a solution + speedy reply
BR Alex
|
|