Summary
Spawned from Code Review #1 (Accessibility / keyboard help).
VernierScaleNode and CaliperNode each register a KeyboardListener with inline string keys (arrowRight, pageUp, …). VernierKeyboardHelpSection rebuilds the same shortcuts with KeyboardHelpIconFactory icons. They are not linked through HotkeyData + KeyboardHelpSectionRow.fromHotkeyData.
Expected (per scenerystack-keyboard-help-dialog / CRC)
Define bindings once as HotkeyData, use them in the listeners, and build help rows with fromHotkeyData so documentation cannot drift from behavior.
Also: the duplicated switch (keysPressed) bodies in VernierScaleNode and CaliperNode can collapse onto one shared helper once HotkeyData exists.
References
src/common/view/VernierScaleNode.ts (addDragTarget)
src/caliper/view/CaliperNode.ts (slider keyboard listener)
src/common/view/VernierKeyboardHelpSection.ts
Summary
Spawned from Code Review #1 (Accessibility / keyboard help).
VernierScaleNodeandCaliperNodeeach register aKeyboardListenerwith inline string keys (arrowRight,pageUp, …).VernierKeyboardHelpSectionrebuilds the same shortcuts withKeyboardHelpIconFactoryicons. They are not linked throughHotkeyData+KeyboardHelpSectionRow.fromHotkeyData.Expected (per scenerystack-keyboard-help-dialog / CRC)
Define bindings once as
HotkeyData, use them in the listeners, and build help rows withfromHotkeyDataso documentation cannot drift from behavior.Also: the duplicated
switch (keysPressed)bodies inVernierScaleNodeandCaliperNodecan collapse onto one shared helper once HotkeyData exists.References
src/common/view/VernierScaleNode.ts(addDragTarget)src/caliper/view/CaliperNode.ts(slider keyboard listener)src/common/view/VernierKeyboardHelpSection.ts