+
{
/>
- {{ $t("pages.Setting.Mask.areaTip") }}
+
+ {{ $t("pages.Setting.Mask.rotation.title") }}
+
+
+
+
+
+
+
+
+
+
+
+
+ ScreenStream
+
+
+
+
+
+
diff --git a/src/hotkey.ts b/src/hotkey.ts
index 9ed1a86..618fd71 100644
--- a/src/hotkey.ts
+++ b/src/hotkey.ts
@@ -24,7 +24,6 @@ import {
import { useGlobalStore } from "./store/global";
import { LogicalPosition, getCurrent } from "@tauri-apps/api/window";
import { useI18n } from "vue-i18n";
-import { UnlistenFn } from "@tauri-apps/api/event";
import { KeyToCodeMap } from "./frontcommand/KeyToCodeMap";
import {
AndroidKeyEventAction,
@@ -36,13 +35,13 @@ import { sendInjectKeycode } from "./frontcommand/controlMsg";
function clientxToPosx(clientx: number) {
return clientx < 70
? 0
- : Math.floor((clientx - 70) * (store.screenSizeW / maskSizeW));
+ : Math.floor((clientx - 70) * (store.screenSizeW / store.maskSizeW));
}
function clientyToPosy(clienty: number) {
return clienty < 30
? 0
- : Math.floor((clienty - 30) * (store.screenSizeH / maskSizeH));
+ : Math.floor((clienty - 30) * (store.screenSizeH / store.maskSizeH));
}
function clientxToPosOffsetx(clientx: number, posx: number, scale = 1) {
@@ -59,6 +58,9 @@ function clientPosToSkillOffset(
clientPos: { x: number; y: number },
range: number
): { offsetX: number; offsetY: number } {
+ const maskSizeH = store.maskSizeH;
+ const maskSizeW = store.maskSizeW;
+
const maxLength = (120 / maskSizeH) * store.screenSizeH;
const centerX = maskSizeW * 0.5;
const centerY = maskSizeH * 0.5;
@@ -1511,40 +1513,24 @@ export function clearShortcuts() {
loopDownKeyCBMap.clear();
upKeyCBMap.clear();
cancelAbleKeyList.length = 0;
-
- // unlisten to resize
- unlistenResize();
}
export function applyShortcuts(
- element: HTMLElement,
keyMappingConfig: KeyMappingConfig,
globalStore: ReturnType