forked from extern/Unexpected-Keyboard
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.
This commit is contained in:
parent
434f9aaf2d
commit
e025fddf2f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user