Repository navigation
Ariadne in the browser: Enter and Backspace reach text fields; a Send button for messages - #993
Merged
Merged
Conversation
… button for messages
In the browser the conference's chat field took typed letters but not
Enter or Backspace, so nothing could be sent. ImGuiOverlay hands ImGui
the keys the viewer's interactor reports, by name. VTK's own windows
name them as X11 does ("Return", "BackSpace", "Left"); in a browser
VTK's interactor passes the page's KeyboardEvent.key ("Enter",
"Backspace", "ArrowLeft"), which the overlay's table did not know.
Letters arrived anyway, through the CharEvent. Headless Chrome with real
key events: "hellox" then Backspace still read "hellox", and Enter
posted nothing.
The table now has both spellings (arrows, PageUp/PageDown, the
modifiers and " " too). It moves to an internal header,
src/cvcGL/ImGuiKeyNames.h, so cvcgl_imgui_key_names can check both
names for each key without a window or GL.
message_input gains `send:`, the label of a button on the field's right
that sends it as Enter does (ImGui; a terminal has Enter only). The
field narrows to leave the button room. The chat component uses
`send: Send`.
Multi-line already works once Enter does: Shift+Enter (and Ctrl+Enter)
add a line, up to max_lines (4), then it scrolls.
Tests: cvcgl_imgui_key_names (new); cvcgl_imgui_chat_widgets gains a
Send case (inside the window, sends, clears, keeps the focus, ignores an
empty field); the loader test reads `send:`.
transfix
added a commit
that referenced
this pull request
Nov 3, 2026
…dne-python-engine arigl's run_window: master's snapshot that ends at the frame a document quits on, and the browser loop paced by the next animation frame (arigl_wait_frame, CVC_ARIGL_YIELD=timeout), go into the after_load lambda that ariglx's Python program runs; set_log_verbosity sits beside lend_python.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the browser, the conference's chat field took typed letters, but Enter and Backspace did nothing, so a message could never be sent.
Why
ImGuiOverlay hands ImGui the keys the viewer's interactor reports, by name.
KeyboardEvent.keyinstead: "Enter", "Backspace", "ArrowLeft". The overlay's table didn't know those names.Desktop builds aren't affected: SDL3 owns their window and input (#829), and the browser keeps VTK's canvas window for now. In headless Chrome with real key events, typing "hellox" then Backspace still read "hellox", and Enter posted nothing.
What changes
src/cvcGL/ImGuiKeyNames.h, so a test can check it without a window.message_inputgainssend:, the label of a button on the field's right that sends the message as Enter does. The field narrows to leave the button room. Terminal backends keep Enter only.send: Send.max_lines(4), then the field scrolls.Checked
In headless Chrome on the conference page, with real key events:
cvcgl_imgui_key_names(new): both names for 16 keys, with no window or GL.cvcgl_imgui_chat_widgets: a Send case, which checks the button:The harness now makes each session's ImGui context current, because
CreateContextleaves an earlier context current.The loader test reads
send:.ariadne_loader_test215/215,ariadne_runtime_test250/250, andcvcgl_camera,cvcgl_imgui_ui_size,cvcgl_imgui_window_fitandcvcgl_ari_goldenpass.Not here
The longer-term fix is the next step after #829: SDL3 owning the browser canvas and its WebGL2 context, which gives the browser a single input path like the desktop builds.