You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
change shortcut for toggle-comment to Ctrl+K
This commit is contained in:
@@ -1911,27 +1911,6 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
|
|||||||
|
|
||||||
} break;
|
} 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:{
|
case KEY_U:{
|
||||||
if (!k.mod.command || k.mod.shift || k.mod.alt) {
|
if (!k.mod.command || k.mod.shift || k.mod.alt) {
|
||||||
scancode_handled=false;
|
scancode_handled=false;
|
||||||
|
|||||||
@@ -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("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 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("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_item("Clone Down",EDIT_CLONE_DOWN,KEY_MASK_CMD|KEY_B);
|
||||||
edit_menu->get_popup()->add_separator();
|
edit_menu->get_popup()->add_separator();
|
||||||
edit_menu->get_popup()->add_item("Complete Symbol",EDIT_COMPLETE,KEY_MASK_CMD|KEY_SPACE);
|
edit_menu->get_popup()->add_item("Complete Symbol",EDIT_COMPLETE,KEY_MASK_CMD|KEY_SPACE);
|
||||||
|
|||||||
Reference in New Issue
Block a user