Utility class that can be used to create key events with all current
locking keys (like Caps Lock) disabled. Other modifier keys (like Ctrl or Shift)
are also ignored if they are currently pressed on the "real" keyboard.
Declaration Syntax
C# |
public class LockKeyResetter : IDisposable
Members
All Members | Constructors | Methods | |||
Icon | Member | Description |
---|---|---|
LockKeyResetter()()() |
Reset all modifier keys and remember in this object which modifier keys
have been set.
| |
Dispose()()() |
Set all modifier keys that have been set before. Since this class implements
IDisposable, you can use the using
keyword in C# to automatically set modifier keys when you have finished.
| |
Send(String) |
Convenience method to send keys with all modifiers disabled.
| |
SendWait(String) |
Convenience method to send keys and wait for them (like
SendKeys.SendWait) with all modifiers disabled.
|
Examples
CopyC#
using (new LockKeysResetter()) { SendKeys.Send("Hello"); }
Inheritance Hierarchy
Object | |
LockKeyResetter |