-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Centralize keyboard shortcuts (#1175)
This also adds two new keyboard shortcuts: Save project hex: (Windows) Ctrl+Shift+S; (Mac) Cmd+Shift+S Send to micro:bit: (Windows) Ctrl+Shift+E; (Mac) Cmd+Shift+E
- Loading branch information
1 parent
027bb24
commit bcedfb3
Showing
17 changed files
with
139 additions
and
103 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Shortcuts are global unless noted otherwise. | ||
export const keyboardShortcuts = { | ||
// This is scoped by keyboard focus. | ||
copyCode: ["ctrl+c", "meta+c", "enter"], | ||
search: ["ctrl+shift+f", "meta+shift+f"], | ||
sendToMicrobit: ["ctrl+shift+e", "meta+shift+e"], | ||
saveProject: ["ctrl+shift+s", "meta+shift+s"], | ||
}; | ||
|
||
export const globalShortcutConfig = { | ||
preventDefault: true, | ||
enableOnContentEditable: true, | ||
enableOnFormTags: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.