diff --git a/BeefLibs/Beefy2D/src/widgets/KeyCode.bf b/BeefLibs/Beefy2D/src/widgets/KeyCode.bf index 74c32e7d..00e1f9f0 100644 --- a/BeefLibs/Beefy2D/src/widgets/KeyCode.bf +++ b/BeefLibs/Beefy2D/src/widgets/KeyCode.bf @@ -90,13 +90,13 @@ namespace Beefy.widgets Minus = 0xBD, Period = 0xBE, Slash = 0xBF, + Tilde = 0xC0, Grave = 0xC0, LBracket = 0xDB, Backslash = 0xDC, RBracket = 0xDD, Apostrophe = 0xDE, Backtick = 0xDF, - Tilde = 0xC0, Command = 0xF0, COUNT = 0xFF, @@ -141,6 +141,16 @@ namespace Beefy.widgets return (KeyCode)LBracket; if (c == ']') return (KeyCode)RBracket; + if (c == '/') + return (KeyCode)Slash; + if (c == '\\') + return (KeyCode)Backslash; + if (c == '`') + return (KeyCode)Tilde; + if (c == '.') + return (KeyCode)Period; + if (c == ',') + return (KeyCode)Comma; } if (str.StartsWith("0x")) @@ -168,6 +178,10 @@ namespace Beefy.widgets c = '['; case RBracket: c = ']'; + case .Slash: + c = '/'; + case .Backslash: + c = '\\'; default: } if (c != 0) diff --git a/IDE/src/Commands.bf b/IDE/src/Commands.bf index 3ba093c2..72ae06ba 100644 --- a/IDE/src/Commands.bf +++ b/IDE/src/Commands.bf @@ -194,9 +194,9 @@ namespace IDE Add("Close Document", new () => { gApp.[Friend]TryCloseCurrentDocument(); }); Add("Close Panel", new () => { gApp.[Friend]TryCloseCurrentPanel(); }); Add("Close Workspace", new => gApp.[Friend]Cmd_CloseWorkspaceAndSetupNew); - Add("Comment Block", new => gApp.[Friend]CommentBlock); - Add("Comment Lines", new => gApp.[Friend]CommentLines); - Add("Comment Toggle", new => gApp.[Friend]CommentToggle); + Add("Comment Block", new => gApp.[Friend]CommentBlock, .Editor); + Add("Comment Lines", new => gApp.[Friend]CommentLines, .Editor); + Add("Comment Toggle", new => gApp.[Friend]CommentToggle, .Editor); Add("Compile File", new => gApp.Cmd_CompileFile); Add("Debug All Tests", new () => { gApp.[Friend]RunTests(true, true); }); Add("Debug Normal Tests", new () => { gApp.[Friend]RunTests(false, true); }); diff --git a/IDE/src/Settings.bf b/IDE/src/Settings.bf index ba5e5d39..5ef7348f 100644 --- a/IDE/src/Settings.bf +++ b/IDE/src/Settings.bf @@ -757,7 +757,8 @@ namespace IDE Add("Close Document", "Ctrl+W"); Add("Compile File", "Ctrl+F7"); Add("Comment Block", "Ctrl+K, Ctrl+C"); - Add("Comment Lines", "Ctrl+K, Ctrl+L"); + Add("Comment Lines", "Ctrl+K, Ctrl+/"); + Add("Comment Toggle", "Ctrl+K, Ctrl+T"); Add("Duplicate Line", "Ctrl+D"); Add("Find Class", "Alt+Shift+L"); Add("Find in Document", "Ctrl+F");