Skip to content

Commit 42aae1d

Browse files
committed
Fix search/copy on osx
1 parent b92712e commit 42aae1d

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

resources/scripts/components/server/Console.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,23 +144,16 @@ export default () => {
144144

145145
// Add support for capturing keys
146146
terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => {
147-
// Ctrl + C (Copy)
148-
if (e.ctrlKey && e.key === 'c') {
147+
if (e.metaKey && e.key === 'c') {
149148
document.execCommand('copy');
150149
return false;
151-
}
152-
153-
// Ctrl + F (Find)
154-
if (e.ctrlKey && e.key === 'f') {
150+
} else if (e.metaKey && e.key === 'f') {
151+
e.preventDefault();
155152
searchBar.show();
156153
return false;
157-
}
158-
159-
// Escape
160-
if (e.key === 'Escape') {
154+
} else if (e.key === 'Escape') {
161155
searchBar.hidden();
162156
}
163-
164157
return true;
165158
});
166159
}

0 commit comments

Comments
 (0)