diff options
| author | Jules Aguillon | 2023-06-28 18:02:01 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2023-06-28 18:04:32 +0200 |
| commit | e025fddf2f0512a156399c886b61bb9160f9ee79 (patch) | |
| tree | 4d7c70080e635880e666336f2e969dbf8e4cdaf1 | |
| parent | 434f9aaf2dd0aab74b7284aca5a6d49f49889c2d (diff) | |
| download | unexpected-keyboard-e025fddf2f0512a156399c886b61bb9160f9ee79.tar.gz unexpected-keyboard-e025fddf2f0512a156399c886b61bb9160f9ee79.zip | |
Accept some escaped keys in custom layouts
These symbols have special meaning when in `res/xml` and are escaped in
standard layouts.
The backslash is not stripped when parsed from the custom layout option.
Treat these backslashed keys specifically to allow standard layouts to
be passed back to the custom layout option.
| -rw-r--r-- | srcs/juloo.keyboard2/KeyValue.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index 0904f2f..ed80f86 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -302,6 +302,14 @@ final class KeyValue { switch (name) { + /* These symbols have special meaning when in `res/xml` and are escaped in + standard layouts. The backslash is not stripped when parsed from the + custom layout option. */ + case "\\?": return fallbackMakeKey("?"); + case "\\#": return fallbackMakeKey("#"); + case "\\@": return fallbackMakeKey("@"); + case "\\\\": return fallbackMakeKey("\\"); + case "shift": return modifierKey(0x0A, Modifier.SHIFT, 0); case "ctrl": return modifierKey("Ctrl", Modifier.CTRL, 0); case "alt": return modifierKey("Alt", Modifier.ALT, 0); |
