mirror of
https://github.com/We-Dont-Byte/Mind_Reader.git
synced 2024-11-15 03:35:59 +00:00
Merge branch 'master' into hub-communication
This commit is contained in:
commit
9d41e5c9be
70
README.md
70
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.
|
||||
<!-- header with logo -->
|
||||
<p align="center">
|
||||
<img alt="Mind Reader Logo" src="./media/logo.png"></img>
|
||||
</p>
|
||||
|
||||
<h1>Mind_Reader</h1>
|
||||
|
||||
<!-- overview description -->
|
||||
|
||||
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/)
|
||||
|
||||
<!-- TODO: still need this -->
|
||||
- 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
|
||||
<!-- TODO: version information -->
|
||||
<!-- TODO: how to support native-usb functionality? -->
|
||||
- [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)
|
||||
(<kbd>F5</kbd> 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.
|
||||
|
33
media/html/mackeys.html
Normal file
33
media/html/mackeys.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mind Reader Key Bindings for Mac</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2> Here is a list of all the Mind Reader commands and their keybindings on Mac systems </h2>
|
||||
<p>
|
||||
<h2> Editor Settings </h2>
|
||||
Increase Font Scale - <br>
|
||||
Decrease Font Scale - <br>
|
||||
Increase Editor Scale - <br>
|
||||
Decrease Editor Scale - <br>
|
||||
Reset Editor Scale - <br>
|
||||
Select Theme - <br>
|
||||
<h2>Navigation</h2>
|
||||
Get Indent - <br>
|
||||
Show All Symbols - <br>
|
||||
Go To Line - <br>
|
||||
Quick Open - <br>
|
||||
Go To Symbol - <br>
|
||||
Show Problems - <br>
|
||||
Next In File - <br>
|
||||
Previous In File - <br>
|
||||
Open Previous Editor Group - <br>
|
||||
Navigate Forward - <br>
|
||||
Navigate Back - <br>
|
||||
Get Quick Input Back -
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
43
media/html/main.html
Normal file
43
media/html/main.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mind Reader</title>
|
||||
</head>
|
||||
<body>
|
||||
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT6a4XaqHkKcxJ6ZFms1RNrRurcOfl-diW90DAdpAx0Kv-rtrLJXovIhcUpayqFHATkrQ&usqp=CAU" width="600" />
|
||||
<p></p>
|
||||
<h1>Welcome to Mind_Reader!</h1>
|
||||
<p>We are the Single Semester Snobs and this is our tool to Help Blind Students Program Lego Mindstorms Robots in Python.</p>
|
||||
<ul>
|
||||
<li>
|
||||
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.
|
||||
<br>
|
||||
The tool has hotkeys for both PC and Mac commands.
|
||||
</li>
|
||||
<li>This system is intended for everyone, but primarily for students K-12 who are visually impaired. </li>
|
||||
<li>
|
||||
Our goal is to provide an enhanced experience for students who are visually impaired that is transparent to
|
||||
sighted students.
|
||||
<br>
|
||||
This allows for everyone to use the same software solution, whether or not they are
|
||||
vision impaired.
|
||||
</li>
|
||||
</ul>
|
||||
<p>Use the following key binding to bring up a page for all key bindings for windows
|
||||
<br>
|
||||
Control and Shift and 8
|
||||
</p>
|
||||
<p>Use this key binding to do the same for mac computers:
|
||||
<br>
|
||||
Command and Shift and 9
|
||||
</p>
|
||||
<h2>This is the Lego Spike Prime!</h2z>
|
||||
<p></p>
|
||||
<img src="https://cdn.vox-cdn.com/thumbor/qoaa6N2ppl7oj97MR-aj43qPy0w=/0x0:1024x576/920x613/filters:focal(431x207:593x369):format(webp)/cdn.vox-cdn.com/uploads/chorus_image/image/63339099/lego_spike.0.png" width="300" />
|
||||
<p></p>
|
||||
<a href="https://www.lego.com/en-us/product/lego-education-spike-prime-set-45678">Get the robot!</a>
|
||||
</body>
|
||||
</html>
|
33
media/html/winkeys.html
Normal file
33
media/html/winkeys.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mind Reader Key Bindings for Windows</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2> Here is a list of all Mind Reader's commands and their keybindings on windows and linux systems </h2>
|
||||
<p>
|
||||
<h2> Editor Settings </h2>
|
||||
Increase Font Scale - Number Pad Add<br>
|
||||
Decrease Font Scale - Number Pad Subtract<br>
|
||||
Increase Editor Scale - Shift and Number Pad Add<br>
|
||||
Decrease Editor Scale - Shift and Number Pad Subtract<br>
|
||||
Reset Editor Scale - Shift and Enter<br>
|
||||
Select Theme - Control and Shift and 1<br>
|
||||
<h2>Navigation</h2>
|
||||
Get Indent - Shift and Tab<br>
|
||||
Show All Symbols - Control and T<br>
|
||||
Go To Line - Control and G<br>
|
||||
Quick Open - Control and P<br>
|
||||
Go To Symbol - Control and Shift and 0<br>
|
||||
Show Problems - Control and Shift and M<br>
|
||||
Next In File - F8<br>
|
||||
Previous In File - Shift and F8<br>
|
||||
Open Previous Editor Group - Control and Tab<br>
|
||||
Navigate Forward - Control and Shift and Minus<br>
|
||||
Navigate Back - Control and Alt and Minus<br>
|
||||
Get Quick Input Back - Control and Alt and Minus
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
BIN
media/logo.png
Normal file
BIN
media/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
20
package-lock.json
generated
20
package-lock.json
generated
@ -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"
|
||||
},
|
||||
|
140
package.json
140
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",
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user