function enableCopyPasteInXterm()

in src/components/LogViewer/index.tsx [210:223]


function enableCopyPasteInXterm(xterm: XTerminal) {
  xterm.attachCustomKeyEventHandler((arg) => {
    if (arg.ctrlKey && arg.code === 'KeyC' && arg.type === 'keydown') {
      const selection = xterm.getSelection();
      if (selection) {
        return false;
      }
    }
    if (arg.ctrlKey && arg.code === 'KeyV' && arg.type === 'keydown') {
      return false;
    }
    return true;
  });
}