1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Fix getStringForKeyCode returning wrong result

This adds the full stop/period (.) key to the switch statement, and replaces String.fromCharCode (which works with Unicode) with the replacement character (�).
This commit is contained in:
EmeraldBlock 2020-10-03 13:05:13 -05:00 committed by GitHub
parent beb09a9e3e
commit 2f1c5ef04d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -248,6 +248,8 @@ export function getStringForKeyCode(code) {
return ",";
case 189:
return "-";
case 190:
return ".";
case 191:
return "/";
case 219:
@ -260,7 +262,7 @@ export function getStringForKeyCode(code) {
return "'";
}
return String.fromCharCode(code);
return "<22>";
}
export class Keybinding {