File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,21 @@ onKeyStroke(
7272 },
7373 { dedupe: true },
7474)
75+
76+ onKeyStroke (
77+ ' c' ,
78+ e => {
79+ // Don't trigger if user is typing in an input
80+ const target = e .target as HTMLElement
81+ if (target .tagName === ' INPUT' || target .tagName === ' TEXTAREA' || target .isContentEditable ) {
82+ return
83+ }
84+
85+ e .preventDefault ()
86+ navigateTo (' /compare' )
87+ },
88+ { dedupe: true },
89+ )
7590 </script >
7691
7792<template >
@@ -156,10 +171,16 @@ onKeyStroke(
156171 <!-- Desktop: Compare link -->
157172 <NuxtLink
158173 to =" /compare"
159- class =" hidden sm:inline-flex link-subtle font-mono text-sm items-center gap-1.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 rounded"
174+ class =" hidden sm:inline-flex link-subtle font-mono text-sm items-center gap-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 rounded"
175+ aria-keyshortcuts =" c"
160176 >
161- <span class =" i-carbon:compare w-4 h-4" aria-hidden =" true" />
162177 {{ $t('nav.compare') }}
178+ <kbd
179+ class =" inline-flex items-center justify-center w-5 h-5 text-xs bg-bg-muted border border-border rounded"
180+ aria-hidden =" true"
181+ >
182+ c
183+ </kbd >
163184 </NuxtLink >
164185
165186 <!-- Desktop: Settings link -->
You can’t perform that action at this time.
0 commit comments