next background on right arrow

This commit is contained in:
Georgi Gardev
2023-11-20 12:15:13 +02:00
parent fb649c3f0c
commit 0c7a8aee45

View File

@@ -15,7 +15,7 @@ export default function Home() {
const searchProviders = createSearchProviders();
const [searchTerm, setSearchTerm] = createSignal('');
const { categories, apps } = createCategories();
const { currentBackground } = useSettings();
const { currentBackground, onNextBackground } = useSettings();
const { activeCategory, selectCategory, resetCategory } = createActiveCategory();
@@ -44,6 +44,10 @@ export default function Home() {
function handleKeypress(e: KeyboardEvent) {
switch (e.key) {
case 'ArrowRight': {
onNextBackground();
break;
}
case 'Escape': {
document.getElementById('search')?.blur();
resetCategory();