abbot.tester
Class KeyStrokeMap

java.lang.Object
  |
  +--abbot.tester.KeyStrokeMap

public class KeyStrokeMap
extends Object

Map characters to the keycodes (and modifiers) required to generate them.

FIXME OSX generates key_typed events for control and alt characters; other platforms might as well, so there needs to be a keystroke map entry for those characters.


Method Summary
static char getChar(KeyStroke ks)
          Given a keycode and modifiers, return the equivalent character.
static KeyStroke getKeyStroke(char ch)
          Return the keycode-based KeyStroke corresponding to the given character, as best we can guess it.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getKeyStroke

public static KeyStroke getKeyStroke(char ch)
Return the keycode-based KeyStroke corresponding to the given character, as best we can guess it.

getChar

public static char getChar(KeyStroke ks)
Given a keycode and modifiers, return the equivalent character. Defined properly for US keyboards only. Please contribute your own.


Copyright © 2002-2003 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge