Hi Ben,
I am currently using it in RBW6.5++ and it works. I rarely do anything in
DOS anymore. I have been using this code through all versions of R:Base for
many years, both DOS and WIN and it has always worked. I never used the
[F12] key because I tried it a long time ago and found that R:Base only
worked for the keys F1 - F10. That was probably in the 4.x days. It may
have changed by now.
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 would assume you are saying that R:Base interpets it as [Enter] but reports
it from lastkey(1) as [F12]. 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] ).
Best regards,
Mike Young
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.
>>
>>
>>
>>
>
>