Skip to content

Commit

Permalink
fix(editor): shortcuts in caps lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Nov 26, 2021
1 parent acbef39 commit aff5a17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
})
emitter.on('entity-input-raw', (raw: string) => {
cmp.value = raw
cmp.value = raw + cmp.value
})
emitter.on('entity-input-force-enter', () => {
Expand Down
10 changes: 5 additions & 5 deletions src/components/editor/entity/default/EditorEntityDefaultShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -552,22 +552,22 @@
// in ctrl press
if (e.ctrlKey) {
// finder
if (e.key === 'f') {
if (e.key === 'f' || e.key === 'F') {
ABSOLUTE.shortcuts.finder = !ABSOLUTE.shortcuts.finder
}
// swapper
if (e.key === 'h') {
if (e.key === 'h' || e.key === 'H') {
ABSOLUTE.shortcuts.finder = !ABSOLUTE.shortcuts.switcher
}
// delete entity
if (e.key === 'd') {
if (e.key === 'd' || e.key === 'D') {
entity.base().onDelete(props.entity, _index.value)
}
// italic entity
if (e.key === 'i') {
if (e.key === 'i' || e.key === 'I') {
if (!value || props.entity.type !== 'paragraph') return
setData(
Expand All @@ -582,7 +582,7 @@
}
// bold entity
if (e.key === 'b') {
if (e.key === 'b' || e.key === 'B') {
if (!value || props.entity.type !== 'paragraph') return
setData(
Expand Down

0 comments on commit aff5a17

Please sign in to comment.