// This code is distributed under MIT license. // Copyright (c) 2015 George Mamaladze // See license.txt or https://mit-license.org/ using System; using System.Windows.Forms; namespace Gma.System.MouseKeyHook { /// /// Provides keyboard events /// public interface IKeyboardEvents { /// /// Occurs when a key is pressed. /// event KeyEventHandler KeyDown; /// /// Occurs when a key is pressed. /// /// /// Key events occur in the following order: /// /// KeyDown /// KeyPress /// KeyDownTxt /// KeyUp /// /// The KeyPress event is not raised by non-character keys; however, the non-character keys do raise the KeyDown and /// KeyUp events. /// Use the KeyChar property to sample keystrokes at run time and to consume or modify a subset of common keystrokes. /// To handle keyboard events only in your application and not enable other applications to receive keyboard events, /// set the property in your form's KeyPress event-handling method to /// true. /// event KeyPressEventHandler KeyPress; /// /// Occurs when a key is pressed, includes the keystroke characters if any /// event EventHandler KeyDownTxt; /// /// Occurs when a key is released. /// event KeyEventHandler KeyUp; } }