From 9901a8a31300f799ebdf850a46cb4fed273917fa Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Thu, 18 Apr 2019 20:16:46 -0700 Subject: [PATCH] Update main.js --- data/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/main.js b/data/main.js index 99dd5224..fe296283 100644 --- a/data/main.js +++ b/data/main.js @@ -29,7 +29,7 @@ function scrollFunction() { } function textAreaKeyPressed() { - if (event.keyCode == 13) { + if (event.key == "Enter" || event.key == "Return") { setTimeout(function() { cursorIndex = document.getElementById("inputText").selectionStart document.getElementById("inputText").value = document.getElementById("inputText").value.slice(0, cursorIndex) + "{line}" + document.getElementById("inputText").value.slice(cursorIndex, 0)