Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6480cfd9 authored by LordGiacomoS's avatar LordGiacomoS Committed by Simon Chan
Browse files

+ Improved RegEx & Enter Key compatibility

- Improved the regex expression by allowing for the special characters that exist in the base ASCII library
- Added necessary code to have Enter key function
parent d9cdc50b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1002,7 +1002,7 @@ class ScrcpyPageState {
        }

        const { key, code } = e;
        if (key.match(/^[a-z0-9]$/i)) {
        if (key.match(/^[!-`{-~]$/i)) {
            this.client!.injectText(key);
            return;
        }
@@ -1010,6 +1010,7 @@ class ScrcpyPageState {
        const keyCode = ({
            Backspace: AndroidKeyCode.Delete,
            Space: AndroidKeyCode.Space,
            Enter: AndroidKeyCode.Enter,
        } as Record<string, AndroidKeyCode | undefined>)[code];

        if (keyCode) {