diff --git a/docs/keyboard.md b/docs/keyboard.md index f1f13cfb..a9e6581d 100644 --- a/docs/keyboard.md +++ b/docs/keyboard.md @@ -31,12 +31,12 @@ follows. | Ctrl + Alt + e | addCommandToEnd | | Ctrl + Alt + d | deleteCurrentStep | | Ctrl + Alt + i | announceScene | -| Ctrl + Alt + p | playPauseProgram | -| Ctrl + Alt + r | refreshScene | -| Ctrl + Alt + s | stopProgram | | < | decreaseProgramSpeed | | > | increaseProgramSpeed | +| Ctrl + Alt + p | playPauseProgram | +| Ctrl + Alt + r | refreshScene | | ? | showHide | +| Ctrl + Alt + s | stopProgram | | Ctrl + Alt + x, a, b, 1 | selectBackward1 | | Ctrl + Alt + x, a, b, 2 | selectBackward2 | | Ctrl + Alt + x, a, b, 3 | selectBackward3 | @@ -63,14 +63,19 @@ follows. | Ctrl + Alt + x, f, q | focusProgramSequence | | Ctrl + Alt + x, f, s | focusScene | | Ctrl + Alt + x, f, t | focusAddNodeToggle | +| Ctrl + Alt + x, f, w | focusWorldSelector | | Ctrl + Alt + x, f, x | focusCharacterColumnInput | | Ctrl + Alt + x, f, y | focusCharacterRowInput | -| Ctrl + Alt + x, f, w | focusWorldSelector | | Ctrl + Alt + x, t, 1 | changeToDefaultTheme | | Ctrl + Alt + x, t, 2 | changeToLightTheme | | Ctrl + Alt + x, t, 3 | changeToDarkTheme | | Ctrl + Alt + x, t, 4 | changeToGrayscaleTheme | | Ctrl + Alt + x, t, 5 | changeToHighContrastTheme | +| Ctrl + Alt + x, w, 1 | changeToSketchpadWorld | +| Ctrl + Alt + x, w, 2 | changeToJungleWorld | +| Ctrl + Alt + x, w, 3 | changeToSpaceWorld | +| Ctrl + Alt + x, w, 4 | changeToDeepOceanWorld | +| Ctrl + Alt + x, w, 5 | changeToLandmarksWorld | | Ctrl + Alt + x, x | toggleFeedbackAnnouncements | ## Alt (Apple: Option) Key Bindings @@ -86,12 +91,12 @@ with the starting key of a sequence. Those key bindings are as follows: | Alt + e | addCommandToEnd | | Alt + d | deleteCurrentStep | | Alt + i | announceScene | -| Alt + p | playPauseProgram | -| Alt + r | refreshScene | -| Alt + s | stopProgram | | < | decreaseProgramSpeed | | > | increaseProgramSpeed | +| Alt + p | playPauseProgram | +| Alt + r | refreshScene | | ? | showHide | +| Alt + s | stopProgram | | Alt + x, a, b, 1 | selectBackward1 | | Alt + x, a, b, 2 | selectBackward2 | | Alt + x, a, b, 3 | selectBackward3 | @@ -118,12 +123,17 @@ with the starting key of a sequence. Those key bindings are as follows: | Alt + x, f, q | focusProgramSequence | | Alt + x, f, s | focusScene | | Alt + x, f, t | focusAddNodeToggle | +| Alt + x, f, w | focusWorldSelector | | Alt + x, f, x | focusCharacterColumnInput | | Alt + x, f, y | focusCharacterRowInput | -| Alt + x, f, w | focusWorldSelector | | Alt + x, t, 1 | changeToDefaultTheme | | Alt + x, t, 2 | changeToLightTheme | | Alt + x, t, 3 | changeToDarkTheme | | Alt + x, t, 4 | changeToGrayscaleTheme | | Alt + x, t, 5 | changeToHighContrastTheme | +| Alt + x, w, 1 | changeToSketchpadWorld | +| Alt + x, w, 2 | changeToJungleWorld | +| Alt + x, w, 3 | changeToSpaceWorld | +| Alt + x, w, 4 | changeToDeepOceanWorld | +| Alt + x, w, 5 | changeToLandmarksWorld | | Alt + x, x | toggleFeedbackAnnouncements | diff --git a/package-lock.json b/package-lock.json index 144c2534..51efc71b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "c2lc-coding-environment", - "version": "1.2.0", + "version": "1.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 60afe7c8..ce0bdb8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "c2lc-coding-environment", - "version": "1.2.0", + "version": "1.3.0", "private": true, "dependencies": { "bootstrap": "4.6.1", diff --git a/src/App.js b/src/App.js index 8c653981..871f2acd 100644 --- a/src/App.js +++ b/src/App.js @@ -125,7 +125,7 @@ export class App extends React.Component { constructor(props: any) { super(props); - this.version = '1.2'; + this.version = '1.3'; this.appContext = { bluetoothApiIsAvailable: FeatureDetection.bluetoothApiIsAvailable() @@ -889,6 +889,21 @@ export class App extends React.Component { case("changeToHighContrastTheme"): this.setStateSettings({theme: "contrast"}); break; + case("changeToDeepOceanWorld"): + this.setStateSettings({ world: "DeepOcean"}); + break; + case("changeToJungleWorld"): + this.setStateSettings({ world: "Jungle"}); + break; + case("changeToLandmarksWorld"): + this.setStateSettings({ world: "Landmarks"}); + break; + case("changeToSketchpadWorld"): + this.setStateSettings({ world: "Sketchpad"}); + break; + case("changeToSpaceWorld"): + this.setStateSettings({ world: "Space"}); + break; default: break; } diff --git a/src/KeyboardInputSchemes.js b/src/KeyboardInputSchemes.js index 6baa10be..dd10f129 100644 --- a/src/KeyboardInputSchemes.js +++ b/src/KeyboardInputSchemes.js @@ -71,6 +71,13 @@ export type ActionName = | "changeToGrayscaleTheme" | "changeToHighContrastTheme" + // Change World + | "changeToDeepOceanWorld" + | "changeToJungleWorld" + | "changeToLandmarksWorld" + | "changeToSketchpadWorld" + | "changeToSpaceWorld" + // Update Program | "deleteAll" ; @@ -270,6 +277,30 @@ const ExtendedKeyboardSequences: KeyboardInputScheme = { } }, + changeWorld: { + keyDef: { code: "KeyW", key: "w" }, + sketchpad: { + keyDef: { key: "1"}, + actionName: "changeToSketchpadWorld" + }, + jungle: { + keyDef: { key: "2"}, + actionName: "changeToJungleWorld" + }, + space: { + keyDef: { key: "3"}, + actionName: "changeToSpaceWorld" + }, + deepOcean: { + keyDef: { key: "4"}, + actionName: "changeToDeepOceanWorld" + }, + landmarks: { + keyDef: { key: "5"}, + actionName: "changeToLandmarksWorld" + } + }, + deleteAll: { keyDef: { code: "KeyD", key: "d" }, actionName: "deleteAll"