on the Keymap assignment, enclose the map to the right of the comparison in your quote character.
 
Note that quotes can be used on BOTH sides of the comparison....But RSTYLE only suggests that you might want to add them to the right of the comparison.
 
The following works...

SET ESCAPE OFF
SET KEYMAP
[f12] = '[Enter]'
SET KEYMAP
'[alt]z' = '[Enter]'
PAUSE
2
SET VAR
akey = (LASTKEY(1))
SET VAR
bkey = (LASTKEY(0))
IF
akey = '[F12]' THEN
SET VAR
vmsg = (.akey & 'was pressed')
PAUSE
2 USING .vmsg AT CENTER CENTER
ELSE
SET VAR
vmsg = (.bkey & 'was pressed')
PAUSE
2 USING .vmsg AT CENTER CENTER
ENDIF
SET ESCAPE ON
SET KEYMAP
[f12] OFF
RETURN

 

----- Original Message -----
Sent: Wednesday, September 12, 2001 10:27 PM
Subject: Re: Need help with chkkey & getkey V6.5++ dos

I still don't understand -- here is my eep
 

set escape off

set keymap [F12] = [Enter]

set var akey = (lastkey(1))

if akey = "[F12]" then

pause 2 using "F12 was pressed"

endif

set escape on

set keymap [F12] off

return

Am I right in saying that the exit eep won't execute until I press [Enter] to leave that field.  So the last key is [Enter] not [F12]

How do I detect that [F12] has been pushed?

Bernie Lis

 

----- Original Message -----
From: MikeB
Sent: Wednesday, September 12, 2001 3:50 PM
Subject: Re: Need help with chkkey & getkey V6.5++ dos

You might have better luck remapping f12 to '[enter]' then testing for  lastkey(1).
----- Original Message -----
From: Bernie Lis
Sent: Wednesday, September 12, 2001 5:25 PM
Subject: Need help with chkkey & getkey V6.5++ dos

In an eep I tried the following:
set var gotkey = (chkkey(0))
if gotkey = 1 then
  set var f12 = (getkey(0))
  if f12 = '[F12]'   then
    do something
  endif
endif
 
I put this eep in an exit from the first field in the form, in a region.
I touch F12 but nothing happens.  Of course the eep doesn't execute until I exit the field.  so how do I use it?
 
I want to bring up a second form when F12 is pressed.
 
Bernie Lis
Megabytes, Inc.

Reply via email to