Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make keyboard input bridge more flexible #33

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Conversation

robotlolita
Copy link
Contributor

Different engines listen to keyboard events in different elements (e.g.: Bitsy uses document, Ren'py uses window, Godot uses the canvas it's rendering to), so the element we dispatch events to needs to be configurable.

This patch introduces this in a backwards compatible way. A new keyboard-input-proxy-v2 bridge works like input-proxy, but takes in an additional "selector" parameter, which can be "window", "document", or a CSS selector to find an element on the page (we poll for up to 60 seconds). Uses of the legacy input-proxy bridge are converted to the new one at runtime, but parsing support for the older value will always be kept.

Different engines listen to keyboard events in different elements (e.g.: Bitsy uses document, Ren'py uses window, Godot uses the canvas it's rendering to), so the element we dispatch events to needs to be configurable.

This patch introduces this in a backwards compatible way. A new keyboard-input-proxy-v2 bridge works like input-proxy, but takes in an additional "selector" parameter, which can be "window", "document", or a CSS selector to find an element on the page (we poll for up to 60 seconds). Uses of the legacy input-proxy bridge are converted to the new one at runtime, but parsing support for the older value will always be kept.
@robotlolita robotlolita added c:kernel Changes to the Kate emulator kernel (requires strict audits!) c:tooling Changes to Kate's developer tooling/SDKs (relaxed audits) labels Nov 14, 2023
@robotlolita robotlolita merged commit db56918 into main Nov 14, 2023
1 check passed
@robotlolita robotlolita deleted the patch/input-bridge branch November 14, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:kernel Changes to the Kate emulator kernel (requires strict audits!) c:tooling Changes to Kate's developer tooling/SDKs (relaxed audits)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant