summaryrefslogtreecommitdiff
path: root/extension/react-app
diff options
context:
space:
mode:
Diffstat (limited to 'extension/react-app')
-rw-r--r--extension/react-app/src/components/Layout.tsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/extension/react-app/src/components/Layout.tsx b/extension/react-app/src/components/Layout.tsx
index 143b2302..500dc921 100644
--- a/extension/react-app/src/components/Layout.tsx
+++ b/extension/react-app/src/components/Layout.tsx
@@ -101,6 +101,15 @@ const Layout = () => {
if (event.metaKey && event.altKey && event.code === "KeyN") {
client?.loadSession(undefined);
}
+ if (event.metaKey && event.code === "KeyC") {
+ const selection = window.getSelection()?.toString();
+ if (selection) {
+ // Copy to clipboard
+ setTimeout(() => {
+ navigator.clipboard.writeText(selection);
+ }, 100);
+ }
+ }
};
window.addEventListener("keydown", handleKeyDown);