[Input] Implemented GetModifiers() method

This commit is contained in:
thefiddler 2014-02-17 23:21:01 +01:00
parent 09f9bb3a17
commit c92aabd807

View file

@ -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 #endregion
} }
} }