| java.lang.Object abbot.tester.KeyStrokeMap
All known Subclasses: abbot.tester.MapGenerator,
KeyStrokeMap | public class KeyStrokeMap implements KeyStrokeMapProvider(Code) | | Provides read of local-specific mappings for virtual keycode-based
KeyStrokes to characters and vice versa.
The map format is a properties file with each line containing an entry of
the form
VKNAME.MOD=VALUE
The VKNAME is the String suffix of the KeyEvent VK_ keycode. MOD is the
integer value of the current modifier mask (assumes only a single modifier
has any effect on key output, interesting values are considered to be 0,
1, 2, 8). VALUE is the char value of the KEY_TYPED keyChar
corresponding to the VK_ keycode and modifiers, as an integer value.
|
Method Summary | |
public static char | getChar(KeyStroke ks) Given a keycode-based KeyStroke, return the equivalent character.
Defined properly for US keyboards only. | protected static String | getFilename(String base) Convert a String containing a unique identifier for the map into a
unique filename. | public static KeyStroke | getKeyStroke(char ch) Return the keycode-based KeyStroke corresponding to the given
character, as best we can guess it, or null if we don't know how to
generate it. | protected static String[] | getMapDescriptions() | protected static String[] | getMapNames() | public Map | loadCharacterMap() Load a map for the current locale to translate a character into a
corresponding virtual keycode-based KeyStroke. | public Map | loadKeyStrokeMap() Load a map for the current locale to translate a virtual keycode into
a character-based KeyStroke. | public static void | main(String[] args) Return currently available locales. |
getChar | public static char getChar(KeyStroke ks)(Code) | | Given a keycode-based KeyStroke, return the equivalent character.
Defined properly for US keyboards only. Please contribute your own.
KeyEvent.VK_UNDEFINED if the result is unknown. |
getFilename | protected static String getFilename(String base)(Code) | | Convert a String containing a unique identifier for the map into a
unique filename.
|
getKeyStroke | public static KeyStroke getKeyStroke(char ch)(Code) | | Return the keycode-based KeyStroke corresponding to the given
character, as best we can guess it, or null if we don't know how to
generate it.
|
getMapDescriptions | protected static String[] getMapDescriptions()(Code) | | |
loadCharacterMap | public Map loadCharacterMap()(Code) | | Load a map for the current locale to translate a character into a
corresponding virtual keycode-based KeyStroke.
|
loadKeyStrokeMap | public Map loadKeyStrokeMap()(Code) | | Load a map for the current locale to translate a virtual keycode into
a character-based KeyStroke.
|
main | public static void main(String[] args)(Code) | | Return currently available locales.
|
|
|