From 20d25be1488421bcf55460a179cb7bb776f87085 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Wed, 30 Jul 2014 08:02:34 +1000 Subject: [PATCH] go-tour: use ctrl-enter to fmt, not shift-space Apparently I type shift-space a lot when I type, so this new shortcut key gets in my way. I suppose I'm not the only one. LGTM=campoy R=campoy, golang-codereviews CC=golang-codereviews https://codereview.appspot.com/117250045 --- content/welcome.article | 2 +- static/js/values.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/content/welcome.article b/content/welcome.article index 7c50057..b7084f7 100644 --- a/content/welcome.article +++ b/content/welcome.article @@ -34,7 +34,7 @@ These example programs demonstrate different aspects of Go. The programs in the Edit the program and run it again. -Note that when you click on [[javascript:highlightAndClick("#format")][Format]] or `shift-space` +Note that when you click on [[javascript:highlightAndClick("#format")][Format]] or `ctrl-enter` the text in the editor is formatted using the [[http://golang.org/cmd/gofmt/][gofmt]] tool. You can switch on and off syntax highlighting the clicking on [[javascript:highlightAndClick(".syntax-checkbox")][syntax]] button. diff --git a/static/js/values.js b/static/js/values.js index 3d35864..a354083 100644 --- a/static/js/values.js +++ b/static/js/values.js @@ -61,15 +61,15 @@ value('ui.config', { 'Shift-Enter': function() { $('#run').click(); }, + 'Ctrl-Enter': function() { + $('#format').click(); + }, 'PageDown': function() { return false; }, 'PageUp': function() { return false; }, - 'Shift-Space': function() { - $('#format').click(); - }, } } -}); \ No newline at end of file +});