Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Duplicated inkey values.
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement