aboutsummaryrefslogtreecommitdiff
path: root/x11/waveterm/files/patch-docs_src_components_kbd.tsx
blob: 25e3dd6532cb2d8f8315c9d0bdb243fc53a0a729 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- docs/src/components/kbd.tsx.orig	2025-12-17 04:59:41 UTC
+++ docs/src/components/kbd.tsx
@@ -44,7 +44,7 @@ function convertKey(platform: Platform, key: string): 
 }
 
 // Custom KBD component
-const KbdInternal = ({ k, windows, mac, linux }: { k: string; windows?: string; mac?: string; linux?: string }) => {
+const KbdInternal = ({ k, windows, mac, linux, freebsd }: { k: string; windows?: string; mac?: string; linux?: string; freebsd?: string }) => {
     const { platform } = useContext(PlatformContext);
 
     // Determine which key binding to use based on platform overrides
@@ -55,6 +55,8 @@ const KbdInternal = ({ k, windows, mac, linux }: { k: 
         keyBinding = mac;
     } else if (platform === "linux" && linux) {
         keyBinding = linux;
+    } else if (platform === "freebsd" && freebsd) {
+        keyBinding = linux;
     }
 
     if (keyBinding == "N/A") {
@@ -73,10 +75,10 @@ const KbdInternal = ({ k, windows, mac, linux }: { k: 
     return <div className="kbd-group">{keyElems}</div>;
 };
 
-export const Kbd = ({ k, windows, mac, linux }: { k: string; windows?: string; mac?: string; linux?: string }) => {
+export const Kbd = ({ k, windows, mac, linux, freebsd }: { k: string; windows?: string; mac?: string; linux?: string; freebsd?: string }) => {
     return (
         <BrowserOnly fallback={<kbd>{k}</kbd>}>
-            {() => <KbdInternal k={k} windows={windows} mac={mac} linux={linux} />}
+            {() => <KbdInternal k={k} windows={windows} mac={mac} linux={linux} freebsd={freebsd} />}
         </BrowserOnly>
     );
 };