mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
feat: 添加打印快捷键
This commit is contained in:
parent
4bbc938fcf
commit
7149b08d72
@ -9,6 +9,7 @@ export const enum KEYS {
|
||||
F = 'F',
|
||||
D = 'D',
|
||||
B = 'B',
|
||||
P = 'P',
|
||||
MINUS = '-',
|
||||
EQUAL = '=',
|
||||
DIGIT_0 = '0',
|
||||
@ -40,6 +41,8 @@ export const HOTKEY_DOC = [
|
||||
{ label: '恢复', value: 'Ctrl + Y' },
|
||||
{ label: '删除', value: 'Delete / Backspace' },
|
||||
{ label: '多选', value: '按住 Ctrl 或 Shift' },
|
||||
{ label: '打印', value: 'Ctrl + P' },
|
||||
{ label: '关闭弹窗', value: 'ESC' },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -134,6 +134,12 @@ export default () => {
|
||||
if (shiftKey && !shiftKeyState.value) keyboardStore.setShiftKeyState(true)
|
||||
if (!disableHotkeys.value && key === KEYS.SPACE) keyboardStore.setSpaceKeyState(true)
|
||||
|
||||
|
||||
if (ctrlOrMetaKeyActive && key === KEYS.P) {
|
||||
e.preventDefault()
|
||||
mainStore.setDialogForExport('pdf')
|
||||
return
|
||||
}
|
||||
if (shiftKey && key === KEYS.F5) {
|
||||
e.preventDefault()
|
||||
enterScreening()
|
||||
|
Loading…
x
Reference in New Issue
Block a user