diff --git a/documentation/index.html.erb b/documentation/index.html.erb
index 7a738a15..7d101db6 100644
--- a/documentation/index.html.erb
+++ b/documentation/index.html.erb
@@ -83,7 +83,7 @@
- Run
+ Run
@@ -1580,7 +1580,7 @@ Expressions
$('#repl_source').keyup -> compileSource()
# Eval the compiled js.
- $('.minibutton.run').click ->
+ evalJS = ->
try
eval window.compiledJS
catch error then alert error
@@ -1596,6 +1596,8 @@ Expressions
closeMenus = ->
$('.navigation.active').removeClass 'active'
+ $('.minibutton.run').click -> evalJS()
+
# Bind navigation buttons to open the menus.
$('.navigation').click (e) ->
return if e.target.tagName.toLowerCase() is 'a'
@@ -1607,9 +1609,15 @@ Expressions
$(this).addClass 'active'
false
- $(document.body).click (e) ->
- return false if $(e.target).hasClass('minibutton')
- closeMenus()
+ # Dismiss console if Escape pressed or click falls outside console
+ # Trigger Run button on Ctrl-Enter
+ $(document.body)
+ .keydown (e) ->
+ closeMenus() if e.which == 27
+ evalJS() if e.which == 13 and (e.metaKey or e.ctrlKey) and $('.minibutton.run:visible').length
+ .click (e) ->
+ return false if $(e.target).hasClass('minibutton')
+ closeMenus()
$('#open_webchat').click ->
$(this).replaceWith $('')
diff --git a/index.html b/index.html
index 7ed405f1..d8480862 100644
--- a/index.html
+++ b/index.html
@@ -61,7 +61,7 @@
- Run
+ Run
@@ -2484,7 +2484,7 @@ task('build:parser'build:parser