mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-21 09:45:48 +08:00
22 lines
773 B
C#
22 lines
773 B
C#
// This code is distributed under MIT license.
|
|
// Copyright (c) 2010-2018 George Mamaladze
|
|
// See license.txt or https://mit-license.org/
|
|
|
|
using System.Windows.Forms;
|
|
|
|
namespace Gma.System.MouseKeyHook.Implementation
|
|
{
|
|
internal static class KeysExtensions
|
|
{
|
|
public static Keys Normalize(this Keys key)
|
|
{
|
|
if ((key & Keys.LControlKey) == Keys.LControlKey ||
|
|
(key & Keys.RControlKey) == Keys.RControlKey) return Keys.Control;
|
|
if ((key & Keys.LShiftKey) == Keys.LShiftKey ||
|
|
(key & Keys.RShiftKey) == Keys.RShiftKey) return Keys.Shift;
|
|
if ((key & Keys.LMenu) == Keys.LMenu ||
|
|
(key & Keys.RMenu) == Keys.RMenu) return Keys.Alt;
|
|
return key;
|
|
}
|
|
}
|
|
} |