Hello Joop!
Answering a msg of , from Joop Buker to All:
Well I had a little time now and I rewrote your function so it functions with
your original code slightly modified :
->
// remember I had to modify K_CTRL_ENTER in K_CTRL_RET
->
#include "inkey.ch"
setkey( K_CTRL_RET, { || CtrlEnter() } )
cA := space( 10 )
cB := space( 10 )
cC := space( 10 )
while lastkey() != K_ESC
@ 10, 10 say 'A' get cA
@ 12, 10 say 'B' get cB when nextkey() == K_CTRL_RET
->
/* use nextkey in lieu of lastkey(), lastkey doesn't function in this case
because lastkey sees only the K_ENTER and *** NOT *** K_CTRL_RET that is
till
in the keyboard buffer */
setkey( K_CTRL_RET, { || CtrlEnter() } )
->
/* this line above is added in order to reassign K_CTRL_RET that's disabled
in the procedure CtrlEnter() */
->
@ 14, 10 say 'C' get cC
read
enddo
return
func CtrlEnter()
setkey( K_CTRL_RET, { || NIL } )
->
/* line added because if you doesn't deactivate the key, the procedure will
e
in a infinite loop because you place the key that calls it in the buffer of
the
keyboard */
->
keyboard chr( K_ENTER )+chr( K_CTRL_RET )
return
Hoping being of help,
Jean-Lievin
P.S. I suggest you when you have so 'strange' problems to compile you prg
with the /b option and to use the debugger to 'see' your application living.
--- GoldED 2.41+
---------------
* Origin: Visit my homepage at http://ebs.be/jlp (2:291/742.1)
|