java.lang.Object
technology.sola.engine.input.KeyboardLayout
KeyboardLayout contains information for the current keyboard layout. This includes things like
what characters should render when shift is pressed. Defaults to
KeyboardLayout.Type.QWERTY
.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyboardLayout.Type
getType()
static boolean
hasShift
(int keyCode) Checks to see if a keyCode has a shifted variant character or not.static void
setType
(KeyboardLayout.Type type) Sets theKeyboardLayout.Type
of keyboard in use.static char
shift
(char character) Returns the shifted variant of the character for the current keyboard type.
-
Method Details
-
shift
public static char shift(char character) Returns the shifted variant of the character for the current keyboard type. If there is no shifted variant then the original character will return.- Parameters:
character
- the character to get the shift variant for- Returns:
- the shifted variant or the original character if there is no shifted variant
-
hasShift
public static boolean hasShift(int keyCode) Checks to see if a keyCode has a shifted variant character or not.- Parameters:
keyCode
- the key code to check- Returns:
- true if it has a shifted variant for the current keyboard type
-
getType
- Returns:
- the current
KeyboardLayout.Type
of keyboard in use
-
setType
Sets theKeyboardLayout.Type
of keyboard in use.- Parameters:
type
- the new type of keyboard in use
-