We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ef5a2d commit 5e1d55fCopy full SHA for 5e1d55f
frontend/src/hooks/useTerminal.ts
@@ -55,13 +55,21 @@ export const useTerminal = (commands: Command[] = []) => {
55
}
56
});
57
terminal.current.attachCustomKeyEventHandler((arg) => {
58
- if (arg.ctrlKey && arg.code === "KeyV" && arg.type === "keydown") {
+ if (
59
+ (arg.ctrlKey || arg.metaKey) &&
60
+ arg.code === "KeyV" &&
61
+ arg.type === "keydown"
62
+ ) {
63
navigator.clipboard.readText().then((text) => {
64
terminal.current?.write(text);
65
commandBuffer += text;
66
67
- if (arg.ctrlKey && arg.code === "KeyC" && arg.type === "keydown") {
68
69
70
+ arg.code === "KeyC" &&
71
72
73
const selection = terminal.current?.getSelection();
74
if (selection) {
75
const clipboardItem = new ClipboardItem({
0 commit comments