/
KeyboardEventArgs.cs
62 lines (52 loc) · 2.24 KB
/
KeyboardEventArgs.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.AspNetCore.Components.Web
{
/// <summary>
/// Supplies information about a keyboard event that is being raised.
/// </summary>
public class KeyboardEventArgs : EventArgs
{
/// <summary>
/// The key value of the key represented by the event.
/// If the value has a printed representation, this attribute's value is the same as the char attribute.
/// Otherwise, it's one of the key value strings specified in 'Key values'.
/// If the key can't be identified, this is the string "Unidentified"
/// </summary>
public string Key { get; set; }
/// <summary>
/// Holds a string that identifies the physical key being pressed.
/// The value is not affected by the current keyboard layout or modifier state, so a particular key will always return the same value.
/// </summary>
public string Code { get; set; }
/// <summary>
/// The location of the key on the device.
/// </summary>
public float Location { get; set; }
/// <summary>
/// true if a key has been depressed long enough to trigger key repetition, otherwise false.
/// </summary>
public bool Repeat { get; set; }
/// <summary>
/// true if the control key was down when the event was fired. false otherwise.
/// </summary>
public bool CtrlKey { get; set; }
/// <summary>
/// true if the shift key was down when the event was fired. false otherwise.
/// </summary>
public bool ShiftKey { get; set; }
/// <summary>
/// true if the alt key was down when the event was fired. false otherwise.
/// </summary>
public bool AltKey { get; set; }
/// <summary>
/// true if the meta key was down when the event was fired. false otherwise.
/// </summary>
public bool MetaKey { get; set; }
/// <summary>
/// Gets or sets the type of the event.
/// </summary>
public string Type { get; set; }
}
}