Skip to content

Commit

Permalink
fix(accelerator): 不注入复制快捷键到vditor中
Browse files Browse the repository at this point in the history
  • Loading branch information
Blore-lzn authored and Hyggge committed Jun 19, 2023
1 parent a9dd7bd commit 97e9999
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/menu/templates/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function (keybindings) {
id: 'edit.copy',
accelerator: keybindings.getAccelerator('edit.copy'),
click (menuItem, browserWindow) {
browserWindow.webContents.send('ficus::keyboard-event', { id: menuItem.id })
// browserWindow.webContents.send('ficus::keyboard-event', { id: menuItem.id })
}
}, {
label: '复制为Markdown',
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/richTextEditor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ export default {
}
}
)
const disabledAcceleratorId = ['edit.copy']
const makeKeybingdingMap = (keybindingMap) => {
const newKeybinding = []
for (const [id, accelerator] of keybindingMap) {
if (accelerator) {
if (accelerator && disabledAcceleratorId.indexOf(id) === -1) {
if (window.electronAPI.isOSx()) {
newKeybinding.push({
hotkey: viditorFormatAccelerator(accelerator),
Expand Down

0 comments on commit 97e9999

Please sign in to comment.