diff options
| author | juloo | 2015-08-02 20:21:53 +0200 |
|---|---|---|
| committer | juloo | 2015-08-02 20:21:53 +0200 |
| commit | 12a04ae2c77e09131339f4f9ca160e63e12b216e (patch) | |
| tree | 6c5bae3f34ee2fcf0222ae0d9dd2104895bf9e50 /srcs/juloo.keyboard2/KeyValue.java | |
| parent | 1115a34a19411aeca6ba4faa8a775fb0faa07f21 (diff) | |
| download | unexpected-keyboard-12a04ae2c77e09131339f4f9ca160e63e12b216e.tar.gz unexpected-keyboard-12a04ae2c77e09131339f4f9ca160e63e12b216e.zip | |
Lockable keys
Diffstat (limited to 'srcs/juloo.keyboard2/KeyValue.java')
| -rw-r--r-- | srcs/juloo.keyboard2/KeyValue.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index 5994be2..9c25673 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -10,9 +10,12 @@ class KeyValue public static final int EVENT_DELETE = -3; public static final int FLAG_KEEP_ON = 1; - public static final int FLAG_CTRL = (1 << 1); - public static final int FLAG_SHIFT = (1 << 2); - public static final int FLAG_ALT = (1 << 3); + public static final int FLAG_LOCK = (1 << 1); + public static final int FLAG_CTRL = (1 << 2); + public static final int FLAG_SHIFT = (1 << 3); + public static final int FLAG_ALT = (1 << 4); + public static final int FLAG_NOCHAR = (1 << 5); + public static final int FLAG_LOCKED = (1 << 8); private String _name; private String _symbol; @@ -92,9 +95,9 @@ class KeyValue for (int i = 0; i < chars.length(); i++) new KeyValue(chars.substring(i, i + 1)); - new KeyValue("shift", "⇧", '\0', EVENT_NONE, FLAG_KEEP_ON | FLAG_SHIFT); - new KeyValue("ctrl", "Ctrl", '\0', EVENT_NONE, FLAG_KEEP_ON | FLAG_CTRL); - new KeyValue("alt", "Alt", '\0', EVENT_NONE, FLAG_KEEP_ON | FLAG_ALT); + new KeyValue("shift", "⇧", 'S', EVENT_NONE, FLAG_KEEP_ON | FLAG_NOCHAR | FLAG_LOCK | FLAG_SHIFT); + new KeyValue("ctrl", "Ctrl", 'C', EVENT_NONE, FLAG_KEEP_ON | FLAG_NOCHAR | FLAG_CTRL); + new KeyValue("alt", "Alt", 'A', EVENT_NONE, FLAG_KEEP_ON | FLAG_NOCHAR | FLAG_ALT); new KeyValue("backspace", "⌫", EVENT_BACKSPACE); new KeyValue("delete", "⌦", EVENT_DELETE); |
