diff --git a/README.md b/README.md
index e5cecc5..874a6ff 100644
--- a/README.md
+++ b/README.md
@@ -1,35 +1,69 @@
-# Mind_Reader
-The current editor options available lack the level of accessibility that is
-required to allow students who are visually impaired to adequately edit, write,
-and debug code. This tool would extend Visual Studio Code’s existing
-accessibility options to allow everyone, primarily students K-12, to learn
-programming with Lego Mindstorms. Our goal is to provide an enhanced experience
-for students who are visually impaired that is transparent to sighted students.
-This allows for everyone to use the same software solution, whether or not they
-are vision impaired.
+
+
+
+
+Mind_Reader
+
+
+
+The current editor options available lack the level of accessibility that is
+required to allow people who are visually impaired to adequately write, edit,
+and debug code.
+
+This tool extends Visual Studio Code’s existing
+accessibility options to enable people with a visual impairment to learn
+Python programming with LEGO Mindstorms. Our goal is to:
+
+- provide an accessible experience to people with a visual impairment
+
+- **not** change the editing workflow for people without a visual impairment
+
+## Major Features
+
+- Compatibility with major screen readers:
+
+ - [NVDA](https://www.nvaccess.org/)
+ - [JAWS](https://www.freedomscientific.com/products/software/jaws/)
+ - [Apple VoiceOver](https://support.apple.com/guide/voiceover-guide/welcome/web/)
+
+
+- Play audio alerts for syntax and runtime errors.
+
+- Present a summary of the scope for an individual line of code.
+
+- Save and load programs directly onto the LEGO Hub from within Visual Studio Code
+
+# For Developers
## Dependencies
+
+
- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/en/)
-See ["Your First
-Extension"](https://code.visualstudio.com/api/get-started/your-first-extension)
-API page if you need more help.
-
-## Cloning & Setup
+## Development Quick Start
Use the following to set up the extension for development.
- git clone https://github.com/SingleSemesterSnobs/Mind_Reader.git
- cd Mind_Reader
- npm install
+```console
+$ git clone https://github.com/SingleSemesterSnobs/Mind_Reader.git
+$ cd Mind_Reader
+$ npm install
+```
While inside the repository do
- code .
+```console
+$ code .
+```
to open the cloned repository in VS Code.
Then, use "Run > Start Debugging" on the menu bar to start the [Extension
Development Host](https://code.visualstudio.com/api/advanced-topics/extension-host)
(F5 by default).
+
+---
+
+See the Visual Studio Code [getting started](https://code.visualstudio.com/api/get-started/your-first-extension)
+API page if you need more help.
diff --git a/media/html/mackeys.html b/media/html/mackeys.html
new file mode 100644
index 0000000..5f4cd71
--- /dev/null
+++ b/media/html/mackeys.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+ Mind Reader Key Bindings for Mac
+
+
+ Here is a list of all the Mind Reader commands and their keybindings on Mac systems
+
+
Editor Settings
+ Increase Font Scale -
+ Decrease Font Scale -
+ Increase Editor Scale -
+ Decrease Editor Scale -
+ Reset Editor Scale -
+ Select Theme -
+ Navigation
+ Get Indent -
+ Show All Symbols -
+ Go To Line -
+ Quick Open -
+ Go To Symbol -
+ Show Problems -
+ Next In File -
+ Previous In File -
+ Open Previous Editor Group -
+ Navigate Forward -
+ Navigate Back -
+ Get Quick Input Back -
+
+
+
diff --git a/media/html/main.html b/media/html/main.html
new file mode 100644
index 0000000..afd1508
--- /dev/null
+++ b/media/html/main.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+ Mind Reader
+
+
+
+
+ Welcome to Mind_Reader!
+ We are the Single Semester Snobs and this is our tool to Help Blind Students Program Lego Mindstorms Robots in Python.
+
+ -
+ This tool includes features such as a hotkey that says how many spaces in the text starts, an Accessibility Pane,
+ Audio Alerts, and an advanced settings window.
+
+ The tool has hotkeys for both PC and Mac commands.
+
+ - This system is intended for everyone, but primarily for students K-12 who are visually impaired.
+ -
+ Our goal is to provide an enhanced experience for students who are visually impaired that is transparent to
+ sighted students.
+
+ This allows for everyone to use the same software solution, whether or not they are
+ vision impaired.
+
+
+ Use the following key binding to bring up a page for all key bindings for windows
+
+ Control and Shift and 8
+
+ Use this key binding to do the same for mac computers:
+
+ Command and Shift and 9
+
+ This is the Lego Spike Prime!
+
+
+
+ Get the robot!
+
+
diff --git a/media/html/winkeys.html b/media/html/winkeys.html
new file mode 100644
index 0000000..fd89cfa
--- /dev/null
+++ b/media/html/winkeys.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+ Mind Reader Key Bindings for Windows
+
+
+ Here is a list of all Mind Reader's commands and their keybindings on windows and linux systems
+
+
Editor Settings
+ Increase Font Scale - Number Pad Add
+ Decrease Font Scale - Number Pad Subtract
+ Increase Editor Scale - Shift and Number Pad Add
+ Decrease Editor Scale - Shift and Number Pad Subtract
+ Reset Editor Scale - Shift and Enter
+ Select Theme - Control and Shift and 1
+ Navigation
+ Get Indent - Shift and Tab
+ Show All Symbols - Control and T
+ Go To Line - Control and G
+ Quick Open - Control and P
+ Go To Symbol - Control and Shift and 0
+ Show Problems - Control and Shift and M
+ Next In File - F8
+ Previous In File - Shift and F8
+ Open Previous Editor Group - Control and Tab
+ Navigate Forward - Control and Shift and Minus
+ Navigate Back - Control and Alt and Minus
+ Get Quick Input Back - Control and Alt and Minus
+
+
+
diff --git a/media/logo.png b/media/logo.png
new file mode 100644
index 0000000..63fa136
Binary files /dev/null and b/media/logo.png differ
diff --git a/package-lock.json b/package-lock.json
index 808706b..6d72d07 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,13 +13,13 @@
"devDependencies": {
"@types/glob": "^7.1.3",
"@types/mocha": "^8.2.2",
- "@types/node": "14.x",
+ "@types/node": "16.x",
"@types/serialport": "^8.0.2",
"@types/vscode": "^1.60.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"@vscode/test-electron": "^1.6.2",
- "electron": "^13.5.2",
+ "electron": "^16.0.3",
"electron-rebuild": "^3.2.5",
"eslint": "^7.27.0",
"glob": "^7.1.7",
@@ -1600,13 +1600,13 @@
"dev": true
},
"node_modules/electron": {
- "version": "13.5.2",
- "resolved": "https://registry.npmjs.org/electron/-/electron-13.5.2.tgz",
- "integrity": "sha512-CPakwDpy5m8dL0383F5uJboQcVtn9bT/+6/wdDKo8LuTUO9aER1TF41v7feZgZW2c+UwoGPWa814ElSQ3qta2A==",
+ "version": "16.0.3",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-16.0.3.tgz",
+ "integrity": "sha512-MzCYuEqrvyEtPSUWQwr88xWBrsbhmyOKp4wqP9WfAJTEDeUfBcrQYswHuYe17Gi00gRirQb9htoC/anYfaw20w==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
- "@electron/get": "^1.0.1",
+ "@electron/get": "^1.13.0",
"@types/node": "^14.6.2",
"extract-zip": "^1.0.3"
},
@@ -6329,12 +6329,12 @@
"dev": true
},
"electron": {
- "version": "13.5.2",
- "resolved": "https://registry.npmjs.org/electron/-/electron-13.5.2.tgz",
- "integrity": "sha512-CPakwDpy5m8dL0383F5uJboQcVtn9bT/+6/wdDKo8LuTUO9aER1TF41v7feZgZW2c+UwoGPWa814ElSQ3qta2A==",
+ "version": "16.0.3",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-16.0.3.tgz",
+ "integrity": "sha512-MzCYuEqrvyEtPSUWQwr88xWBrsbhmyOKp4wqP9WfAJTEDeUfBcrQYswHuYe17Gi00gRirQb9htoC/anYfaw20w==",
"dev": true,
"requires": {
- "@electron/get": "^1.0.1",
+ "@electron/get": "^1.13.0",
"@types/node": "^14.6.2",
"extract-zip": "^1.0.3"
},
diff --git a/package.json b/package.json
index 42e4003..61154ed 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,7 @@
{
"name": "mind-reader",
"displayName": "Mind_Reader",
+ "repository": "https://github.com/SingleSemesterSnobs/Mind_Reader",
"description": "",
"version": "0.0.1",
"engines": {
@@ -47,6 +48,18 @@
"command": "mind-reader.selectTheme",
"title": "Select Theme"
},
+ {
+ "command": "mind-reader.openWebview",
+ "title": "Mind Reader Webview"
+ },
+ {
+ "command": "mind-reader.openKeyBindWin",
+ "title": "Key Bindings for Windows"
+ },
+ {
+ "command": "mind-reader.openKeyBindMac",
+ "title": "Key Bindings for Mac"
+ },
{
"command": "mind-reader.runLineContext",
"title": "Run Line Context"
@@ -55,147 +68,137 @@
"command": "mind-reader.runCursorContext",
"title": "Run Cursor Context"
},
-
{
"command": "mind-reader.getIndent",
"title": "Get Line Indentation"
},
-
{
- "command": "mind-reader.connectHub",
- "title": "Connect LEGO Hub"
+ "command": "mind-reader.connectHub",
+ "title": "Connect LEGO Hub"
},
-
{
- "command": "mind-reader.disconnectHub",
- "title": "Disconnect LEGO Hub"
+ "command": "mind-reader.disconnectHub",
+ "title": "Disconnect LEGO Hub"
},
-
{
- "command": "mind-reader.uploadCurrentFile",
- "title": "Upload current file to LEGO Hub"
+ "command": "mind-reader.uploadCurrentFile",
+ "title": "Upload current file to LEGO Hub"
},
-
{
"command": "mind-reader.runProgram",
"title": "Run a program from the LEGO Hub"
},
-
{
- "command": "mind-reader.stopExecution",
- "title": "Stop running program on the LEGO Hub"
+ "command": "mind-reader.stopExecution",
+ "title": "Stop running program on the LEGO Hub"
},
-
-
{
- "command": "mind-reader.deleteProgram",
- "title": "Delete a program from the LEGO Hub"
+ "command": "mind-reader.deleteProgram",
+ "title": "Delete a program from the LEGO Hub"
}
],
"keybindings": [
{
"command": "mind-reader.decreaseFontScale",
"key": "numpad_subtract",
- "mac": ""
+ "mac": "d"
},
{
"command": "mind-reader.increaseFontScale",
"key": "numpad_add",
- "mac": ""
+ "mac": "[NumpadAdd]"
},
{
"command": "mind-reader.increaseEditorScale",
- "key": "shift+numpad_add"
+ "key": "shift+numpad_add",
+ "mac": "Shift+[NumpadAdd]"
},
{
"command": "mind-reader.decreaseEditorScale",
"key": "shift+numpad_subtract",
- "mac": ""
+ "mac": "Shift+[NumpadSubtract]"
},
{
"command": "mind-reader.resetEditorScale",
"key": "shift+enter",
- "mac": ""
+ "mac": "Shift+[Enter]"
},
-
{
"command": "mind-reader.showAllSymbols",
"key": "Ctrl+T",
- "mac": ""
+ "mac": "Cmd+[KeyT]"
},
-
{
"command": "mind-reader.gotoLine",
"key": "CTRL+G",
- "mac": ""
+ "mac": "Cmd+[KeyG]"
},
-
{
"command": "mind-reader.quickOpen",
"key": "CTRL+P",
- "mac": ""
- },
-
+ "mac": "Cmd+[KeyP]"
+ },
{
"command": "mind-reader.gotoSymbol",
"key": "Ctrl+Shift+O",
- "mac": ""
+ "mac": "Cmd+Shift+[KeyO]"
},
-
{
"command": "mind-reader.showProblems",
"key": "Ctrl+Shift+M",
- "mac": ""
+ "mac": "Cmd+Shift+[KeyM]"
},
-
{
"command": "mind-reader.nextInFiles",
"key": "F8",
- "mac": ""
+ "mac": "[F8]"
},
-
{
"command": "mind-reader.prevInFiles",
"key": "Shift+F8",
- "mac": ""
+ "mac": "Shift+[F8]"
},
-
{
"command": "mind-reader.quickOpenPreviousRecentlyUsedEditorInGroup",
"key": "Ctrl+Tab",
- "mac": ""
+ "mac": "Cmd+[Tab]"
},
-
{
"command": "mind-reader.navigateBack",
"key": "Ctrl+Alt+-",
- "mac": ""
+ "mac": "Cmd+Alt+[Minus]"
},
-
{
"command": "mind-reader.getQuickInputBack",
"key": "Ctrl+Alt+-",
- "mac": ""
+ "mac": "Cmd+Alt+[Minus]"
},
-
{
"command": "mind-reader.navigateForward",
"key": "Ctrl+Shift+-",
- "mac": ""
+ "mac": "Cmd+Shift+[Minus]"
},
-
{
"command": "mind-reader.selectTheme",
"key": "Ctrl+Shift+1",
- "mac": ""
+ "mac": "Cmd+Shift+[Digit1]"
},
-
{
"command": "mind-reader.getIndent",
"key": "Shift+Tab",
- "mac": ""
+ "mac": "Shift+[Tab]"
+ },
+ {
+ "command": "mind-reader.openKeyBindWin",
+ "key": "Ctrl+Shift+8",
+ "mac": "Cmd+Shift+8"
+ },
+ {
+ "command": "mind-reader.openKeyBindMac",
+ "key": "Ctrl+Shift+9",
+ "mac": "Cmd+Shift+9"
}
- ],
+ ],
"menus": {
"editor/context": [
{
@@ -238,6 +241,21 @@
"command": "mind-reader.selectTheme",
"group": "mind-reader",
"when": "activeEditor"
+ },
+ {
+ "command": "mind-reader.openWebview",
+ "group": "mind-reader",
+ "when": "activeEditor"
+ },
+ {
+ "command": "mind-reader.openKeyBindWin",
+ "group": "mind-reader",
+ "when": "activeEditor"
+ },
+ {
+ "command": "mind-reader.openKeyBindMac",
+ "group": "mind-reader",
+ "when": "activeEditor"
}
]
},
@@ -292,11 +310,11 @@
"type": "string",
"markdownDescription": "Specifies the serial port path to use if `#mindreader.connectAutomatically#` is not set."
},
- "mindreader.connection.clearOutputOnRun": {
- "type": "boolean",
- "description": "Whether to clear the output each time the program is run",
- "default": "true"
- }
+ "mindreader.connection.clearOutputOnRun": {
+ "type": "boolean",
+ "description": "Whether to clear the output each time the program is run",
+ "default": "true"
+ }
}
},
"views": {
@@ -308,10 +326,10 @@
"contextualTitle": "Accessibility Menu Actions"
},
{
- "id": "hubActions",
- "name": "Hub Actions",
- "icon": "media/dep.svg",
- "contextualTitle": "Hub Connection Actions"
+ "id": "hubActions",
+ "name": "Hub Actions",
+ "icon": "media/dep.svg",
+ "contextualTitle": "Hub Connection Actions"
}
]
},
@@ -342,8 +360,6 @@
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"@vscode/test-electron": "^1.6.2",
- "electron": "^13.5.2",
- "electron-rebuild": "^3.2.5",
"eslint": "^7.27.0",
"glob": "^7.1.7",
"mocha": "^8.4.0",
diff --git a/src/commands.ts b/src/commands.ts
index b75a562..d7d9c4e 100644
--- a/src/commands.ts
+++ b/src/commands.ts
@@ -1,6 +1,7 @@
import * as vscode from 'vscode';
import * as pl from './pylex';
import * as path from 'path';
+import * as fs from 'fs';
import HubManager from './hubManager';
@@ -60,6 +61,20 @@ export const accessCommands: CommandEntry[] = [
];
export const navCommands: CommandEntry[] = [
+ {
+ name: 'mind-reader.openWebview',
+ callback: openWebview,
+ },
+
+ {
+ name: 'mind-reader.openKeyBindWin',
+ callback: () => openKeyBindWin('Windows')
+ },
+ {
+ name: 'mind-reader.openKeyBindMac',
+ callback: () => openKeyBindWin('Mac'),
+ },
+
//Navigation Keys......
{
name: 'mind-reader.showAllSymbols',
@@ -189,6 +204,38 @@ function resetEditorScale(): void {
vscode.commands.executeCommand('workbench.action.zoomReset');
}
+function openWebview(): void {
+ //vscode.commands.executeCommand('workbench.action.zoomOut');
+ const panel = vscode.window.createWebviewPanel(
+ 'mindReader', // Identifies the type of the webview. Used internally
+ 'Mind Reader', // Title of the panel displayed to the user
+ vscode.ViewColumn.One, // Editor column to show the new webview panel in.
+ {}
+ ); // Webview options. More on these later.
+
+ panel.webview.html = getWebviewContent('media/html/main.html');
+}
+
+function getWebviewContent(filepath: string) {
+ return fs.readFileSync(filepath, {encoding: 'utf-8'});
+}
+
+function openKeyBindWin(os: 'Mac' | 'Windows'): void {
+ //vscode.commands.executeCommand('workbench.action.zoomOut');
+ const panel = vscode.window.createWebviewPanel(
+ 'mindReader', // Identifies the type of the webview. Used internally
+ 'MR Key Bindings', // Title of the panel displayed to the user
+ vscode.ViewColumn.One, // Editor column to show the new webview panel in.
+ {}
+ ); // Webview options. More on these later.
+
+ if (os === 'Windows') {
+ panel.webview.html = getWebviewContent('media/html/winkeys.html');
+ } else if (os === 'Mac') {
+ panel.webview.html = getWebviewContent('media/html/mackeys.html');
+ }
+}
+
function getIndent(): void {
let editor = vscode.window.activeTextEditor;
if(editor)