diff --git a/docs/keyboard.md b/docs/keyboard.md index 058f88bf..603cd28b 100644 --- a/docs/keyboard.md +++ b/docs/keyboard.md @@ -65,6 +65,9 @@ follows. | Ctrl + Alt + x, f, x | focusCharacterColumnInput | | Ctrl + Alt + x, f, y | focusCharacterRowInput | | Ctrl + Alt + x, f, w | focusWorldSelector | +| Ctrl + Alt + x, w, 1 | selectRobotCharacter | +| Ctrl + Alt + x, w, 2 | selectRabbitCharacter | +| Ctrl + Alt + x, w, 3 | selectRocketCharacter | | Ctrl + Alt + x, x | toggleFeedbackAnnouncements | ## VoiceOver Key Bindings @@ -114,4 +117,7 @@ with the starting key of a sequence. Those key bindings are as follows: | Alt + x, f, x | focusCharacterColumnInput | | Alt + x, f, y | focusCharacterRowInput | | Alt + x, f, w | focusWorldSelector | +| Alt + x, w, 1 | selectRobotCharacter | +| Alt + x, w, 2 | selectRabbitCharacter | +| Alt + x, w, 3 | selectRocketCharacter | | Alt + x, x | toggleFeedbackAnnouncements | diff --git a/src/App.js b/src/App.js index 8a1da1f6..83ff7b64 100644 --- a/src/App.js +++ b/src/App.js @@ -819,6 +819,15 @@ export class App extends React.Component { this.handleChangeCharacterPosition('turnRight'); } break; + case("selectRobotCharacter"): + this.setStateSettings({world: "default"}); + break; + case("selectRabbitCharacter"): + this.setStateSettings({world: "forest"}); + break; + case("selectRocketCharacter"): + this.setStateSettings({world: "space"}); + break; default: break; } diff --git a/src/KeyboardInputSchemes.js b/src/KeyboardInputSchemes.js index 9e870fef..6b059e6a 100644 --- a/src/KeyboardInputSchemes.js +++ b/src/KeyboardInputSchemes.js @@ -59,6 +59,11 @@ export type ActionName = | "turnCharacterLeft" | "turnCharacterRight" + // Select World Character + | "selectRobotCharacter" + | "selectRabbitCharacter" + | "selectRocketCharacter" + // Update Program | "deleteAll" ; @@ -200,6 +205,22 @@ const ExtendedKeyboardSequences: KeyboardInputScheme = { } }, + selectWorldCharacter: { + keyDef: { code: "KeyW", key: "w"}, + robotCharacter: { + keyDef: { key: "1"}, + actionName: "selectRobotCharacter" + }, + rabbitCharacter: { + keyDef: { key: "2"}, + actionName: "selectRabbitCharacter" + }, + rocketCharacter: { + keyDef: { key: "3"}, + actionName: "selectRocketCharacter" + } + }, + characterPosition: { keyDef: { code: "KeyC", key: "c" }, move: {