summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Olson <dana@shineuponthee.com>2014-12-17 15:57:39 -0500
committerDana Olson <dana@shineuponthee.com>2014-12-17 15:57:39 -0500
commit1a6628f5a3d005d500d72e86222f1255a3276b5a (patch)
tree37251119e31cebe8abec69d5d55cddec9a9f6714
parentbed3b7f092881223f7b58c26e65d03b052e5313f (diff)
change shortcut for toggle-comment to Ctrl+K
-rw-r--r--scene/gui/text_edit.cpp21
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp2
2 files changed, 1 insertions, 22 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 67d786cf49..71f0d926c3 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1911,27 +1911,6 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
} break;
- case KEY_K:{
- if (!k.mod.command || k.mod.shift || k.mod.alt) {
- scancode_handled=false;
- break;
- }
- else {
- if (selection.active) {
- int ini = selection.from_line;
- int end = selection.to_line;
- for (int i=ini; i<= end; i++)
- {
- _insert_text(i,0,"#");
- }
- }
- else{
- _insert_text(cursor.line,0,"#");
- }
- update();
- }
- break;}
-
case KEY_U:{
if (!k.mod.command || k.mod.shift || k.mod.alt) {
scancode_handled=false;
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index d9b3ec1d4f..2e5f267d5c 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -1599,7 +1599,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
edit_menu->get_popup()->add_item("Move Down",EDIT_MOVE_LINE_DOWN,KEY_MASK_ALT|KEY_DOWN);
edit_menu->get_popup()->add_item("Indent Left",EDIT_INDENT_LEFT,KEY_MASK_ALT|KEY_LEFT);
edit_menu->get_popup()->add_item("Indent Right",EDIT_INDENT_RIGHT,KEY_MASK_ALT|KEY_RIGHT);
- edit_menu->get_popup()->add_item("Toggle Comment",EDIT_TOGGLE_COMMENT,KEY_MASK_CMD|KEY_SLASH);
+ edit_menu->get_popup()->add_item("Toggle Comment",EDIT_TOGGLE_COMMENT,KEY_MASK_CMD|KEY_K);
edit_menu->get_popup()->add_item("Clone Down",EDIT_CLONE_DOWN,KEY_MASK_CMD|KEY_B);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_item("Complete Symbol",EDIT_COMPLETE,KEY_MASK_CMD|KEY_SPACE);