We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b15f878 commit 19d3fa7Copy full SHA for 19d3fa7
src/editor.js
@@ -90,8 +90,7 @@ class CodeElement extends EventTarget {
90
if (!event.ctrlKey && !event.metaKey) {
91
return;
92
}
93
- // 10 and 13 are Enter codes
94
- if (event.keyCode != 10 && event.keyCode != 13) {
+ if (event.key !== "Enter" && event.key !== "NumpadEnter") {
95
96
97
event.preventDefault();
0 commit comments