using System;
using UnityEngine.Events;
namespace UnityEngine.XR.Interaction.Toolkit.Samples.SpatialKeyboard
{
#region EventArgs
///
/// Event data associated with a keyboard event.
///
public class KeyboardBaseEventArgs
{
///
/// The XR Keyboard associated with this keyboard event.
///
public XRKeyboard keyboard { get; set; }
}
///
/// Event data associated with a keyboard event that includes text.
///
public class KeyboardTextEventArgs : KeyboardBaseEventArgs
{
///
/// The current keyboard text when this event is fired.
///
public string keyboardText { get; set; }
}
///
/// Event data associated with a keyboard event that includes a keyboard key.
///
public class KeyboardKeyEventArgs : KeyboardBaseEventArgs
{
///
/// The key associated with this event.
///
public XRKeyboardKey key { get; set; }
}
///
/// Event data associated with a keyboard event that includes a bool value.
///
public class KeyboardBoolEventArgs : KeyboardBaseEventArgs
{
///
/// The bool value associated with this event.
///
public bool value { get; set; }
}
///
/// Event data associated with a keyboard event that includes a layout string.
///
public class KeyboardLayoutEventArgs : KeyboardBaseEventArgs
{
///
/// The layout string associated with this event.
///
public string layout { get; set; }
}
///
/// Event data associated with modifiers of the keyboard.
///
public class KeyboardModifiersEventArgs : KeyboardBaseEventArgs
{
///
/// The shift value associated with this event.
///
public bool shiftValue { get; set; }
///
/// The caps lock value associated with this event.
///
public bool capsLockValue { get; set; }
}
#endregion
#region Events
///
/// that Unity invokes on a keyboard.
///
[Serializable]
public sealed class KeyboardEvent : UnityEvent
{
}
///
/// that includes text that Unity invokes on a keyboard.
///
[Serializable]
public sealed class KeyboardTextEvent : UnityEvent
{
}
///
/// that includes a key that Unity invokes on a keyboard.
///
[Serializable]
public sealed class KeyboardKeyEvent : UnityEvent
{
}
///
/// that includes a bool value that Unity invokes on a keyboard.
///
[Serializable]
public sealed class KeyboardBoolEvent : UnityEvent
{
}
///
/// that includes a layout string that Unity invokes on a keyboard.
///
[Serializable]
public sealed class KeyboardLayoutEvent : UnityEvent
{
}
///
/// that includes supported keyboard modifiers.
///
/// Currently supported keyboard modifiers include shift and caps lock.
[Serializable]
public sealed class KeyboardModifiersEvent : UnityEvent
{
}
#endregion
}