mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 14:24:46 +02:00
Merge pull request #3195 from pterodactyl/fix/console-copy
ui(server): fix keybinds not working in console
This commit is contained in:
commit
942136cb35
@ -145,10 +145,10 @@ export default () => {
|
|||||||
|
|
||||||
// Add support for capturing keys
|
// Add support for capturing keys
|
||||||
terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => {
|
terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => {
|
||||||
if (e.metaKey && e.key === 'c') {
|
if ((e.ctrlKey || e.metaKey) && e.key === 'c') {
|
||||||
document.execCommand('copy');
|
document.execCommand('copy');
|
||||||
return false;
|
return false;
|
||||||
} else if (e.metaKey && e.key === 'f') {
|
} else if ((e.ctrlKey || e.metaKey) && e.key === 'f') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
searchBar.show();
|
searchBar.show();
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user