Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

50 rindas
1.8 KiB

  1. // This code is distributed under MIT license.
  2. // Copyright (c) 2015 George Mamaladze
  3. // See license.txt or https://mit-license.org/
  4. using System;
  5. using System.Windows.Forms;
  6. namespace Gma.System.MouseKeyHook
  7. {
  8. /// <summary>
  9. /// Provides keyboard events
  10. /// </summary>
  11. public interface IKeyboardEvents
  12. {
  13. /// <summary>
  14. /// Occurs when a key is pressed.
  15. /// </summary>
  16. event KeyEventHandler KeyDown;
  17. /// <summary>
  18. /// Occurs when a key is pressed.
  19. /// </summary>
  20. /// <remarks>
  21. /// Key events occur in the following order:
  22. /// <list type="number">
  23. /// <item>KeyDown</item>
  24. /// <item>KeyPress</item>
  25. /// <item>KeyDownTxt</item>
  26. /// <item>KeyUp</item>
  27. /// </list>
  28. /// The KeyPress event is not raised by non-character keys; however, the non-character keys do raise the KeyDown and
  29. /// KeyUp events.
  30. /// Use the KeyChar property to sample keystrokes at run time and to consume or modify a subset of common keystrokes.
  31. /// To handle keyboard events only in your application and not enable other applications to receive keyboard events,
  32. /// set the <see cref="KeyPressEventArgs.Handled" /> property in your form's KeyPress event-handling method to
  33. /// <b>true</b>.
  34. /// </remarks>
  35. event KeyPressEventHandler KeyPress;
  36. /// <summary>
  37. /// Occurs when a key is pressed, includes the keystroke characters if any
  38. /// </summary>
  39. event EventHandler<KeyDownTxtEventArgs> KeyDownTxt;
  40. /// <summary>
  41. /// Occurs when a key is released.
  42. /// </summary>
  43. event KeyEventHandler KeyUp;
  44. }
  45. }