Skip to content

Commit c8711d2

Browse files
committed
updated keybindings
1 parent 104a5c7 commit c8711d2

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

app/Resources/ui/js/ace.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Resources/ui/js/keybindings.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ NODEBOX_KEYBINDINGS=[
2525
name: "refreshdoc",
2626
exec: function(editor, str) { editor.session.setValue(str); },
2727
},{
28-
name: "refreshdoc",
29-
exec: function(editor, str) { editor.session.setValue(str); },
28+
name: "cancelRun",
29+
bindKey: {mac: "Command-."},
30+
exec: function(editor) {
31+
app.cancelRun()
32+
}
3033
},{
3134
name: "openPreferences",
3235
bindKey: {mac: "Command-,"},

plotdevice/gui/editor.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ def undoAction_(self, sender):
277277
def loadPrefs(self):
278278
NSApp().delegate().showPreferencesPanel_(self)
279279

280+
def cancelRun(self):
281+
# catch command-period even when the editor is first responder
282+
mm=NSApp().mainMenu()
283+
menu = mm.itemWithTitle_("Python")
284+
menu.submenu().performActionForItemAtIndex_(3)
285+
280286
def edits(self, count):
281287
# inform the undo manager of the changes
282288
um = self._undo_mgr

0 commit comments

Comments
 (0)