ALT_MASK
public static final int ALT_MASK
CTRL_MASK
public static final int CTRL_MASK
META_MASK
public static final int META_MASK
PRESSED
public static int PRESSED
RELEASED
public static int RELEASED
SHIFT_MASK
public static final int SHIFT_MASK
empty
public static final EKeymap[] empty
globalKeymap
public static EKeymap globalKeymap
The Emacs global map.
metaKey
public static final int metaKey
The magic key that indicates a (Emacs) meta prefix.
I.e. we saw either an Escape or a meta modifier.
metaKeymap
public static EKeymap metaKeymap
The Emacs global escape (meta) map.
asKeyStroke
public static int asKeyStroke(Object key)
asKeyStroke
public static int asKeyStroke(char ch,
int mods)
defineKey
public void defineKey(Object keySpec,
Object binding)
defineKey
public void defineKey(int key,
Object binding)
definePrefix
public EKeymap definePrefix(int key)
Get or create keymap associate with a prefix key in a given keymap.
get
protected Object get(int key,
boolean acceptDefaults)
get
public Object get(int key,
int modifiers,
boolean acceptDefaults)
getDefaultBinding
public final Object getDefaultBinding()
getKeyForName
public static int getKeyForName(String name)
Map an Emacs key name to one of the KeyEVent VK_XXX codes.
Returns VK_UNDEFINED if the name isn't recognized.
getModifiers
public static int getModifiers(int code)
getParent
public EKeymap getParent()
getParents
public EKeymap[] getParents()
ignorable
public static boolean ignorable(int key)
True for a KeyStroke if the default action should be to ignore it.
For example, pressing a shift key should not be an action!
We also have the complication that both KEY-PRESSED and KEY_TYPED
events and we typically want to ignore one but not both.
(If both are handled, we have problems with default actions, as
well as when to abort a prefix sequence. Swing does not have
this problem because it does not have prefix sequences and hence state.)
lookupKey
public Object lookupKey(Sequence keys,
boolean acceptDefaults)
lookupKey
public Object lookupKey(int[] prefixKeys,
int nPrefix,
int key,
boolean acceptDefaults)
setAction
public void setAction(int key,
Object command)
setDefaultBinding
public void setDefaultBinding(Object value)
setName
public void setName(String name)
- setName in interface Named
setParent
public void setParent(EKeymap parent)
setParents
public void setParents(EKeymap[] parents)
show
public static String show(int binary)
stripMeta
public static int stripMeta(int key)
toString
public String toString()
toString
public static String toString(int code)