Merge pull request #121 from XiNNiW/modification-to-run-accel

xinniw - changed ^R to ^Enter for run command to reduce potential con…
This commit is contained in:
Devine Lu Linvega 2020-03-29 06:50:39 +09:00 committed by GitHub
commit 9475b49af2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -56,6 +56,7 @@ function Acels (client) {
}
this.convert = (event) => {
const accelerator = event.key === ' ' ? 'Space' : capitalize(event.key.replace('Arrow', ''))
console.log(event.key);
if ((event.ctrlKey || event.metaKey) && event.shiftKey) {
return `CmdOrCtrl+Shift+${accelerator}`
}
@ -502,7 +503,7 @@ function Client () {
this.acels.set('View', 'Toggle Guides', 'CmdOrCtrl+Shift+H', () => { this.surface.toggleGuides() })
this.acels.set('View', 'Toggle Commander', 'CmdOrCtrl+K', () => { this.commander.toggle() })
this.acels.set('View', 'Expand Commander', 'CmdOrCtrl+Shift+K', () => { this.commander.toggle(true) })
this.acels.set('Project', 'Run', 'CmdOrCtrl+R', () => { this.commander.run() })
this.acels.set('Project', 'Run', 'CmdOrCtrl+Enter', () => { this.commander.run() })
this.acels.set('Project', 'Re-Indent', 'CmdOrCtrl+Shift+I', () => { this.commander.lint() })
this.acels.set('Project', 'Clean', 'Escape', () => { this.commander.cleanup() })
this.acels.route(this)

View File

@ -50,7 +50,7 @@ function Client () {
this.acels.set('View', 'Toggle Guides', 'CmdOrCtrl+Shift+H', () => { this.surface.toggleGuides() })
this.acels.set('View', 'Toggle Commander', 'CmdOrCtrl+K', () => { this.commander.toggle() })
this.acels.set('View', 'Expand Commander', 'CmdOrCtrl+Shift+K', () => { this.commander.toggle(true) })
this.acels.set('Project', 'Run', 'CmdOrCtrl+R', () => { this.commander.run() })
this.acels.set('Project', 'Run', 'CmdOrCtrl+Enter', () => { this.commander.run() })
this.acels.set('Project', 'Re-Indent', 'CmdOrCtrl+Shift+I', () => { this.commander.lint() })
this.acels.set('Project', 'Clean', 'Escape', () => { this.commander.cleanup() })
this.acels.route(this)