public class KeyMapper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.regex.Pattern |
controlPattern |
private static java.util.logging.Logger |
LOGGER |
private static java.util.regex.Pattern |
metaPattern |
private static java.util.regex.Pattern |
quotePattern |
| Constructor and Description |
|---|
KeyMapper() |
| Modifier and Type | Method and Description |
|---|---|
private static int[] |
convertRandomControlKeys(java.lang.String random) |
private static int[] |
convertRandomKeys(java.lang.String random) |
private static int |
lookupControlKey(char c) |
private static int[] |
mapKeys(java.lang.String keys) |
static KeyOperation |
mapKeys(java.lang.String keys,
Operation operation)
Parse lines that contain mapping like: C-q, Control-q, M-a, Meta-a, Meta-Control-b....
|
static KeyOperation |
mapKeys(java.lang.String keys,
java.lang.String operation)
Parse lines that contain mapping like: C-q, Control-q, M-a, Meta-a, Meta-Control-b....
|
static KeyOperation |
mapQuoteKeys(java.lang.String keys,
Operation operation)
Parse key mapping lines that start with "
|
static KeyOperation |
mapQuoteKeys(java.lang.String keys,
java.lang.String operation)
Parse key mapping lines that start with "
|
private static int[] |
mapRandomKeys(java.lang.String randomKeys,
boolean control,
boolean meta)
Map all random keys after meta/control to its proper int value.
|
private static final java.util.regex.Pattern quotePattern
private static final java.util.regex.Pattern metaPattern
private static final java.util.regex.Pattern controlPattern
private static final java.util.logging.Logger LOGGER
public static KeyOperation mapQuoteKeys(java.lang.String keys, Operation operation)
keys - that need mappingoperation - is is specified forpublic static KeyOperation mapQuoteKeys(java.lang.String keys, java.lang.String operation)
keys - that need mappingoperation - it is specified forpublic static KeyOperation mapKeys(java.lang.String keys, Operation operation)
keys - that need mappingoperation - it is specified forpublic static KeyOperation mapKeys(java.lang.String keys, java.lang.String operation)
keys - that need mappingoperation - it is specified forprivate static int[] mapKeys(java.lang.String keys)
private static int[] mapRandomKeys(java.lang.String randomKeys,
boolean control,
boolean meta)
randomKeys - keys after meta/controlcontrol - true or falsemeta - true or falseprivate static int[] convertRandomKeys(java.lang.String random)
private static int[] convertRandomControlKeys(java.lang.String random)
private static int lookupControlKey(char c)