Revision: 4701
http://sourceforge.net/p/mp-plugins/code/4701
Author: nicsergio
Date: 2013-12-06 15:45:22 +0000 (Fri, 06 Dec 2013)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/UnlockKeys.cs
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/UnlockKeys.cs
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/UnlockKeys.cs 2013-12-06 15:03:45 UTC (rev 4700)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/UnlockKeys.cs 2013-12-06 15:45:22 UTC (rev 4701)
@@ -16,31 +16,28 @@
#endregion
#region Metodi Pubblici
- public static bool ResetCapsLock()
+ public static bool ResetCapsLock() //Richesta di disattivazione CapsLock
{
- if (Control.IsKeyLocked(Keys.CapsLock)) //Se richiesta diversa da stato attuale
+ if (Control.IsKeyLocked(Keys.CapsLock)) //Se CapsLock attivo
{
- //Simulazione pressione del tasto CapsLock
- keybd_event(VK_CAPITAL, SC_CAPITAL, 0, (UIntPtr)0);
- //Simulazione rilascio del tasto CapsLock
- keybd_event(VK_CAPITAL, SC_CAPITAL, KEYEVENTF_KEYUP, (UIntPtr)0);
- return true;
+ keybd_event(VK_CAPITAL, SC_CAPITAL, 0, (UIntPtr)0); //--> simulazione pressione del tasto CapsLock
+ keybd_event(VK_CAPITAL, SC_CAPITAL, KEYEVENTF_KEYUP, (UIntPtr)0); //--> simulazione rilascio del tasto CapsLock
+ return true; //--> CapsLock disattivato
}
else
- return false;
+ return false; //--> stato CapsLock non modificato
}
- public static bool ResetNumLock()
+ public static bool ResetNumLock() //Richesta di disattivazione NumLock
{
- if (Control.IsKeyLocked(Keys.NumLock)) //Se richiesta diversa da stato attuale
+ if (Control.IsKeyLocked(Keys.NumLock)) //Se NumLock attivo
{
- //Simulazione pressione del tasto NumLock
- keybd_event(VK_NUMLOCK, HK_NUMLOCK, KEYEVENTF_EXTENDEDKEY, (UIntPtr)0);
- //Simulazione rilascio del tasto NumLock
- keybd_event(VK_NUMLOCK, HK_NUMLOCK, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, (UIntPtr)0);
- return true;
+ keybd_event(VK_NUMLOCK, HK_NUMLOCK, KEYEVENTF_EXTENDEDKEY, (UIntPtr)0); //--> simulazione pressione del tasto NumLock
+ keybd_event(VK_NUMLOCK, HK_NUMLOCK, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
+ (UIntPtr)0); //--> simulazione rilascio del tasto NumLock
+ return true; //--> NumLock disattivato
}
else
- return false;
+ return false; //--> stato NumLock non modificato
}
#endregion
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|