Просмотр исходного кода

Set the key binding which is reported on Windows.

Paulo Reis 10 лет назад
Родитель
Сommit
d6c966934d
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      services/web/public/coffee/ide/editor/directives/aceEditor.coffee

+ 4 - 2
services/web/public/coffee/ide/editor/directives/aceEditor.coffee

@@ -74,15 +74,17 @@ define [
 				editor.commands.removeCommand "foldall"
 				editor.commands.removeCommand "foldall"
 				
 				
 				# For European keyboards, the / is above 7 so needs Shift pressing.
 				# For European keyboards, the / is above 7 so needs Shift pressing.
-				# This comes through as Ctrl-Shift-/ which is mapped to toggleBlockComment.
+				# This comes through as Command-Shift-/ on OS X, which is mapped to 
+				# toggleBlockComment.
 				# This doesn't do anything for LaTeX, so remap this to togglecomment to
 				# This doesn't do anything for LaTeX, so remap this to togglecomment to
 				# work for European keyboards as normal.
 				# work for European keyboards as normal.
+				# On Windows, the key combo comes as Ctrl-Shift-7.
 				editor.commands.removeCommand "toggleBlockComment"
 				editor.commands.removeCommand "toggleBlockComment"
 				editor.commands.removeCommand "togglecomment"
 				editor.commands.removeCommand "togglecomment"
 				
 				
 				editor.commands.addCommand {
 				editor.commands.addCommand {
 					name: "togglecomment",
 					name: "togglecomment",
-					bindKey: { win: "Ctrl-/|Ctrl-Shift-/", mac: "Command-/|Command-Shift-/" },
+					bindKey: { win: "Ctrl-/|Ctrl-Shift-7", mac: "Command-/|Command-Shift-/" },
 					exec: (editor) -> editor.toggleCommentLines(),
 					exec: (editor) -> editor.toggleCommentLines(),
 					multiSelectAction: "forEachLine",
 					multiSelectAction: "forEachLine",
 					scrollIntoView: "selectionPart"
 					scrollIntoView: "selectionPart"