Skip to content

Commit ef586ed

Browse files
committed
keyboard shortcut
1 parent e05c2db commit ef586ed

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

client/src/setupCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { state } from './extension';
44

55
export function setupCommands(context: ExtensionContext) {
66
const runSketch = commands.registerCommand('processing.sketch.run', (resource: Uri) => {
7+
// TODO: If the command is run from a keyboard shortcut, find the current file
78
if (!resource) {
89
return;
910
}
1011

1112
// TODO: Save the current file, maybe settting?
12-
// TODO: Add a keyboard shortcut to run the sketch
1313
// TODO: Give feedback if the sketch is starting
1414

1515
let terminal = state.terminal;

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@
4343
"icon": "$(new-file)"
4444
}
4545
],
46+
"keybindings": [
47+
{
48+
"command": "processing.sketch.run",
49+
"key": "ctrl+r",
50+
"when": "editorTextFocus",
51+
"mac": "cmd+r"
52+
}
53+
],
4654
"menus": {
4755
"explorer/context": [
4856
{

0 commit comments

Comments
 (0)