diff --git a/src/dlangui/core/events.d b/src/dlangui/core/events.d index ac25daa7..4276cdd6 100644 --- a/src/dlangui/core/events.d +++ b/src/dlangui/core/events.d @@ -1026,6 +1026,12 @@ string keyName(uint keyCode) { return "8"; case KeyCode.KEY_9: return "9"; + case KeyCode.KEY_DIVIDE: + return "/"; + case KeyCode.KEY_MULTIPLY: + return "*"; + case KeyCode.TAB: + return "Tab"; case KeyCode.F1: return "F1"; case KeyCode.F2: diff --git a/src/dlangui/widgets/editors.d b/src/dlangui/widgets/editors.d index 89585176..fbeeee3b 100644 --- a/src/dlangui/widgets/editors.d +++ b/src/dlangui/widgets/editors.d @@ -409,6 +409,12 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction /// override to change popup menu items state override bool isActionEnabled(const Action action) { switch (action.id) { + case EditorActions.ToggleBlockComment: + return !_selectionRange.empty; + case EditorActions.ToggleLineComment: + case EditorActions.Tab: + case EditorActions.BackTab: + return true; case EditorActions.Copy: return !_selectionRange.empty; case EditorActions.Cut: