Implement keyboard typing sound feedback and refactor login sound handling
- Added a keyboard typing sound effect that plays on character input in App.vue for enhanced user interaction. - Refactored the playSciFiTypingTick function in useLoginSounds.ts, replacing it with playKeyboardTypingSound for a more cohesive audio experience. - Removed unnecessary keydown event handlers from Login.vue to streamline the code and improve clarity. - Updated CLI store to play navigation sounds when toggling the CLI visibility.
This commit is contained in:
@@ -67,6 +67,7 @@ import AppLauncherOverlay from './components/AppLauncherOverlay.vue'
|
||||
import Screensaver from './components/Screensaver.vue'
|
||||
import HelpGuideModal from './components/HelpGuideModal.vue'
|
||||
import { useControllerNav } from '@/composables/useControllerNav'
|
||||
import { playKeyboardTypingSound } from '@/composables/useLoginSounds'
|
||||
import { useSpotlightStore } from '@/stores/spotlight'
|
||||
import { useCLIStore } from '@/stores/cli'
|
||||
import { useMessageToast } from '@/composables/useMessageToast'
|
||||
@@ -129,6 +130,10 @@ function onKeyDown(e: KeyboardEvent) {
|
||||
screensaverStore.activate()
|
||||
}
|
||||
}
|
||||
// Keyboard typing sound - plays on any character typed in inputs (global)
|
||||
if (isInput && e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
||||
playKeyboardTypingSound()
|
||||
}
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
Reference in New Issue
Block a user