mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-01 03:16:56 -05:00
Allowing shift+space to insert spaces as well as end scripts. Not ideal yet, 'cause we can't selectively not insert the space when canceling a script.
This commit is contained in:
parent
f83fe6ce14
commit
49ab47e3fe
1 changed files with 3 additions and 0 deletions
|
@ -91,6 +91,9 @@ module.exports = class SpellView extends View
|
|||
addCommand
|
||||
name: 'end-current-script'
|
||||
bindKey: {win: 'Shift-Space', mac: 'Shift-Space'}
|
||||
passEvent: true # https://github.com/ajaxorg/ace/blob/master/lib/ace/keyboard/keybinding.js#L114
|
||||
# No easy way to selectively cancel shift+space, since we don't get access to the event.
|
||||
# Maybe we could temporarily set ourselves to read-only if we somehow know that a script is active?
|
||||
exec: -> Backbone.Mediator.publish 'level:shift-space-pressed'
|
||||
addCommand
|
||||
name: 'end-all-scripts'
|
||||
|
|
Loading…
Reference in a new issue