diff --git a/media/dep.svg b/media/dep.svg
new file mode 100644
index 0000000..53e5be5
--- /dev/null
+++ b/media/dep.svg
@@ -0,0 +1,14 @@
+
+
diff --git a/package.json b/package.json
index 2c42823..4142136 100644
--- a/package.json
+++ b/package.json
@@ -47,10 +47,27 @@
"command": "mind-reader.selectTheme",
"title": "Select Theme"
},
+<<<<<<< HEAD
{
"command": "mind-reader.openWebview",
"title": "Mind Reader Webview"
+=======
+
+ {
+ "command": "mind-reader.runLineContext",
+ "title": "Run Line Context"
+ },
+
+ {
+ "command": "mind-reader.runCursorContext",
+ "title": "Run Cursor Context"
+ },
+ {
+ "command": "mind-reader.getIndent",
+ "title": "Get Line Indentation"
+>>>>>>> master
}
+
],
"keybindings": [
{
@@ -80,8 +97,86 @@
"command": "mind-reader.resetEditorScale",
"key": "shift+enter",
"mac": ""
- }
- ],
+ },
+
+ {
+ "command": "mind-reader.showAllSymbols",
+ "key": "Ctrl+T",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.gotoLine",
+ "key": "CTRL+G",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.quickOpen",
+ "key": "CTRL+P",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.gotoSymbol",
+ "key": "Ctrl+Shift+O",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.showProblems",
+ "key": "Ctrl+Shift+M",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.nextInFiles",
+ "key": "F8",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.prevInFiles",
+ "key": "Shift+F8",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.quickOpenPreviousRecentlyUsedEditorInGroup",
+ "key": "Ctrl+Tab",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.navigateBack",
+ "key": "Ctrl+Alt+-",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.getuickInputBack",
+ "key": "Ctrl+Alt+-",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.navigateForward",
+ "key": "Ctrl+Shift+-",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.selectTheme",
+ "key": "Ctrl+Shift+1",
+ "mac": ""
+ },
+
+ {
+ "command": "mind-reader.getIndent",
+ "key": "Shift+Tab",
+ "mac": ""
+ }
+ ],
"menus": {
"editor/context": [
{
@@ -154,7 +249,7 @@
"LEGO® Education SPIKE™ Prime Set (45678)"
]
},
- "mindreader.screenReader": {
+ "mindreader.reader.screenReader": {
"type": "string",
"description": "Specifies which screen reader to optimize for.",
"default": "NVDA",
@@ -169,6 +264,11 @@
"Apple VoiceOver (macOS)"
]
},
+ "mindreader.reader.contextWindow": {
+ "type": "number",
+ "description": "The number of words around the cursor to use when reading the cursor context",
+ "default": 1
+ },
"mindreader.connection.connectAutomatically": {
"type": "boolean",
"description": "Specifies whether to try to automatically detect and communicate with a connected Hub.",
@@ -179,7 +279,26 @@
"markdownDescription": "Specifies the serial port path to use if `#mindreader.connectAutomatically#` is not set."
}
}
- }
+ },
+ "views": {
+ "accessActions": [
+ {
+ "id": "accessActions",
+ "name": "Access Actions",
+ "icon": "media/dep.svg",
+ "contextualTitle": "Accessibility Menu Actions"
+ }
+ ]
+ },
+ "viewsContainers": {
+ "activitybar": [
+ {
+ "id": "accessActions",
+ "title": "Access Actions",
+ "icon": "media/dep.svg"
+ }
+ ]
+ }
},
"scripts": {
"vscode:prepublish": "npm run compile",
diff --git a/src/accessNodeProvider.ts b/src/accessNodeProvider.ts
new file mode 100644
index 0000000..9b0db83
--- /dev/null
+++ b/src/accessNodeProvider.ts
@@ -0,0 +1,47 @@
+import * as vscode from 'vscode';
+
+// list of all actions
+let actions: AccessAction[] = [];
+
+class AccessAction extends vscode.TreeItem {
+ constructor(
+ public readonly label: string,
+ public readonly command: vscode.Command
+ ) {
+ super(label, vscode.TreeItemCollapsibleState.None);
+ }
+};
+
+export default class AccessNodeProvider implements vscode.TreeDataProvider {
+ public getTreeItem(a: AccessAction): vscode.TreeItem {
+ return a;
+ }
+
+ public async getChildren(): Promise {
+ if (actions.length === 0) {
+ // fetch and cache mind-reader options
+ let cmds: string[] = await vscode.commands.getCommands(true); // get non-builtin commands
+ cmds = cmds.filter(x => x.startsWith('mind-reader')); // filter mind-reader commands
+
+ cmds.forEach(c => {
+ let humanReadable = c.replace(/^mind-reader\./, ''); // strip extensions name
+
+ // Convert camelCaseText to Title Case Text
+ humanReadable = humanReadable.replace(/([A-Z])/g, ' $1');
+ humanReadable = humanReadable.charAt(0).toUpperCase() + humanReadable.slice(1);
+
+ // add item to actions
+ actions.push(new AccessAction(
+ humanReadable,
+ {
+ title: humanReadable,
+ command: c,
+ tooltip: humanReadable
+ }
+ ));
+ });
+ }
+
+ return Promise.resolve(actions);
+ }
+}
diff --git a/src/commands.ts b/src/commands.ts
index 7b77b4c..fa58fd6 100644
--- a/src/commands.ts
+++ b/src/commands.ts
@@ -1,4 +1,5 @@
import * as vscode from 'vscode';
+import * as pl from './pylex';
/**
* @type {Object} Command // Command to register with the VS Code Extension API
@@ -52,6 +53,79 @@ const commands: Command[] = [
{
name: 'mind-reader.openWebview',
callback: openWebview,
+ },
+
+ //Navigation Keys......
+ {
+ name: 'mind-reader.showAllSymbols',
+ callback: () => vscode.commands.executeCommand('workbench.action.showAllSymbols'),
+ },
+
+ {
+ name: 'mind-reader.gotoLine',
+ callback: () => vscode.commands.executeCommand('workbench.action.gotoLine'),
+ },
+
+ {
+ name: 'mind-reader.quickOpen',
+ callback: () => vscode.commands.executeCommand('workbench.action.quickOpen'),
+ },
+
+ {
+ name: 'mind-reader.gotoSymbol',
+ callback: () => vscode.commands.executeCommand('workbench.action.gotoSymbol'),
+ },
+
+ {
+ name: 'mind-reader.showProblems',
+ callback: () => vscode.commands.executeCommand('workbench.actions.view.problems'),
+ },
+
+ {
+ name: 'mind-reader.nextInFiles',
+ callback: () => vscode.commands.executeCommand('editor.action.marker.nextInFiles'),
+ },
+
+ {
+ name: 'mind-reader.prevInFiles',
+ callback: () => vscode.commands.executeCommand('editor.action.marker.prevInFiles'),
+ },
+
+ {
+ name: 'mind-reader.showCommands',
+ callback: () => vscode.commands.executeCommand('workbench.action.showCommands'),
+ },
+
+ {
+ name: 'mind-reader.quickOpenPreviousRecentlyUsedEditorInGroup',
+ callback: () => vscode.commands.executeCommand('workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup'),
+ },
+
+ {
+ name: 'mind-reader.navigateBack',
+ callback: () => vscode.commands.executeCommand('workbench.action.navigateBack'),
+ },
+
+ {
+ name: 'mind-reader.getuickInputBack',
+ callback: () => vscode.commands.executeCommand('workbench.action.quickInputBack'),
+ },
+
+ {
+ name: 'mind-reader.navigateForward',
+ callback: () => vscode.commands.executeCommand('workbench.action.navigateForward'),
+ },
+ {
+ name: 'mind-reader.runLineContext',
+ callback: runLineContext,
+ },
+ {
+ name: 'mind-reader.runCursorContext',
+ callback: runCursorContext
+ },
+ {
+ name: 'mind-reader.getIndent',
+ callback: getIndent
}
];
@@ -122,4 +196,150 @@ function getWebviewContent() {