feat:add page scale shortcut key
This commit is contained in:
@@ -14,6 +14,9 @@ export enum KeyMap {
|
||||
PERIOD = '.',
|
||||
LEFT_ANGLE_BRACKET = '<',
|
||||
RIGHT_ANGLE_BRACKET = '>',
|
||||
EQUAL = '=',
|
||||
MINUS = '-',
|
||||
PLUS = '+',
|
||||
A = 'a',
|
||||
B = 'b',
|
||||
C = 'c',
|
||||
|
||||
+17
@@ -639,6 +639,7 @@ window.onload = function () {
|
||||
} else {
|
||||
searchCollapseDom.style.right = 'unset'
|
||||
}
|
||||
searchInputDom.focus()
|
||||
}
|
||||
searchCollapseDom.querySelector<HTMLSpanElement>('span')!.onclick = function () {
|
||||
searchCollapseDom.style.display = 'none'
|
||||
@@ -989,6 +990,22 @@ window.onload = function () {
|
||||
callback: () => {
|
||||
searchDom.click()
|
||||
}
|
||||
},
|
||||
{
|
||||
key: KeyMap.MINUS,
|
||||
ctrl: true,
|
||||
isGlobal: true,
|
||||
callback: (command: Command) => {
|
||||
command.executePageScaleMinus()
|
||||
}
|
||||
},
|
||||
{
|
||||
key: KeyMap.EQUAL,
|
||||
ctrl: true,
|
||||
isGlobal: true,
|
||||
callback: (command: Command) => {
|
||||
command.executePageScaleAdd()
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user