All files / src/web shortcuts.js

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27                  2x                                  
/**
 * Every shortcut jsbeeb answers. The handlers in keyboard-setup.js and both lists of documentation, in the
 * README and in the page's own help, are checked against this, so a shortcut cannot be added
 * without appearing in all three.
 *
 * All of them are on Alt, because Ctrl belongs to the emulated machine: Ctrl-B is VDU 2 on a
 * BBC, Ctrl-L clears the screen, and so on. A row with no `key` is documentation for another
 * row's handler.
 */
export const Shortcuts = [
    {
        combo: "Alt-S",
        key: "S",
        note: "S",
        run: "toggleDebugger",
        description: "Enter the debugger, or leave it and resume",
    },
    { combo: "Alt-P", key: "P", note: "pause", run: "togglePause", description: "Pause emulation, or resume" },
    { combo: "Alt-T", key: "T", note: "turbo", run: "toggleFast", description: "Toggle turbo (fast-as-possible)" },
    { combo: "Alt-B", key: "B", run: "openPrinter", description: "Open printer output window" },
    { combo: "Alt-W", key: "W", note: "rewind", run: "openRewind", description: "Open rewind scrubber" },
    { combo: "Alt-M", key: "M", run: "openMediaDrive", description: "Media window, aimed at drive 0" },
    { combo: "Alt-Shift-M", description: "Media window, aimed at drive 1" },
    { combo: "Alt-C", key: "C", run: "openMediaTape", description: "Media window, aimed at the cassette" },
    { combo: "Alt-1 to Alt-8", description: "Hold an accessibility switch down" },
];