mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
chore: disable shortcuts #1239
This commit is contained in:
parent
0342477733
commit
e55fbf675e
17
src/main.tsx
17
src/main.tsx
|
@ -31,15 +31,14 @@ if (!container) {
|
||||||
|
|
||||||
document.addEventListener("keydown", (event) => {
|
document.addEventListener("keydown", (event) => {
|
||||||
// Disable WebView keyboard shortcuts
|
// Disable WebView keyboard shortcuts
|
||||||
if (["F5", "F7"].includes(event.key)) {
|
const disabledShortcuts =
|
||||||
event.preventDefault();
|
["F5", "F7"].includes(event.key) ||
|
||||||
}
|
(event.altKey && ["ArrowLeft", "ArrowRight"].includes(event.key)) ||
|
||||||
if (
|
((event.ctrlKey || event.metaKey) &&
|
||||||
(event.ctrlKey || event.metaKey) &&
|
["F", "G", "H", "J", "P", "Q", "R", "U"].includes(
|
||||||
["F", "H", "P", "Q", "R", "U"].includes(event.key.toUpperCase())
|
event.key.toUpperCase()
|
||||||
) {
|
));
|
||||||
event.preventDefault();
|
disabledShortcuts && event.preventDefault();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const contexts = [
|
const contexts = [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user