Commit 154ceed8 authored by Skye's avatar Skye

fix: Zoom custom shortcut key

parent fdfb03b7
...@@ -90,6 +90,7 @@ export const getTimeStr = (date: Date) => { ...@@ -90,6 +90,7 @@ export const getTimeStr = (date: Date) => {
}; };
const keyMap: { [key: string]: number } = { const keyMap: { [key: string]: number } = {
CUSTOM_1: 0x01,
A: 0x04, A: 0x04,
B: 0x05, B: 0x05,
C: 0x06, C: 0x06,
...@@ -151,14 +152,14 @@ const HotKeyBuilder = { ...@@ -151,14 +152,14 @@ const HotKeyBuilder = {
__mapping: (key: string) => { __mapping: (key: string) => {
return keyMap[key]; return keyMap[key];
}, },
build: () => { build: (REG_8: number = 0x03) => {
let key1 = 0; let key1 = 0;
if (HotKeyBuilder.control) key1 |= 0x01 << 0; if (HotKeyBuilder.control) key1 |= 0x01 << 0;
if (HotKeyBuilder.shift) key1 |= 0x01 << 1; if (HotKeyBuilder.shift) key1 |= 0x01 << 1;
if (HotKeyBuilder.alt) key1 |= 0x01 << 2; if (HotKeyBuilder.alt) key1 |= 0x01 << 2;
if (HotKeyBuilder.guiKey) key1 |= 0x01 << 3; if (HotKeyBuilder.guiKey) key1 |= 0x01 << 3;
let codes = [ let codes = [
0x03, REG_8,
key1, key1,
HotKeyBuilder.keys.length ? HotKeyBuilder.keys[0] : 0x00, HotKeyBuilder.keys.length ? HotKeyBuilder.keys[0] : 0x00,
HotKeyBuilder.keys.length > 1 ? HotKeyBuilder.keys[1] : 0x00, HotKeyBuilder.keys.length > 1 ? HotKeyBuilder.keys[1] : 0x00,
...@@ -191,16 +192,16 @@ export const shortcutKeys = { ...@@ -191,16 +192,16 @@ export const shortcutKeys = {
Zoom: { Zoom: {
Windows: [ Windows: [
enterKeyCode(0, 1), enterKeyCode(0, 1),
...emptyCodes, HotKeyBuilder.withKey('CUSTOM_1').build(0x04),
HotKeyBuilder.withAlt().withKey('Q').build(), HotKeyBuilder.withAlt().withKey('Q').build(),
...emptyCodes, HotKeyBuilder.withKey('M').build(0x04),
HotKeyBuilder.withAlt().withKey('A').build() HotKeyBuilder.withAlt().withKey('A').build()
], ],
Mac: [ Mac: [
enterKeyCode(0, 1), enterKeyCode(0, 1),
...emptyCodes, HotKeyBuilder.withKey('CUSTOM_1').build(0x04),
HotKeyBuilder.withGuiKey().withKey('W').build(), HotKeyBuilder.withGuiKey().withKey('W').build(),
...emptyCodes, HotKeyBuilder.withKey('M').build(0x04),
HotKeyBuilder.withGuiKey().withShift().withKey('A').build() HotKeyBuilder.withGuiKey().withShift().withKey('A').build()
], ],
Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes] Linux: [enterKeyCode(), ...emptyCodes, ...emptyCodes, ...emptyCodes, ...emptyCodes]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment