Closed jdeanwallace closed 11 months ago
Related https://github.com/tiny-pilot/tinypilot/issues/1026
This PR ports TinyPilot's "paste" functionality from the fontend to the backend, by parsing the pasted text into HID keystrokes on the server.
This PR copies the functionality of the following JS files to Python files, without modifying any existing code:
app/static/js/keycodes.js
app/text_to_hid.py
app/static/js/keycodes.test.js
app/text_to_hid_test.py
A
You can test this PR on device via the following stacked PR:
⏳ @jotaen4tinypilot please review this Pull Request
Related https://github.com/tiny-pilot/tinypilot/issues/1026
This PR ports TinyPilot's "paste" functionality from the fontend to the backend, by parsing the pasted text into HID keystrokes on the server.
This PR copies the functionality of the following JS files to Python files, without modifying any existing code:
app/static/js/keycodes.js
->app/text_to_hid.py
app/static/js/keycodes.test.js
->app/text_to_hid_test.py
Notes
A
) requires a key modifier (e.g., left shift) when being typed on a keyboard. Instead of all keyboard languages matching against a single regex, we now map a text character on a specific language keyboard directly to a HID keystroke. This should allow us to avoid ambiguity between keyboard languages and support more text characters.Peer testing
You can test this PR on device via the following stacked PR: