Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect if the shift key (only) is pressed
Message
De
26/07/2013 16:31:44
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01579180
Message ID:
01579281
Vues:
79
>>Sergy,
>>I only want to detect if the shift key has been pressed by itself. Your sample is good to determine if I want SHIFT + U (UPPER"U") or SHIFT+F2. No other key combinations necessary. The VFP keypress will not detect a loan shift keypress. The keypress event on the VFP form will not fire if I only press shift.
>
>I do not think the keyboard sends a standalone code for a shift key. I think shift has to be followed by another key before it even gets to the computer.

I believe the keyboard does send interrupt signal for key press and release the "shift" type keys (e.g. SHIFT, CTRL, ALT) and are processed in the BIOS. IIRC you can query the state of shift keys with BIOS calls back in the DOS days. I'd think a similar feature is still available in Windows -- isn't there a shift/alt/ctrl combo that is used in Windows to suppress autorun for removable disc?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform