-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathKeyEventArgs.cs
44 lines (34 loc) · 950 Bytes
/
KeyEventArgs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// <copyright file="KeyEventArgs.cs" company="Software Antics">
// Copyright (c) Software Antics. All rights reserved.
// </copyright>
namespace FinalEngine.Input.Keyboards;
using System;
public sealed class KeyEventArgs : EventArgs
{
public bool Alt
{
get { return (this.Modifiers & KeyModifiers.Alt) != 0; }
}
public bool CapsLock
{
get { return (this.Modifiers & KeyModifiers.CapsLock) != 0; }
}
public bool Control
{
get { return (this.Modifiers & KeyModifiers.Control) != 0; }
}
public Key Key { get; init; }
public KeyModifiers Modifiers { get; init; }
public bool NumLock
{
get { return (this.Modifiers & KeyModifiers.NumLock) != 0; }
}
public bool Shift
{
get { return (this.Modifiers & KeyModifiers.Shift) != 0; }
}
public bool Super
{
get { return (this.Modifiers & KeyModifiers.Super) != 0; }
}
}