The use of nShftAltCtrl is to help identify the difference in key values:

For right arrow, the nKeyCode=4 and the nShftAltCtrl=0

For Ctrl+D, the nKeyCode=4 and the nShftAltCtrl=2

nShftAltCtrl:
0 = no modifiers.
1  = Shift
2 = Ctrl
4 = Alt   (Note that you usually can't trap the Alt key press using this)

The above values are summed if 2 or more are pressed, so Shift+Ctrl would
be 3.  Again, Alt does not work in most cases.

Fred


On Tue, Jul 30, 2013 at 3:55 PM, Rafael Copquin <[email protected]>wrote:

> I haven't used on key labels since the days of old FoxDOS.
>
> However, I am migrating an old FD app to VFP9 and the prgs include a
> zillion on key labels operating on browse windows.
>
> I easily replaced all browse windows with grids and the on key label calls
> with calls to the keypress events of the corresponding text boxes.
>
> However, there is one particular on key label that is driving me nuts:
>
> on key label ctrl+D do form frmDelete
>
> In the keypress event of the textbox of the corresponding column of the
> grid I wrote:
>
> lparameters nKeyCode,nShiftAltCtrl
> if nKeyCode = 4  && ctrl+D
>   do form frmDelete
> endif
>
> But to my surprise, the same number (4) is assigned to the right arrow
> key, so when the user navigates the grid with the right arrow, the
> frmDelete form pops up, as if he had pressed the Ctrl+D key combination
>
> How can I solve this?
>
> The numbers can be seen in help for the inkey() function
>
> BTW, I never used the second parameter, nShiftAltCtrl of the keypress
> event. And can't figure out how to use it.
>
> Rafael Copquin
>
>
> ______________________________**_________________
> Post Messages to: [email protected]
> Subscription Maintenance: 
> http://mail.leafe.com/mailman/**listinfo/profox<http://mail.leafe.com/mailman/listinfo/profox>
> OT-free version of this list: http://mail.leafe.com/mailman/**
> listinfo/profoxtech <http://mail.leafe.com/mailman/listinfo/profoxtech>
> Searchable Archive: 
> http://leafe.com/archives/**search/profox<http://leafe.com/archives/search/profox>
> This message: http://leafe.com/archives/**byMID/profox/51F84451.6020108@**
> fibertel.com.ar<http://leafe.com/archives/byMID/profox/[email protected]>
> ** All postings, unless explicitly stated otherwise, are the opinions of
> the author, and do not constitute legal or medical advice. This statement
> is added to the messages for those lawyers who are too stupid to see the
> obvious.
>


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cajcbksqkfdzo4lxkohb5vtazdpl-8l+mglmvzaqgc+9-6e4...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to