mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-07-26 10:15:10 +02:00
wip
This commit is contained in:
@@ -405,7 +405,13 @@ export async function mainBoot() {
|
||||
allowRepeat: true,
|
||||
},
|
||||
} as const satisfies Keymap;
|
||||
window.document.addEventListener('keydown', makeHotkey(keymap), { passive: false });
|
||||
const listener = makeHotkey(keymap);
|
||||
window.document.addEventListener('keydown', listener, { passive: false });
|
||||
|
||||
// TODO: よりマシな無効化方法を提供する
|
||||
(window as any).disableGlobalHotkeys = () => {
|
||||
window.document.removeEventListener('keydown', listener);
|
||||
};
|
||||
|
||||
initializeSw();
|
||||
}
|
||||
|
||||
@@ -315,6 +315,9 @@ onMounted(async () => {
|
||||
watch([graphicsQuality, fps, resolution, antialias], () => {
|
||||
refresh();
|
||||
});
|
||||
|
||||
// canvasからフォーカスが外れていることに気づかずsとか押してしまうと検索画面が開かれてroomの状態が失われたりするので無効化
|
||||
(window as any).disableGlobalHotkeys();
|
||||
});
|
||||
|
||||
onDeactivated(() => {
|
||||
|
||||
Reference in New Issue
Block a user