On 12 Sep 2001, at 21:36, Michael Young wrote:


> I guess my question would be how could R:Base interpet that you pressed the 
> [F12] key to run any kind of code unless it was in fact keymaped to [Enter]? 
I mapped [F12] to [Enter]

>The only thing I can think of is that you may 
> have been using LASTKEY(0) instead of LASTKEY(1). LASTKEY(1) tells 
> you the actual key pressed ( [F12] ) while LASTKEY(0) tells you the current 
> mapping ( [Enter] ).
Thank-You!   That's it... I vaguely remember this being discussed 
as an enhancement in the past (I think), now that you mention it. 

Ben Petersen



> On Wed, 12 Sep 2001 18:03:33 +0100, Ben Petersen wrote:
> 
> >Mike,
> >
> >Have you used this code under RBW6.5+  ?
> >
> >I just tried it in an app to selectively pop up a form, but the mapped 
> >[F12] key returns [Enter] using lastkey while 6.1a lastkey returns 
> >[F12]...
> >
> >Same for [Alt][F3]
> >
> >Ben Petersen
> >
> >
> >
> >On 12 Sep 2001, at 12:48, Michael Young wrote:
> >
> >> Hi Bernie,
> >> 
> >> I use this code and it works fine:
> >> 
> >> set v veeplast = (lastkey(1))
> >> if veeplast = '[F12]' then
> >>   do something
> >> endif
> >> 
> >> Actually I never tried it with the F12 key. I use [Alt][F3] and [Alt][F9]. 
> >> Whatever key that you use, you must first KEYMAP it to [Enter] or it 
> will 
> >> never exit the field and trigger the EEP.
> >> 
> >> Best regards,
> >> Mike Young
> >> 
> >> --Original Message Text---
> >> From: Bernie Lis
> >> Date: Wed, 12 Sep 2001 15:25:49 -0700
> >> 
> >> 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