package.json:

- Add titles for all mind-reader commands
- Remove redundant keybindings
- Redefine keybindings to no longer conflict with *VSCode*, JAWS, NVDA
This commit is contained in:
John 2022-04-09 18:01:52 -05:00
parent cf0900968f
commit bcfeb5a6fe
2 changed files with 99 additions and 119 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "mind-reader", "name": "mind-reader",
"displayName": "Mind_Reader", "displayName": "Mind_Reader",
"repository": "https://github.com/SingleSemesterSnobs/Mind_Reader", "repository": "https://github.com/We-Dont-Byte/Mind_Reader",
"version": "1.0.0", "version": "1.0.0",
"engines": { "engines": {
"vscode": "^1.60.0" "vscode": "^1.60.0"
@ -52,20 +52,16 @@
"title": "Mind Reader Webview" "title": "Mind Reader Webview"
}, },
{ {
"command": "mind-reader.openKeyBindWin", "command": "mind-reader.openKeybinds",
"title": "Key Bindings for Windows" "title": "Mind_Reader Keybinds"
},
{
"command": "mind-reader.openKeyBindMac",
"title": "Key Bindings for Mac"
}, },
{ {
"command": "mind-reader.runLineContext", "command": "mind-reader.runLineContext",
"title": "Run Line Context" "title": "Get the Context of the Current Line"
}, },
{ {
"command": "mind-reader.runCursorContext", "command": "mind-reader.runCursorContext",
"title": "Run Cursor Context" "title": "Get the Context of Text Under Cursor"
}, },
{ {
"command": "mind-reader.getIndent", "command": "mind-reader.getIndent",
@ -81,121 +77,128 @@
}, },
{ {
"command": "mind-reader.uploadCurrentFile", "command": "mind-reader.uploadCurrentFile",
"title": "Upload current file to LEGO Hub" "title": "Upload Current File to LEGO Hub"
}, },
{ {
"command": "mind-reader.runProgram", "command": "mind-reader.runProgram",
"title": "Run a program from the LEGO Hub" "title": "Run a Program from the LEGO Hub"
}, },
{ {
"command": "mind-reader.stopExecution", "command": "mind-reader.stopExecution",
"title": "Stop running program on the LEGO Hub" "title": "Stop Running Program on the LEGO Hub"
}, },
{ {
"command": "mind-reader.deleteProgram", "command": "mind-reader.deleteProgram",
"title": "Delete a program from the LEGO Hub" "title": "Delete a Program from the LEGO Hub"
},
{
"command": "mind-reader.uploadCurrentFile",
"title": "Hub: Upload Current File"
},
{
"command": "mind-reader.getLeadingSpaces",
"title": "Get Leading Spaces"
},
{
"command": "mind-reader.getLineNumber",
"title": "Get Line Number"
},
{
"command": "mind-reader.getQuickInputBack",
"title": "Go Back in Quick Input"
},
{
"command": "mind-reader.gotoLine",
"title": "Go to Line"
},
{
"command": "mind-reader.gotoSymbol",
"title": "Go to Symbol"
},
{
"command": "mind-reader.navigateBack",
"title": "Navigate Backward"
},
{
"command": "mind-reader.navigateForward",
"title": "Navigate Forward"
},
{
"command": "mind-reader.nextInFiles",
"title": "Go to Next Problem in Files (Error, Warning, Info)"
},
{
"command": "mind-reader.prevInFiles",
"title": "Go to Previous Problem in Files (Error, Warning, Info)"
},
{
"command": "mind-reader.quickOpen",
"title": "Go to File..."
},
{
"command": "mind-reader.quickOpenPreviousRecentlyUsedEditorInGroup",
"title": "View: Quick Open Previous Recently Used Editor in Group"
},
{
"command": "mind-reader.showAllSymbols",
"title": "Go to Symbol in Workspace..."
},
{
"command": "mind-reader.showProblems",
"title": "Show Problems"
} }
], ],
"keybindings": [ "keybindings": [
{ {
"command": "mind-reader.decreaseFontScale", "command": "editor.action.fontZoomOut",
"key": "numpad_subtract", "key": "numpad_subtract",
"mac": "d" "mac": "d",
"when": "editorTextFocus && config.mindReader.reader.screenReader != JAWS"
}, },
{ {
"command": "mind-reader.increaseFontScale", "command": "editor.action.fontZoomIn",
"key": "numpad_add", "key": "numpad_add",
"mac": "[NumpadAdd]" "mac": "[NumpadAdd]",
"when": "editorTextFocus && config.mindReader.reader.screenReader != JAWS"
}, },
{ {
"command": "mind-reader.increaseEditorScale", "command": "editor.action.fontZoomReset",
"key": "numpad_add",
"mac": "[NumpadAdd]",
"when": "editorTextFocus"
},
{
"command": "workbench.action.zoomIn",
"key": "shift+numpad_add", "key": "shift+numpad_add",
"mac": "Shift+[NumpadAdd]" "mac": "Shift+[NumpadAdd]",
"when": "config.mindReader.reader.screenReader != JAWS"
}, },
{ {
"command": "mind-reader.decreaseEditorScale", "command": "workbench.action.zoomOut",
"key": "shift+numpad_subtract", "key": "shift+numpad_subtract",
"mac": "Shift+[NumpadSubtract]" "mac": "Shift+[NumpadSubtract]"
}, },
{ {
"command": "mind-reader.resetEditorScale", "command": "workbench.action.zoomReset",
"key": "shift+enter", "key": "shift+enter",
"mac": "Shift+[Enter]" "mac": "Shift+[Enter]"
}, },
{
"command": "mind-reader.showAllSymbols",
"key": "Ctrl+T",
"mac": "Cmd+[KeyT]"
},
{
"command": "mind-reader.gotoLine",
"key": "CTRL+G",
"mac": "Cmd+[KeyG]"
},
{
"command": "mind-reader.quickOpen",
"key": "CTRL+P",
"mac": "Cmd+[KeyP]"
},
{
"command": "mind-reader.gotoSymbol",
"key": "Ctrl+Shift+O",
"mac": "Cmd+Shift+[KeyO]"
},
{
"command": "mind-reader.showProblems",
"key": "Ctrl+Shift+M",
"mac": "Cmd+Shift+[KeyM]"
},
{
"command": "mind-reader.nextInFiles",
"key": "F8",
"mac": "[F8]"
},
{
"command": "mind-reader.prevInFiles",
"key": "Shift+F8",
"mac": "Shift+[F8]"
},
{
"command": "mind-reader.quickOpenPreviousRecentlyUsedEditorInGroup",
"key": "Ctrl+Tab",
"mac": "Cmd+[Tab]"
},
{
"command": "mind-reader.navigateBack",
"key": "Ctrl+Alt+-",
"mac": "Cmd+Alt+[Minus]"
},
{
"command": "mind-reader.getQuickInputBack",
"key": "Ctrl+Alt+-",
"mac": "Cmd+Alt+[Minus]"
},
{
"command": "mind-reader.navigateForward",
"key": "Ctrl+Shift+-",
"mac": "Cmd+Shift+[Minus]"
},
{
"command": "mind-reader.selectTheme",
"key": "Ctrl+Shift+1",
"mac": "Cmd+Shift+[Digit1]"
},
{ {
"command": "mind-reader.getIndent", "command": "mind-reader.getIndent",
"key": "Shift+Tab", "key": "Ctrl+Shift+/ I",
"mac": "Shift+[Tab]" "mac": "Cmd+Shift+[Slash] I",
"when": "activeEditor"
}, },
{ {
"command": "mind-reader.openKeyBindWin", "command": "mind-reader.getLeadingSpaces",
"key": "Ctrl+Shift+8", "key": "Ctrl+Shift+/ S",
"mac": "Cmd+Shift+8" "mac": "Cmd+Shift+[Slash] S",
"when": "activeEditor"
}, },
{ {
"command": "mind-reader.openKeyBindMac", "command": "mind-reader.openKeybinds",
"key": "Ctrl+Shift+9", "key": "Ctrl+Shift+/ K",
"mac": "Cmd+Shift+9" "mac": "Cmd+Shift+[Slash] K"
} }
], ],
"menus": { "menus": {
@ -247,12 +250,7 @@
"when": "activeEditor" "when": "activeEditor"
}, },
{ {
"command": "mind-reader.openKeyBindWin", "command": "mind-reader.openKeybinds",
"group": "mind-reader",
"when": "activeEditor"
},
{
"command": "mind-reader.openKeyBindMac",
"group": "mind-reader", "group": "mind-reader",
"when": "activeEditor" "when": "activeEditor"
} }
@ -270,7 +268,7 @@
"mindReader.productType": { "mindReader.productType": {
"type": "string", "type": "string",
"description": "Specifies the LEGO® product.", "description": "Specifies the LEGO® product.",
"default": "MINDSTORMS EV3", "default": "SPIKE Prime",
"enum": [ "enum": [
"MINDSTORMS EV3", "MINDSTORMS EV3",
"SPIKE Prime" "SPIKE Prime"
@ -285,11 +283,13 @@
"description": "Specifies which screen reader to optimize for.", "description": "Specifies which screen reader to optimize for.",
"default": "NVDA", "default": "NVDA",
"enum": [ "enum": [
"JAWS",
"NVDA", "NVDA",
"Orca", "Orca",
"VoiceOver" "VoiceOver"
], ],
"enumDescriptions": [ "enumDescriptions": [
"Job Access With Speech (Windows)",
"NonVisual Desktop Access (Windows)", "NonVisual Desktop Access (Windows)",
"Orca (Linux)", "Orca (Linux)",
"Apple VoiceOver (macOS)" "Apple VoiceOver (macOS)"

View File

@ -8,17 +8,13 @@ export const navCommands: CommandEntry[] = [
name: 'mind-reader.openWebview', name: 'mind-reader.openWebview',
callback: openWebview, callback: openWebview,
}, },
{ {
name: 'mind-reader.openKeyBindWin', name: "mind-reader.openKeybinds",
callback: () => openKeyBindWin('Windows') callback: () => vscode.commands.executeCommand("workbench.action.openGlobalKeybindings", "mind-reader"),
},
{
name: 'mind-reader.openKeyBindMac',
callback: () => openKeyBindWin('Mac'),
}, },
//Navigation Keys...... //Navigation Keys......
// TODO: Why is this here? Extensions can rebind existing keybinds.
{ {
name: 'mind-reader.showAllSymbols', name: 'mind-reader.showAllSymbols',
callback: () => vscode.commands.executeCommand('workbench.action.showAllSymbols'), callback: () => vscode.commands.executeCommand('workbench.action.showAllSymbols'),
@ -97,20 +93,4 @@ function getWebviewContent(filepath: string) {
return fs.readFileSync(filepath, {encoding: 'utf-8'}); 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');
}
}