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.

22 rindas
773 B

  1. // This code is distributed under MIT license.
  2. // Copyright (c) 2010-2018 George Mamaladze
  3. // See license.txt or https://mit-license.org/
  4. using System.Windows.Forms;
  5. namespace Gma.System.MouseKeyHook.Implementation
  6. {
  7. internal static class KeysExtensions
  8. {
  9. public static Keys Normalize(this Keys key)
  10. {
  11. if ((key & Keys.LControlKey) == Keys.LControlKey ||
  12. (key & Keys.RControlKey) == Keys.RControlKey) return Keys.Control;
  13. if ((key & Keys.LShiftKey) == Keys.LShiftKey ||
  14. (key & Keys.RShiftKey) == Keys.RShiftKey) return Keys.Shift;
  15. if ((key & Keys.LMenu) == Keys.LMenu ||
  16. (key & Keys.RMenu) == Keys.RMenu) return Keys.Alt;
  17. return key;
  18. }
  19. }
  20. }