mirror of https://github.com/buggins/dlangui.git
keys
This commit is contained in:
parent
15c911b7bd
commit
f9bef62e65
|
|
@ -1026,6 +1026,12 @@ string keyName(uint keyCode) {
|
||||||
return "8";
|
return "8";
|
||||||
case KeyCode.KEY_9:
|
case KeyCode.KEY_9:
|
||||||
return "9";
|
return "9";
|
||||||
|
case KeyCode.KEY_DIVIDE:
|
||||||
|
return "/";
|
||||||
|
case KeyCode.KEY_MULTIPLY:
|
||||||
|
return "*";
|
||||||
|
case KeyCode.TAB:
|
||||||
|
return "Tab";
|
||||||
case KeyCode.F1:
|
case KeyCode.F1:
|
||||||
return "F1";
|
return "F1";
|
||||||
case KeyCode.F2:
|
case KeyCode.F2:
|
||||||
|
|
|
||||||
|
|
@ -409,6 +409,12 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
||||||
/// override to change popup menu items state
|
/// override to change popup menu items state
|
||||||
override bool isActionEnabled(const Action action) {
|
override bool isActionEnabled(const Action action) {
|
||||||
switch (action.id) {
|
switch (action.id) {
|
||||||
|
case EditorActions.ToggleBlockComment:
|
||||||
|
return !_selectionRange.empty;
|
||||||
|
case EditorActions.ToggleLineComment:
|
||||||
|
case EditorActions.Tab:
|
||||||
|
case EditorActions.BackTab:
|
||||||
|
return true;
|
||||||
case EditorActions.Copy:
|
case EditorActions.Copy:
|
||||||
return !_selectionRange.empty;
|
return !_selectionRange.empty;
|
||||||
case EditorActions.Cut:
|
case EditorActions.Cut:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue