Here is a simple GetKey example
By: Jan Taylor
//anything after this you do not copy into the calculator
//Here is a tutorial to make a simple "O" move around the screen like in Phenix
//-> "sto" is above the on button
//|zero| means the number zero, to hard to recognize on computers
:7->X //Defining
the X point to the output
:7->Y //Defining
the Y point to the output
:
:Lbl A //
making it a loop to keep moving
:
:getKey->K
//assigning the getkey to a varible
:If K=24:x-1->X
//saying if u press left u move left
:If K=26:x+1->X
// same as above but moving right
:If X=|zero|:X+1->X
//this is a boundry to keep from continuing left
:If X+15:x-1->X
// same as above but boundry to the right of screen
:
:Output(Y,X," |zero| "
//you need the spaces to the side of the zero to make it delete itself (saves alot of coding)
:If K=25:Y-1->Y
//make it move up
:Output(Y+1,X," " //make sure u have spaces to delete the zero
:If K=34:Y+1->Y //make
it move down
:Output(Y-1,X," " //make sure u have spaces to delete the zero again
:If Y=2:Y+1->Y //The
upper screen boundries
:If Y+8:Y-1->Y //Lower
Screen Boundries
:
:Goto A //Starting
it all over again