mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-03 14:48:25 +00:00
[Input] Added modifier keys to KeyboardKeyEventArgs
This commit is contained in:
parent
0c262cd5b2
commit
221d4661d4
|
@ -46,6 +46,7 @@ namespace OpenTK.Input
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
Key key;
|
Key key;
|
||||||
|
KeyModifiers mods;
|
||||||
uint scancode;
|
uint scancode;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -83,12 +84,50 @@ namespace OpenTK.Input
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the scancode which generated this event.
|
/// Gets the scancode which generated this event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[CLSCompliant(false)]
|
||||||
public uint ScanCode
|
public uint ScanCode
|
||||||
{
|
{
|
||||||
get { return scancode; }
|
get { return scancode; }
|
||||||
internal set { scancode = value; }
|
internal set { scancode = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether <see cref="OpenTK.Input.KeyModifiers.Alt"/> is pressed.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if pressed; otherwise, <c>false</c>.</value>
|
||||||
|
public bool Alt
|
||||||
|
{
|
||||||
|
get { return (mods & KeyModifiers.Alt) != 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether <see cref="OpenTK.Input.KeyModifiers.Control"/> is pressed.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if pressed; otherwise, <c>false</c>.</value>
|
||||||
|
public bool Control
|
||||||
|
{
|
||||||
|
get { return (mods & KeyModifiers.Control) != 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether <see cref="OpenTK.Input.KeyModifiers.Shift"/> is pressed.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if pressed; otherwise, <c>false</c>.</value>
|
||||||
|
public bool Shift
|
||||||
|
{
|
||||||
|
get { return (mods & KeyModifiers.Shift) != 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a bitwise combination representing the <see cref="OpenTK.Input.KeyModifiers"/>
|
||||||
|
/// that are currently pressed.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The modifiers.</value>
|
||||||
|
public KeyModifiers Modifiers
|
||||||
|
{
|
||||||
|
get { return mods; }
|
||||||
|
internal set { mods = value; }
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue