mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 02:45:36 +00:00
[Input] Implemented GetModifiers() method
This commit is contained in:
parent
09f9bb3a17
commit
c92aabd807
|
@ -222,6 +222,28 @@ namespace OpenTK.Input
|
|||
}
|
||||
}
|
||||
|
||||
internal KeyModifiers GetModifiers()
|
||||
{
|
||||
KeyModifiers mods = 0;
|
||||
|
||||
if (this[Key.AltLeft] || this[Key.AltRight])
|
||||
{
|
||||
mods |= KeyModifiers.Alt;
|
||||
}
|
||||
|
||||
if (this[Key.ControlLeft] || this[Key.ControlRight])
|
||||
{
|
||||
mods |= KeyModifiers.Control;
|
||||
}
|
||||
|
||||
if (this[Key.ShiftLeft] || this[Key.ShiftRight])
|
||||
{
|
||||
mods |= KeyModifiers.Shift;
|
||||
}
|
||||
|
||||
return mods;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue