mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-02-21 02:33:34 +01:00
quick hack to try to reserve some alt keys from the terminal (#915)
This commit is contained in:
parent
95e129d94e
commit
72e24900f4
@ -5,7 +5,7 @@ import { waveEventSubscribe } from "@/app/store/wps";
|
||||
import { RpcApi } from "@/app/store/wshclientapi";
|
||||
import { WindowRpcClient } from "@/app/store/wshrpcutil";
|
||||
import { VDomView } from "@/app/view/term/vdom";
|
||||
import { WOS, atoms, getConnStatusAtom, globalStore, useSettingsPrefixAtom } from "@/store/global";
|
||||
import { PLATFORM, WOS, atoms, getConnStatusAtom, globalStore, useSettingsPrefixAtom } from "@/store/global";
|
||||
import * as services from "@/store/services";
|
||||
import * as keyutil from "@/util/keyutil";
|
||||
import * as util from "@/util/util";
|
||||
@ -313,6 +313,14 @@ const TerminalView = ({ blockId, model }: TerminalViewProps) => {
|
||||
prtn.catch((e) => console.log("error controller resync (enter)", blockId, e));
|
||||
return false;
|
||||
}
|
||||
if (PLATFORM == "win32" || PLATFORM == "linux") {
|
||||
const reservedAltKeys = ["Alt:t", "Alt:n", "Alt:w", "Alt:m", "Alt:g", "Alt:[", "Alt:]", "Alt:Shift:r"];
|
||||
for (let i = 0; i < reservedAltKeys.length; i++) {
|
||||
if (keyutil.checkKeyPressed(waveEvent, reservedAltKeys[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
const fullConfig = globalStore.get(atoms.fullConfigAtom);
|
||||
|
Loading…
Reference in New Issue
Block a user