// %BANNER_BEGIN%
// ---------------------------------------------------------------------
// %COPYRIGHT_BEGIN%
// Copyright (c) (2018-2022) Magic Leap, Inc. All Rights Reserved.
// Use of this file is governed by the Software License Agreement, located here: https://www.magicleap.com/software-license-agreement-ml2
// Terms and conditions applicable to third-party materials accompanying this distribution may also be found in the top-level NOTICE file appearing herein.
// %COPYRIGHT_END%
// ---------------------------------------------------------------------
// %BANNER_END%
namespace UnityEngine.XR.MagicLeap
{
using System;
///
/// MLWebView class exposes static functions that allows an application to instantiate a hardware
/// accelerated WebView and interact with it(via "mouse" and "keyboard" events).
///
public partial class MLWebView
{
///
/// Enums for all possible ML Key Codes.
///
public enum KeyCode
{
Unknown = 0,
Home = 3,
Back = 4,
DpadLeft = 21,
DpadRight = 22,
Delete = 67,
Focus = 80,
Plus = 81,
Menu = 82,
Forward = 125,
Trigger = 500,
Capture = 501,
Bumper = 502,
Reality = 503,
Battery = 504,
MLBack = 508,
HomeTap = MLBack, // for backward compatability.
HomeMediumTap = 509,
Popple = 510,
MouseLeft = 511,
MouseRight = 512,
MouseWheel = 513,
MouseExtra = 514,
MouseSide = 515,
VkbCancel = 1001,
VkbSubmit = 1002,
VkbPrevious = 1003,
VkbNext = 1004,
VkbClear = 1005,
VkbClose = 1006,
VkbCustom1 = 1007,
VkbCustom2 = 1008,
VkbCustom3 = 1009,
VkbCustom4 = 1010,
VkbHidePassword = 1012,
VkbShowPassword = 1013
}
///
/// Flags to set special key states during input.
///
[Flags]
public enum EventFlags
{
///
/// No flag is applied.
///
None = 0,
///
/// Caps Lock is on.
///
CapsLockOn = 1 << 0,
///
/// Shift is pressed.
///
ShiftDown = 1 << 1,
///
/// Control is pressed.
///
ControlDown = 1 << 2,
///
/// Alt is pressed.
///
AltDown = 1 << 3,
///
/// Left mouse button is pressed.
///
LeftMouseButton = 1 << 4,
///
/// Middle mouse button is pressed.
///
MiddleMouseButton = 1 << 5,
///
/// Right mouse button is pressed.
///
RightMouseButton = 1 << 6,
///
/// Command key is pressed.
///
CommandDown = 1 << 7,
///
/// NumLock is on.
///
NumLockOn = 1 << 8,
///
/// Was key struck on KeyPad.
///
IsKeyPad = 1 << 9,
///
/// Is left key.
///
IsLeft = 1 << 10,
///
/// Is right key.
///
IsRight = 1 << 11,
///
/// AltGR is pressed.
///
AltGRDown = 1 << 12,
};
///
/// Flags related to a text entry field passed when on_show_keyboard is called.
///
[Flags]
public enum TextInputFlags
{
///
/// Nonne of flasg are applied.
///
None = 0,
///
/// Autocompletion is on.
///
AutocompleteOn = 1 << 0,
///
/// Autocompletion is off.
///
AutocompleteOff = 1 << 1,
///
/// Autocorrection is on.
///
AutocorrectOn = 1 << 2,
///
/// Autocorrection is off.
///
AutocorrectOff = 1 << 3,
///
/// Spellcheck is on.
///
SpellcheckOn = 1 << 4,
///
/// Spellcheck is of.
///
SpellcheckOff = 1 << 5,
///
/// Autocapitalize is off.
///
AutocapitalizeNone = 1 << 6,
///
/// Autocapitalize characters.
///
AutocapitalizeCharacters = 1 << 7,
///
/// Autocapitalize words.
///
AutocapitalizeWords = 1 << 8,
///
/// Autocapitalize sentences.
///
AutocapitalizeSentences = 1 << 9,
///
/// Have next focusable element.
///
HaveNextFocusableElement = 1 << 10,
///
/// Have previous focusable element.
///
HavePreviousFocusableElement = 1 << 11,
///
/// has been a password field.
///
HasBeenPasswordField = 1 << 12,
};
///
/// The type of text entry selected when onShowKeyboard is called.
///
public enum TextInputType
{
///
/// None.
///
None,
///
/// Text.
///
Text,
///
/// Password.
///
Password,
///
/// Search.
///
Search,
///
/// Email.
///
Email,
///
/// Number
///
Number,
///
/// Telephone.
///
Telephone,
///
/// URL.
///
URL,
///
/// Date.
///
Date,
///
/// Date Time.
///
DateTime,
///
/// Date Time Local.
///
DateTimeLocal,
///
/// Month.
///
Month,
///
/// Time.
///
Time,
///
/// Week.
///
Week,
///
/// Text Area.
///
TextArea,
///
/// Content Editable.
///
ContentEditable,
///
/// Date Time Field.
///
DateTimeField,
};
}
}