Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/main-process/appmenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ function setupMenus(callbacks) {
accelerator: 'CmdOrCtrl+A',
role: 'selectall'
},
{
type: 'separator'
},
{
label: 'Useful Keyboard Shortcuts',
enabled: callbacks.isFocusedWindow,
click: callbacks.keyboardShortcuts
}
]
},
{
Expand Down
4 changes: 4 additions & 0 deletions app/main-process/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ app.on('ready', function () {
showAbout: () => {
AboutWindow.showAboutWindow(theme);
},
keyboardShortcuts: () => {
var win = ProjectWindow.focused();
if (win) win.keyboardShortcuts();
},
stats: () => {
var win = ProjectWindow.focused();
if (win) win.stats();
Expand Down
4 changes: 4 additions & 0 deletions app/main-process/projectWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ ProjectWindow.prototype.stats = function() {
this.browserWindow.webContents.send('project-stats');
}

ProjectWindow.prototype.keyboardShortcuts = function() {
this.browserWindow.webContents.send('keyboard-shortcuts');
}

ProjectWindow.prototype.finalClose = function() {
this.safeToClose = true;
Inklecate.killSessions(this.browserWindow);
Expand Down
22 changes: 22 additions & 0 deletions app/renderer/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,28 @@ ipc.on("project-stats", (event, visible) => {
});
});

ipc.on("keyboard-shortcuts", (event, visible) => {
let messageLines = [];
messageLines.push("Useful Keyboard Shortcuts");
messageLines.push("");
messageLines.push("Find and Replace: Ctrl+H or Cmd+H");
messageLines.push("");
messageLines.push("Find: Ctrl+F or Cmd+F");
messageLines.push("");
messageLines.push("Go to Anything: Ctrl+P or Cmd+P");
messageLines.push("");
messageLines.push("Toggle Comment: Ctrl+/ or Cmd+/");
messageLines.push("");
messageLines.push("Add Multicursor Above: Ctrl+Alt+Up or Ctrl+Option+Up");
messageLines.push("");
messageLines.push("Add Multicursor Below: Ctrl+Alt+Down or Ctrl+Option+Down");
messageLines.push("");
messageLines.push("Temporarily Fold/Unfold Selection: Alt+L or Ctrl+Option+Down");
messageLines.push("");
alert(messageLines.join("\n"));
});


EditorView.setEvents({
"change": () => {
LiveCompiler.setEdited();
Expand Down