| java.lang.Object org.gjt.sp.jedit.gui.KeyEventTranslator
KeyEventTranslator | public class KeyEventTranslator (Code) | | In conjunction with the KeyEventWorkaround , hides some
warts in the AWT key event API.
author: Slava Pestov version: $Id: KeyEventTranslator.java 11176 2007-12-01 08:29:08Z k_satoda $ |
Inner Class :public static class Key | |
lastKeyPressAccepted | protected static boolean lastKeyPressAccepted(Code) | | |
addTranslation | public static void addTranslation(Key key1, Key key2)(Code) | | Adds a keyboard translation.
Parameters: key1 - Translate this key Parameters: key2 - Into this key since: jEdit 4.2pre3 |
getModifierString | public static String getModifierString(InputEvent evt)(Code) | | Returns a string containing symbolic modifier names set in the
specified event.
Parameters: evt - The event since: jEdit 4.2pre3 |
getSymbolicModifierName | public static char getSymbolicModifierName(int mod)(Code) | | Returns a the symbolic modifier name for the specified Java modifier
flag.
Parameters: mod - A modifier constant from InputEvent since: jEdit 4.2pre3 |
modifiersToString | public static String modifiersToString(int mods)(Code) | | |
parseKey | public static Key parseKey(String keyStroke)(Code) | | Converts a string to a keystroke. The string should be of the
form modifiers+shortcut where modifiers
is any combination of A for Alt, C for Control, S for Shift
or M for Meta, and shortcut is either a single character,
or a keycode name from the KeyEvent class, without
the VK_ prefix.
Parameters: keyStroke - A string description of the key stroke since: jEdit 4.2pre3 |
setModifierMapping | public static void setModifierMapping(int c, int a, int m, int s)(Code) | | Changes the mapping between symbolic modifier key names
(C , A , M , S ) and
Java modifier flags.
You can map more than one Java modifier to a symobolic modifier, for
example :
setModifierMapping(
InputEvent.CTRL_MASK,
InputEvent.ALT_MASK | InputEvent.META_MASK,
0,
InputEvent.SHIFT_MASK);
You cannot map a Java modifer to more than one symbolic modifier.
Parameters: c - The modifier(s) to map the C modifier to Parameters: a - The modifier(s) to map the A modifier to Parameters: m - The modifier(s) to map the M modifier to Parameters: s - The modifier(s) to map the S modifier to since: jEdit 4.2pre3 |
|
|