Fix search/copy on osx

This commit is contained in:
Dane Everitt 2021-02-17 21:32:36 -08:00
parent b92712e990
commit 42aae1d9f1
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -144,23 +144,16 @@ export default () => {
// Add support for capturing keys
terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => {
// Ctrl + C (Copy)
if (e.ctrlKey && e.key === 'c') {
if (e.metaKey && e.key === 'c') {
document.execCommand('copy');
return false;
}
// Ctrl + F (Find)
if (e.ctrlKey && e.key === 'f') {
} else if (e.metaKey && e.key === 'f') {
e.preventDefault();
searchBar.show();
return false;
}
// Escape
if (e.key === 'Escape') {
} else if (e.key === 'Escape') {
searchBar.hidden();
}
return true;
});
}