Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontends/server/frontend/dist/assets/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontends/server/frontend/dist/assets/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontends/server/frontend/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function isWideChar(c) {
}
}

function isMacOS() {
export function isMacOS() {
return window.navigator.userAgent.indexOf('Mac OS X') !== -1;
}

Expand Down
4 changes: 3 additions & 1 deletion frontends/server/frontend/keyevent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"use strict";

import { isMacOS } from './editor.js';

const modifierKeys = ["Shift", "Control", "Alt", "Meta", "CapsLock"];

const convertKeyTable = {
Expand Down Expand Up @@ -106,7 +108,7 @@ const convertKeyTable = {
};

function getKey(e) {
if (e.altKey) {
if (e.altKey && isMacOS()) {
return (
convertKeyTable[e.key] ||
(e.code.startsWith('Key') ? e.code[3].toLowerCase() : null) ||
Expand Down