Skip to content

feat(studio): toggle the shortcuts panel with the question-mark key - #6042

Draft
xiajiahang wants to merge 1 commit into
heygen-com:mainfrom
xiajiahang:fix/5580-shortcuts-panel-hotkey
Draft

xiajiahang wants to merge 1 commit into
heygen-com:mainfrom
xiajiahang:fix/5580-shortcuts-panel-hotkey

Conversation

@xiajiahang

Copy link
Copy Markdown
Contributor

What

Press ? to toggle Studio's existing keyboard shortcuts panel, including while the preview iframe has focus. Escape keeps closing it, and the default shortcut list includes ?.

Why

Keyboard help currently requires clicking the timeline toolbar button. Typing a question mark in a text field should continue to enter text.

Related work

Refs #5580. B-Payal expressed interest in this issue on October 14. No corresponding PR was found when rechecked before opening. This PR is a draft so the maintainer and original claimant can coordinate ownership before it proceeds.

How

  • Use the shared typing-target guard with the composed event path, including shadow-root inputs.
  • Ignore already-handled events, key repeats, composition input, and Ctrl/Meta/Alt combinations.
  • Forward ? through the existing preview iframe keyboard bridge, preserving editable-target checks and listener cleanup on reload and unmount.

Before

Pressing ? leaves the panel closed. Capture from an isolated browser page mounting the actual Studio component.

Before

After

The same key opens the panel. The browser verification page also mounts the actual preview hotkey bridge; typing ? in either document's input remains text. These are component verification captures, not a full-project Studio end-to-end test.

After

Test plan

  • Regression tests first failed for the missing outer-document and iframe behavior, then passed with the changes.
  • Related suites: 34 tests passed, rerun on upstream a8b576d15.
  • Full Studio suite on the original 0160fbee2 base: 7,946 passed, 16 todo; 698 files passed, 1 skipped (--maxWorkers=2). The subsequent upstream changes are a release bump and an engine fix; neither changes these Studio files.
  • Final Studio build and typecheck passed.
  • Real Chromium/Playwright: before/after, toggle, Escape, text input, iframe toggle and iframe text input.
  • Full pre-commit and commit-message hooks passed on the updated base, including core/Studio/scripts typechecks, lint, format, file-size checks, tracked-artifact checks and fallow.
  • Independent code review completed.
  • Comments reviewed against CONTRIBUTING.md.
  • In-app shortcut reference updated; no separate documentation page changed.

The commit is authored by xiajiahang and verified with GitHub's signature.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant