 ,   MIDlet
Pascal  
  Paint, 
   
 .
 
  png. 
  
 -  
  
  .
" "
    
 , 
 -   
  .
   
 .
GetKeyClicked 
 ( "Integer")
 
  KE_NONE, 
  .
GetKeyPressed 
 ( Integer)  
  
 KE_NONE. 
 
 
: KE_KEY0, KE_KEY1,
KE_KEY2, KE_KEY3, KE_KEY4,
KE_KEY5, KE_KEY6, KE_KEY7,
KE_KEY8, KE_KEY9, KE_STAR,
KE_POUND
 ,
  
  
.  
 , 
 KeyToAction,
  
   
 .
KeyToAction  
  
: GA_NONE, GA_UP,
GA_DOWN, GA_LEFT, GA_FIRE,
GA_GAMEA, GA_GAMEB, GA_
GAMEC, GA_GAMED
 
:  
  
.


program Sample;
 var x,y,key:integer;
begin
 x:=0;
 y:=0;
 while key<>GA_FIRE do
  begin
   SetColor(255,255,255);
   FillRect(0,0,240,320);
   SetColor(0,0,0);
   FillRect(x,y,10,10);
   Repaint;
   Delay(100);
   Key:=KeyToAction
(GetKeyClicked);
   if key=GA_LEFT then
x:=x-10;
   if key=GA_RIGHT then x:=x
+10;
   if key=GA_UP then y:=y-10;
   if key=GA_DOWN then
y:=y+10;
  end;
end.


  
 
  ,
  -  
 
.  
 
 
  .
  ,
"   
".   
 
  
,  
,   
  
 "x,y". 
 Key
 
 
,   
   
 .  
,   
 ,
 
.  
,    
 
 -  
   .