new input
This commit is contained in:
parent
5c99aca3fe
commit
37d4dce4ad
@ -55,9 +55,9 @@ export function mapKey(name: string, isDesktop: Boolean) {
|
|||||||
return KeyEvent.fromPartial({ unicode: chr });
|
return KeyEvent.fromPartial({ unicode: chr });
|
||||||
else return KeyEvent.fromPartial({ chr });
|
else return KeyEvent.fromPartial({ chr });
|
||||||
}
|
}
|
||||||
const control_key = controlKeyFromJSON(name);
|
const control_key = controlKeyFromJSON(tmp);
|
||||||
if (control_key == ControlKey.UNRECOGNIZED) {
|
if (control_key == ControlKey.UNRECOGNIZED) {
|
||||||
console.error("Unknown control key " + name);
|
console.error("Unknown control key " + tmp);
|
||||||
}
|
}
|
||||||
return KeyEvent.fromPartial({ control_key });
|
return KeyEvent.fromPartial({ control_key });
|
||||||
}
|
}
|
||||||
|
@ -563,13 +563,13 @@ export default class Connection {
|
|||||||
) {
|
) {
|
||||||
const key_event = mapKey(name, globals.isDesktop());
|
const key_event = mapKey(name, globals.isDesktop());
|
||||||
if (!key_event) return;
|
if (!key_event) return;
|
||||||
if (alt && (name == "Alt" || name == "RAlt")) {
|
if (alt && (name == "VK_MENU" || name == "RAlt")) {
|
||||||
alt = false;
|
alt = false;
|
||||||
}
|
}
|
||||||
if (ctrl && (name == "Control" || name == "RControl")) {
|
if (ctrl && (name == "VK_CONTROL" || name == "RControl")) {
|
||||||
ctrl = false;
|
ctrl = false;
|
||||||
}
|
}
|
||||||
if (shift && (name == "Shift" || name == "RShift")) {
|
if (shift && (name == "VK_SHIFT" || name == "RShift")) {
|
||||||
shift = false;
|
shift = false;
|
||||||
}
|
}
|
||||||
if (command && (name == "Meta" || name == "RWin")) {
|
if (command && (name == "Meta" || name == "RWin")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user