mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
This means you can bind stuff to your numpad without it firing while you're *actually* typing stuff.
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using Robust.Shared.Input;
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
|
|
namespace Robust.Client.Input
|
|
{
|
|
[DataDefinition]
|
|
public sealed partial class KeyBindingRegistration
|
|
{
|
|
[DataField("function")]
|
|
public BoundKeyFunction Function;
|
|
[DataField("type")]
|
|
public KeyBindingType Type = KeyBindingType.State;
|
|
[DataField("key")]
|
|
public Keyboard.Key BaseKey;
|
|
[DataField("mod1")]
|
|
public Keyboard.Key Mod1;
|
|
[DataField("mod2")]
|
|
public Keyboard.Key Mod2;
|
|
[DataField("mod3")]
|
|
public Keyboard.Key Mod3;
|
|
[DataField("priority")]
|
|
public int Priority;
|
|
[DataField("canFocus")]
|
|
public bool CanFocus;
|
|
[DataField("canRepeat")]
|
|
public bool CanRepeat;
|
|
[DataField("allowSubCombs")]
|
|
public bool AllowSubCombs;
|
|
|
|
/// <summary>
|
|
/// For a <see cref="KeyBindingType.Command"/>-type binding,
|
|
/// whether the binding should activate if UI is focused.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool CommandWhenUIFocused { get; set; } = true;
|
|
}
|
|
}
|