Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicated inkey values.
Message
De
24/07/2000 12:43:45
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Duplicated inkey values.
Divers
Thread ID:
00396211
Message ID:
00396211
Vues:
43
I recently wrote a hot key program that worked in conjunction with a forms key press event. The hot keys where using the keyboard function keys "F1" to "F12", "Ctrl+F1" to "Ctrl+F12"and "Shift+F1" to "Shift+F12".
The hot keys perform small macros that work with the form, thus not allowing me to use "ON KEY LABEL" ( reference from help last paragraph "Note that ON KEY LABEL operates outside of the scope of a form; the KeyPress event can be used within forms to execute code when a key is pressed.").

The Key Press event uses the parameters "LPARAMETERS [nIndex,] nKeyCode, nShiftAltCtrl." Where nkeycode is the inkey() value of the key pressed.

My problem is that incredibly there are duplicated inkey values, with matching nShiftAltCtrl parameters such as:

"Shift +t" = "Shift+F1" = inkey() value 84;
"Shift +u" = "Shift+F2" = inkey() value 85;
"Shift +v" = "Shift+F3" = inkey() value 86;
"Shift +w" = "Shift+F4" = inkey() value 87;
"Shift +x" = "Shift+F5" = inkey() value 88;
"Shift +y" = "Shift+F6" = inkey() value 89;
"Shift +z" = "Shift+F7" = inkey() value 90


A user typing "Shift+t" for an upper cased letter T unwillingly activates the "Shift+F1" macro!

Any suggestoins!!!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform