Hello,

   I use like this:

<CODE>

nKey := Inkey(0)
if nKey = K_ESC
  exit
elseif nKey = K_ENTER
  ...
else
   HB_SetKeyCheck( lastkey() )  // Tests SET KEY events
endif

<ENDCODE>

Works for me althrough "maybe" it isn't the best way.


Qatan

----- Original Message ----- From: "francesco perillo" <fperi...@gmail.com>
To: "Harbour Project Main Developer List." <harbour@harbour-project.org>
Sent: Friday, 26 de March de 2010 16:07
Subject: Re: [Harbour] inkey(0) and set key to


You can use setkey with one parameter ( the inkey(0) return value) to
check if a codeblock is associated and then invoke it with correct
parameters...


something like this

nCode := inkey( 0 )
(check nCode)
cBlock := setkey ( nCode )
if cBlock
 Eval( cBlock, procfile(1), procname(1), procline(1)  )
endif


if you put the code in a function, like myInkey() 1 should became 2... or 3...
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to