@@ -5,10 +5,12 @@ const { settings } = useSettings()
55const { locale, locales, setLocale : setNuxti18nLocale } = useI18n ()
66const colorMode = useColorMode ()
77const { currentLocaleStatus, isSourceLocale } = useI18nStatus ()
8+ const keyboardShortcutsEnabled = useKeyboardShortcuts ()
89
910// Escape to go back (but not when focused on form elements or modal is open)
1011onKeyStroke (
1112 e =>
13+ keyboardShortcutsEnabled .value &&
1214 isKeyWithoutModifiers (e , ' Escape' ) &&
1315 ! isEditableElement (e .target ) &&
1416 ! document .documentElement .matches (' html:has(:modal)' ),
@@ -205,6 +207,7 @@ const setLocale: typeof setNuxti18nLocale = locale => {
205207 </div >
206208 </section >
207209
210+ <!-- LANGUAGE Section -->
208211 <section >
209212 <h2 class =" text-xs text-fg-muted uppercase tracking-wider mb-4" >
210213 {{ $t('settings.sections.language') }}
@@ -260,6 +263,20 @@ const setLocale: typeof setNuxti18nLocale = locale => {
260263 </template >
261264 </div >
262265 </section >
266+
267+ <!-- KEYBOARD SHORTCUTS Section -->
268+ <section >
269+ <h2 class =" text-xs text-fg-muted uppercase tracking-wider mb-4" >
270+ {{ $t('settings.sections.keyboard_shortcuts') }}
271+ </h2 >
272+ <div class =" bg-bg-subtle border border-border rounded-lg p-4 sm:p-6" >
273+ <SettingsToggle
274+ :label =" $t('settings.keyboard_shortcuts_enabled')"
275+ :description =" $t('settings.keyboard_shortcuts_enabled_description')"
276+ v-model =" settings.keyboardShortcuts"
277+ />
278+ </div >
279+ </section >
263280 </div >
264281 </article >
265282 </main >
0 commit comments