mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Regression
This commit is contained in:
parent
231a3c81f4
commit
c5613f6eee
@ -15,7 +15,6 @@ export const CHANGELOG = [
|
|||||||
"Improve visibility of shape background in dark mode",
|
"Improve visibility of shape background in dark mode",
|
||||||
"Added sound when destroying a building",
|
"Added sound when destroying a building",
|
||||||
"Update tutorial image for tier 2 tunnels to explain mix/match (by jimmyshadow1)",
|
"Update tutorial image for tier 2 tunnels to explain mix/match (by jimmyshadow1)",
|
||||||
"Prevent default actions on all keybindings in the web version so you don't accidentally use builtin browser shortcuts",
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -191,7 +191,17 @@ export class InputDistributor {
|
|||||||
*/
|
*/
|
||||||
handleKeyMouseDown(event) {
|
handleKeyMouseDown(event) {
|
||||||
const keyCode = event instanceof MouseEvent ? event.button + 1 : event.keyCode;
|
const keyCode = event instanceof MouseEvent ? event.button + 1 : event.keyCode;
|
||||||
event.preventDefault();
|
if (
|
||||||
|
keyCode === 4 || // MB4
|
||||||
|
keyCode === 5 || // MB5
|
||||||
|
keyCode === 9 || // TAB
|
||||||
|
keyCode === 16 || // SHIFT
|
||||||
|
keyCode === 17 || // CTRL
|
||||||
|
keyCode === 18 || // ALT
|
||||||
|
(keyCode >= 112 && keyCode < 122) // F1 - F10
|
||||||
|
) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
const isInitial = !this.keysDown.has(keyCode);
|
const isInitial = !this.keysDown.has(keyCode);
|
||||||
this.keysDown.add(keyCode);
|
this.keysDown.add(keyCode);
|
||||||
|
Loading…
Reference in New Issue
Block a user