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)