UI Accessibility Plugin  Version 1.1.1
Make your UI accessible for visually impaired users
UAP_VirtualKeyboard Class Reference
Inheritance diagram for UAP_VirtualKeyboard:

Classes

class  UAPKeyboardLayout
 

Public Types

enum  EKeyboardMode { Default = 0, Password = 1 }
 Default: Normal text keyboard, with a button to switch to numbers and symbols. Text is displayed as typed in the preview label. Password: Normal text keyboard, with a button to switch to numbers and symbols. Letters are displayed for a brief moment after they are typed, then they are replaced by a dot '•' More...
 

Public Member Functions

void OnShiftKeyPressed ()
 
void OnToggleKeyPressed ()
 
void OnLanguageKeyPressed ()
 
void OnLetterKeyPressed (Button button)
 
void OnSpacePressed ()
 
void OnBackSpacePressed ()
 
void OnReturnPressed ()
 
void OnClearTextPressed ()
 
void OnDonePressed ()
 
void OnCancelPressed ()
 

Static Public Member Functions

static void SetOnFinishListener (UnityAction< string, bool > callback)
 Calls back after the input was finished. Parameters of the callback function: string: text in the edit field (will be unchanged if text input was canceled) bool: true if 'Done' (or 'Return' in single line input) was pressed, false if the text input was canceled More...
 
static void SetOnChangeListener (UnityAction< string > callback)
 Optional, calls back every time the text is changed so it can be updated in the input text field (if desired). If the input is canceled, the OnFinish listener will be called with the original text. More...
 
static void CloseKeyboard ()
 Cancels the input and closes the keyboard. Text will be reset to what it was when the keyboard was opened. More...
 
static UAP_VirtualKeyboard ShowOnscreenKeyboard (string prefilledText="", EKeyboardMode keyboardMode=EKeyboardMode.Default, bool startCapitalized=true, bool alllowMultiline=false)
 
static void ClearAllListeners ()
 Remove all listeners to keyboard events Generally there is no need to remove listeners again, as they are automatically cleared when the keyboard is closed. More...
 
static bool IsOpen ()
 Returns true if the virtual keyboard is currently open/visible on screen Will return false if the keyboard is in the process of closing More...
 
static bool SupportsSystemLanguage ()
 Returns true if a keyboard layout has been provided specifically for the system language. The keyboard will default to the English keyboard layout if the language is not supported. More...
 

Public Attributes

UAPKeyboardLayout m_NumbersLayout = new UAPKeyboardLayout() { m_Letters = "1234567890@#$&*()'\"_ -/:;!?" }
 
UAPKeyboardLayout m_SymbolsLayout = new UAPKeyboardLayout() { m_Letters = "1234567890€£¥%^[]{}+=|\\©®™", m_BottomKeys = "<>" }
 
List< UAPKeyboardLayoutm_SupportedKeyboardLayouts = new List<UAPKeyboardLayout>()
 
Transform m_SecondButtonRow = null
 
List< Button > m_LetterButtons = new List<Button>()
 
Text m_PreviewText = null
 
UAP_BaseElement m_PreviewTextAccessible = null
 
Button m_LanguageButton = null
 
Button m_EmailAtButton = null
 
Button m_ShiftKey = null
 
Image m_ShiftSymbol = null
 
Button m_SwitchKey = null
 
Button m_Done = null
 
Button m_Cancel = null
 
Button m_LeftOfSpace = null
 
Button m_RightOfSpace = null
 
Button m_ReturnKey = null
 

Member Enumeration Documentation

Default: Normal text keyboard, with a button to switch to numbers and symbols. Text is displayed as typed in the preview label. Password: Normal text keyboard, with a button to switch to numbers and symbols. Letters are displayed for a brief moment after they are typed, then they are replaced by a dot '•'

Member Function Documentation

static void UAP_VirtualKeyboard.ClearAllListeners ( )
static

Remove all listeners to keyboard events Generally there is no need to remove listeners again, as they are automatically cleared when the keyboard is closed.

static void UAP_VirtualKeyboard.CloseKeyboard ( )
static

Cancels the input and closes the keyboard. Text will be reset to what it was when the keyboard was opened.

static bool UAP_VirtualKeyboard.IsOpen ( )
static

Returns true if the virtual keyboard is currently open/visible on screen Will return false if the keyboard is in the process of closing

Returns
static void UAP_VirtualKeyboard.SetOnChangeListener ( UnityAction< string >  callback)
static

Optional, calls back every time the text is changed so it can be updated in the input text field (if desired). If the input is canceled, the OnFinish listener will be called with the original text.

static void UAP_VirtualKeyboard.SetOnFinishListener ( UnityAction< string, bool >  callback)
static

Calls back after the input was finished. Parameters of the callback function: string: text in the edit field (will be unchanged if text input was canceled) bool: true if 'Done' (or 'Return' in single line input) was pressed, false if the text input was canceled

static bool UAP_VirtualKeyboard.SupportsSystemLanguage ( )
static

Returns true if a keyboard layout has been provided specifically for the system language. The keyboard will default to the English keyboard layout if the language is not supported.


The documentation for this class was generated from the following file: