Skip to content

Add keyboard shortcuts for whiteboard tools - #619

Draft
dges5202 wants to merge 5 commits into
sysprog21:mainfrom
dges5202:hw3-whiteboard-tool-shortcuts
Draft

dges5202 wants to merge 5 commits into
sysprog21:mainfrom
dges5202:hw3-whiteboard-tool-shortcuts

Conversation

@dges5202

@dges5202 dges5202 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

The whiteboard toolbar only switched tools by click. Bare P, E and T now switch the pen, eraser and text tools, cycle pen colours or eraser sizes on a repeat press, and restore the previous draw tool when leaving text. Always-visible key labels sit beside those controls so the shortcuts are discoverable, and the shortcuts stay quiet while typing, while a key is held, or when focus is outside the board.

Closes #618


Summary by cubic

Adds keyboard shortcuts for the whiteboard toolbar so bare P, E, and T switch between the pen, eraser, and text tools without clicking. A repeat press cycles pen colors or eraser sizes, and pressing T again while in text mode restores the previous draw tool. Always-visible key labels make the shortcuts discoverable, and shortcuts are ignored while typing, on key repeats, or when focus is outside the board. Closes #618.

Written for commit 4241f11. Summary will update on new commits.

View guided diff

Bare P, E and T switch the pen, eraser and text tools on the
whiteboard toolbar. A second press cycles pen colours or eraser
sizes, and T restores the previous draw tool. The toolbar shows
always-visible key labels so the shortcuts are discoverable.

Closes sysprog21#618

Change-Id: I081d83ecb05e15004b49a83b5f14d0d290cb28f0
cubic-dev-ai[bot]

This comment was marked as resolved.

Bare P must stay quiet when focus is on a real control outside

Change-Id: I54088cc1234a26de32c5e6a0d1924eea30285f49
Comment thread web/styles.css Resolved
Comment thread web/interview.html Resolved
Comment thread web/interview.js Resolved
Comment thread web/interview.js Resolved
Lift paper ink tokens to the board panel so keycaps stay readable,
announce P on each pen swatch, document the bare keys in the README
toolbar table, and keep lastDrawTool as one assignment.

Change-Id: Ieb19085060c25d44c29b7740a885d0c626468ac9

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Checking only the first colour left the other three unguarded.

Change-Id: Ib5ba1378730c9f666b4546d6880ba3ee81ded938
Comment thread web/styles.css Resolved
The shared flex-row rule already centers .board-toolbar items.

Change-Id: I6b921db37487ae4fe9bd2f7901cdf754a5b2d43a
@jserv
jserv marked this pull request as draft November 7, 2026 22:51
@jserv

jserv commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Wait for approval from @yunhsuan0510 .

@dges5202

dges5202 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — waiting for @yunhsuan0510's approval. (I don't have permission to add them as an official reviewer from this account.)

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.

Add keyboard shortcuts for whiteboard tools

2 participants