diff --git a/Source/OpenTK/Input/KeyboardDevice.cs b/Source/OpenTK/Input/KeyboardDevice.cs index 7150c874..79583b41 100644 --- a/Source/OpenTK/Input/KeyboardDevice.cs +++ b/Source/OpenTK/Input/KeyboardDevice.cs @@ -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 } } \ No newline at end of file