Skip to content

Commit

Permalink
https://github.com/phetsims/phet-info/issues/168
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom authored Jan 21, 2022
1 parent 4bafc5d commit 6f6fbff
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions doc/alternative-input-quickstart-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ globalKeyStateTracker.keydownEmitter.addListener( event => {

## Keyboard Shortcuts dialog

Add `hasKeyboardHelpContent: true` to Sim constructor options in your main.js. This creates a keyboard button
in the navigation bar, and requires each Screen to provide content for the Keyboard Shortcuts dialog. Pressing
the keyboard button will open the Keyboard Shortcuts dialog.

To provide content for the Keyboard Shortcuts dialog, add `keyboardHelpNode: {Node}` to constructor options
for each of your Screens. Instructions for creating this
Node are beyond the scope of this guide. Programming by example is recommended, by searching for "keyboardHelpNode". Your content will typically consist of standard descriptions (supported by common code.
e.g. `BasicActionsKeyboardHelpSection`),
plus custom descriptions (for sim-specific hotkeys). Consult with your designer on the content layout.
The Keyboard Shortcuts dialog is accessed by pressing the keyboard button in the navigation bar.
To make this button appear in the navigation bar, add `hasKeyboardHelpContent: true` to the Sim
constructor options in your main.js.

Each of your screens is then required to provide content for the dialog, via the
`keyboardHelpNode: {Node}` option to the Screen constructor. Instructions for creating this
Node are beyond the scope of this guide. Programming by example is recommended, by searching for "keyboardHelpNode". Your content will typically consist of standard "sections" supported by common code
(e.g. `BasicActionsKeyboardHelpSection`),
plus custom sections for sim-specific hotkeys. Consult with your designer about the content layout.

## Not Supported?

Expand Down

0 comments on commit 6f6fbff

Please sign in to comment.