Commit ebf5317e authored by NukeKitty's avatar NukeKitty
Browse files
parents e28e91a5 9371acc6
Subproject commit 9d398abec5807f8646eb036bc0e6a243ceea9c8d
Subproject commit 215cb5346c056d669beeebaedea7139e6a379bf8
......@@ -42,6 +42,7 @@ namespace MomentaryMeeting.Game
{ "backwards", UserModel.RelativeDirection.Back },
{ "backward", UserModel.RelativeDirection.Back },
{ "back", UserModel.RelativeDirection.Back },
{ "behind", UserModel.RelativeDirection.Back },
{ "left", UserModel.RelativeDirection.Left },
{ "right", UserModel.RelativeDirection.Right }
};
......
......@@ -358,13 +358,16 @@ window.addEventListener("keydown", function (ev) {
add = false;
}
}
if (ev.keyCode === 57 && ev.shiftKey) newChar = "("; // left parenthesis
if (ev.keyCode === 48 && ev.shiftKey) newChar = ")"; // right parenthesis
if (ev.keyCode === 49 && ev.shiftKey) newChar = "!"; // exclamation mark
if (add) {
currentInput = currentInput + newChar;
if (currentInput.length > 120) {
currentInput = currentInput.substring(0, 120);
}
}
} else if ((ev.keyCode >= 189 && ev.keyCode <= 191) || ev.keyCode === 186 || ev.keyCode === 59 || ev.keyCode === 173) { // quick and dirty punctuation
} else if ((ev.keyCode >= 188 && ev.keyCode <= 191) || ev.keyCode === 186 || ev.keyCode === 59 || ev.keyCode === 173 || ev.keyCode === 222) { // quick and dirty punctuation
let newChar = "";
if (ev.keyCode === 186 || (ev.keyCode === 59 && ev.shiftKey)) newChar = ":"; // colon
......@@ -378,6 +381,9 @@ window.addEventListener("keydown", function (ev) {
}
if (ev.keyCode === 190) newChar = "."; // period
if (ev.keyCode === 191) newChar = "/"; // forward slash
if (ev.keyCode === 191 && ev.shiftKey) newChar = "?"; // question mark
if (ev.keyCode === 222) newChar = "'"; // apostrophe
if (ev.keyCode === 188) newChar = ","; // comma
currentInput = currentInput + newChar;
if (currentInput.length > 120) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment