fixed issue where couldn't cut and selectAll on macos
This commit is contained in:
1 parent
9e71989ff5
commit
f9dbbae293
4 files changed
+24
No files matched your search
@@ -7,6 +7,7 @@
|
||||
"buildFailed": "Build failed, more information can be found in the console.",
|
||||
"cancel": "Cancel",
|
||||
"copy": "Copy",
|
||||
"cut": "Cut",
|
||||
"createProject": "Create Project",
|
||||
"delete": "Delete",
|
||||
"deleteNode": "Delete Node",
|
||||
@@ -44,6 +45,7 @@
|
||||
"saveAsSubtree": "Save As Subtree",
|
||||
"searchFile": "Search File",
|
||||
"searchNode": "Search Node",
|
||||
"selectAll": "Select All",
|
||||
"services": "Services",
|
||||
"start": "Start",
|
||||
"undo": "Undo",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"buildFailed": "构建出现错误,详情请查看控制台!",
|
||||
"cancel": "取消",
|
||||
"copy": "复制",
|
||||
"cut": "替换",
|
||||
"createProject": "新建项目",
|
||||
"delete": "删除",
|
||||
"deleteNode": "删除节点",
|
||||
@@ -44,6 +45,7 @@
|
||||
"saveAsSubtree": "另存为子树",
|
||||
"searchFile": "搜索文件",
|
||||
"searchNode": "搜索节点",
|
||||
"selectAll": "全选",
|
||||
"services": "服务",
|
||||
"start": "开始",
|
||||
"undo": "撤销",
|
||||
|
||||
@@ -213,6 +213,24 @@ export const Menu: FC<LayoutProps> = () => {
|
||||
getFocusedWebContents()?.paste();
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'menu.edit.cut',
|
||||
label: t('cut'),
|
||||
enabled: enabled,
|
||||
accelerator: Hotkey.Cut,
|
||||
click: () => {
|
||||
getFocusedWebContents()?.cut()
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'menu.edit.selectAll',
|
||||
label: t('selectAll'),
|
||||
enabled: enabled,
|
||||
accelerator: Hotkey.SelectAll,
|
||||
click: () => {
|
||||
getFocusedWebContents()?.selectAll()
|
||||
}
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
id: "menu.edit.insertNode",
|
||||
|
||||
@@ -46,6 +46,7 @@ export const Hotkey = {
|
||||
Build: hotkey("ctrl+b"),
|
||||
CloseEditor: hotkey("ctrl+w"),
|
||||
Copy: hotkey("ctrl+c"),
|
||||
Cut: hotkey('ctrl+x'),
|
||||
Delete: Key.Delete,
|
||||
Duplicate: hotkey("ctrl+d"),
|
||||
Enter: Key.Enter,
|
||||
@@ -60,6 +61,7 @@ export const Hotkey = {
|
||||
Save: hotkey("ctrl+s"),
|
||||
SearchTree: hotkey("ctrl+p"),
|
||||
SearchNode: hotkey("ctrl+f"),
|
||||
SelectAll: hotkey('ctrl+a'),
|
||||
Undo: hotkey("ctrl+z"),
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user