Package org.openstreetmap.josm.tools
Class KeyboardUtils
- java.lang.Object
-
- org.openstreetmap.josm.tools.KeyboardUtils
-
public final class KeyboardUtils extends Object
Keyboard utils.- Since:
- 14012
-
-
Field Summary
Fields Modifier and Type Field Description static int
EXTENDED_KEYCODE_FLAG
The flag for extended key codes.private static Map<Integer,Integer>
regularKeyCodesMap
-
Constructor Summary
Constructors Modifier Constructor Description private
KeyboardUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static void
addArabicCharacters(Map<Integer,Character> map)
(package private) static void
addArmenianCharacters(Map<Integer,Character> map)
(package private) static void
addCyrillicCharacters(Map<Integer,Character> map)
(package private) static void
addGeorgianCharacters(Map<Integer,Character> map)
(package private) static void
addGreekCharacters(Map<Integer,Character> map)
(package private) static void
addHebrewCharacters(Map<Integer,Character> map)
(package private) static void
addJapaneseCharacters(Map<Integer,Character> map)
(package private) static void
addLatinCharacters(Map<Integer,Character> map)
(package private) static void
addSymbolCharacters(Map<Integer,Character> map)
(package private) static void
addThaiCharacters(Map<Integer,Character> map)
static List<Character>
getCharactersForKey(char row, int column)
Returns the plausible characters expected to be displayed for the given physical key and current input locale.static List<Character>
getCharactersForKey(char row, int column, Locale l)
Returns the plausible characters expected to be displayed for the given physical key and locale.static Map<Integer,Character>
getExtendedKeyCodes(Locale locale)
Returns the extended key codes that we are susceptible to receive given the locale.static Map<Integer,Integer>
getRegularKeyCodesMap()
Returns Keycodes declared inKeyEvent
with corresponding Unicode values.
-
-
-
Field Detail
-
EXTENDED_KEYCODE_FLAG
public static final int EXTENDED_KEYCODE_FLAG
The flag for extended key codes.- See Also:
- Constant Field Values
-
regularKeyCodesMap
private static final Map<Integer,Integer> regularKeyCodesMap
-
-
Constructor Detail
-
KeyboardUtils
private KeyboardUtils()
-
-
Method Detail
-
getRegularKeyCodesMap
public static Map<Integer,Integer> getRegularKeyCodesMap()
Returns Keycodes declared inKeyEvent
with corresponding Unicode values.- Returns:
- Map of KeyEvent VK_ characters constants indexed by their unicode value
-
getCharactersForKey
public static List<Character> getCharactersForKey(char row, int column)
Returns the plausible characters expected to be displayed for the given physical key and current input locale. Physical keys are defined as per ISO/IEC 9995-2 keyboard layout. Only E00 is currently supported.- Parameters:
row
- row letter as per ISO/IEC 9995-2 (A to E)column
- column number as per ISO/IEC 9995-2 (0 to 14, plus 99)- Returns:
- the plausible characters expected to be displayed for the given physical key and current input locale
-
getCharactersForKey
public static List<Character> getCharactersForKey(char row, int column, Locale l)
Returns the plausible characters expected to be displayed for the given physical key and locale. Physical keys are defined as per ISO/IEC 9995-2 keyboard layout. Only E00 is currently supported.- Parameters:
row
- row letter as per ISO/IEC 9995-2 (A to E)column
- column number as per ISO/IEC 9995-2 (0 to 14, plus 99)l
- locale (defining language and country)- Returns:
- the plausible characters expected to be displayed for the given physical key and locale
-
getExtendedKeyCodes
public static Map<Integer,Character> getExtendedKeyCodes(Locale locale)
Returns the extended key codes that we are susceptible to receive given the locale.- Parameters:
locale
- locale- Returns:
- the extended key codes that we are susceptible to receive given the locale
-
addLatinCharacters
static void addLatinCharacters(Map<Integer,Character> map)
-
addGreekCharacters
static void addGreekCharacters(Map<Integer,Character> map)
-
addCyrillicCharacters
static void addCyrillicCharacters(Map<Integer,Character> map)
-
addArmenianCharacters
static void addArmenianCharacters(Map<Integer,Character> map)
-
addHebrewCharacters
static void addHebrewCharacters(Map<Integer,Character> map)
-
addArabicCharacters
static void addArabicCharacters(Map<Integer,Character> map)
-
addThaiCharacters
static void addThaiCharacters(Map<Integer,Character> map)
-
addGeorgianCharacters
static void addGeorgianCharacters(Map<Integer,Character> map)
-
addSymbolCharacters
static void addSymbolCharacters(Map<Integer,Character> map)
-
addJapaneseCharacters
static void addJapaneseCharacters(Map<Integer,Character> map)
-
-