mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
This commit is contained in:
parent
ac8748d161
commit
525071a4eb
2 changed files with 5 additions and 3 deletions
|
|
@ -241,7 +241,7 @@ export class Asset extends Model {
|
|||
<button id="viewFind" class="toolbarButton b3-tooltips b3-tooltips__s" tabindex="12" aria-expanded="false" aria-controls="findbar" aria-label="${window.siyuan.languages.search}">
|
||||
<svg><use xlink:href="#iconSearch"></use></svg>
|
||||
</button>
|
||||
<button id="rectAnno" class="toolbarButton b3-tooltips b3-tooltips__s" tabindex="12" aria-expanded="false" aria-controls="findbar" aria-label="${window.siyuan.languages.rectAnnotation} ${updateHotkeyTip("⌘/⌥")}">
|
||||
<button id="rectAnno" class="toolbarButton b3-tooltips b3-tooltips__s" tabindex="12" aria-expanded="false" aria-controls="findbar" aria-label="${window.siyuan.languages.rectAnnotation} ${updateHotkeyTip("⌘D")}/${updateHotkeyTip("⌥D")}">
|
||||
<svg><use xlink:href="#iconTopLeft"></use></svg>
|
||||
</button>
|
||||
<button class="toolbarButton pageUp b3-tooltips b3-tooltips__s" aria-label="${window.siyuan.languages.previousLabel}" id="previous" tabindex="13">
|
||||
|
|
|
|||
|
|
@ -2962,7 +2962,7 @@ function webViewerKeyUp (evt) {
|
|||
if (pdfInstance.overlayManager.active) {
|
||||
return
|
||||
}
|
||||
if (pdfInstance.appConfig.toolbar.rectAnno.classList.contains('toggled')) {
|
||||
if (evt.keyCode === 68 && pdfInstance.appConfig.toolbar.rectAnno.classList.contains('toggled')) {
|
||||
pdfInstance.appConfig.toolbar.rectAnno.dispatchEvent(
|
||||
new MouseEvent('click'))
|
||||
}
|
||||
|
|
@ -2987,10 +2987,12 @@ function webViewerKeyDown (evt) {
|
|||
(evt.shiftKey ? 4 : 0) |
|
||||
(evt.metaKey ? 8 : 0)
|
||||
|
||||
if ((cmd === 8 || cmd === 1 || cmd === 2) &&
|
||||
if (!evt.repeat && (cmd === 8 || cmd === 1 || cmd === 2) && evt.keyCode === 68 && // D
|
||||
!pdfInstance.appConfig.toolbar.rectAnno.classList.contains('toggled')) {
|
||||
pdfInstance.appConfig.toolbar.rectAnno.dispatchEvent(
|
||||
new MouseEvent('click'))
|
||||
evt.preventDefault()
|
||||
return
|
||||
}
|
||||
|
||||
// First, handle the key bindings that are independent whether an input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue