gnu.jemacs.buffer
Class EKeymap
public
class
EKeymap
extends RangeTable
implements Named
Method Summary |
static int | asKeyStroke(char ch, int mods) |
static int | asKeyStroke(Object key) |
void | defineKey(Object keySpec, Object binding) |
void | defineKey(int key, Object binding) |
EKeymap | definePrefix(int key) Get or create keymap associate with a prefix key in a given keymap. |
Object | get(int key, int modifiers, boolean acceptDefaults) |
protected Object | get(int key, boolean acceptDefaults) |
Object | getDefaultBinding() |
static int | getKeyForName(String name) Map an Emacs key name to one of the KeyEVent VK_XXX codes.
|
static int | getModifiers(int code) |
String | getName() |
EKeymap | getParent() |
EKeymap[] | getParents() |
Object | getSymbol() |
static boolean | ignorable(int key)
True for a KeyStroke if the default action should be to ignore it.
|
Object | lookupKey(Sequence keys, boolean acceptDefaults) |
Object | lookupKey(int[] prefixKeys, int nPrefix, int key, boolean acceptDefaults) |
void | setAction(int key, Object command) |
void | setDefaultBinding(Object value) |
void | setName(String name) |
void | setParent(EKeymap parent) |
void | setParents(EKeymap[] parents) |
static String | show(int binary) |
static int | stripMeta(int key) |
String | toString() |
static String | toString(int code) |
public static final int ALT_MASK
public static final int CTRL_MASK
public static final
EKeymap[] empty
The Emacs global map.
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.
The Emacs global escape (meta) map.
public static final int META_MASK
public static int PRESSED
public static int RELEASED
public static final int SHIFT_MASK
public EKeymap(String name)
public EKeymap()
public static int asKeyStroke(char ch, int mods)
public static int asKeyStroke(Object key)
public void defineKey(Object keySpec, Object binding)
public void defineKey(int key, Object binding)
public
EKeymap definePrefix(int key)
Get or create keymap associate with a prefix key in a given keymap.
public Object get(int key, int modifiers, boolean acceptDefaults)
protected Object get(int key, boolean acceptDefaults)
public final Object getDefaultBinding()
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.
public static int getModifiers(int code)
public String getName()
public Object getSymbol()
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.)
public Object lookupKey(
Sequence keys, boolean acceptDefaults)
public Object lookupKey(int[] prefixKeys, int nPrefix, int key, boolean acceptDefaults)
public void setAction(int key, Object command)
public void setDefaultBinding(Object value)
public void setName(String name)
public void setParent(
EKeymap parent)
public void setParents(
EKeymap[] parents)
public static String show(int binary)
public static int stripMeta(int key)
public String toString()
public static String toString(int code)