feat: change shortcuts to shift

This commit is contained in:
MAZE 2024-04-24 13:29:28 +03:30
parent 2f84268017
commit 837826fbc1
4 changed files with 9 additions and 9 deletions

View file

@ -16,7 +16,7 @@ export function Notepad({ open }: NotepadProps) {
active={!!note.length} active={!!note.length}
icon={<MdNotes />} icon={<MdNotes />}
label="Notepad" label="Notepad"
shortcut="Alt + N" shortcut="Shift + N"
onClick={open} onClick={open}
/> />
); );

View file

@ -16,7 +16,7 @@ export function Pomodoro({ open }: PomodoroProps) {
active={running} active={running}
icon={<MdOutlineAvTimer />} icon={<MdOutlineAvTimer />}
label="Pomodoro" label="Pomodoro"
shortcut="Alt + P" shortcut="Shift + P"
onClick={open} onClick={open}
/> />
); );

View file

@ -16,7 +16,7 @@ export function Share({ open }: ShareProps) {
disabled={noSelected} disabled={noSelected}
icon={<IoShareSocialSharp />} icon={<IoShareSocialSharp />}
label="Share Sounds" label="Share Sounds"
shortcut="Alt + S" shortcut="Shift + S"
onClick={open} onClick={open}
/> />
); );

View file

@ -2,6 +2,7 @@ import { useState } from 'react';
import { IoMenu, IoClose } from 'react-icons/io5/index'; import { IoMenu, IoClose } from 'react-icons/io5/index';
import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
import { useHotkeys } from 'react-hotkeys-hook'; import { useHotkeys } from 'react-hotkeys-hook';
import { AnimatePresence, motion } from 'framer-motion';
import { import {
ShuffleItem, ShuffleItem,
@ -16,10 +17,9 @@ import { Divider } from './divider';
import { ShareLinkModal } from '@/components/modals/share-link'; import { ShareLinkModal } from '@/components/modals/share-link';
import { PresetsModal } from '@/components/modals/presets'; import { PresetsModal } from '@/components/modals/presets';
import { Notepad, Pomodoro } from '@/components/toolbox'; import { Notepad, Pomodoro } from '@/components/toolbox';
import { fade, mix, slideY } from '@/lib/motion';
import styles from './menu.module.css'; import styles from './menu.module.css';
import { AnimatePresence, motion } from 'framer-motion';
import { fade, mix, slideY } from '@/lib/motion';
export function Menu() { export function Menu() {
const [isOpen, setIsOpen] = useState(false); const [isOpen, setIsOpen] = useState(false);
@ -31,11 +31,11 @@ export function Menu() {
const variants = mix(fade(), slideY()); const variants = mix(fade(), slideY());
useHotkeys('alt+m', () => setIsOpen(prev => !prev)); useHotkeys('shift+m', () => setIsOpen(prev => !prev));
useHotkeys('alt+n', () => setShowNotepad(prev => !prev)); useHotkeys('shift+n', () => setShowNotepad(prev => !prev));
useHotkeys('alt+p', () => setShowPomodoro(prev => !prev)); useHotkeys('shift+p', () => setShowPomodoro(prev => !prev));
useHotkeys('shift+alt+p', () => setShowPresets(prev => !prev)); useHotkeys('shift+alt+p', () => setShowPresets(prev => !prev));
useHotkeys('alt+s', () => setShowShareLink(prev => !prev)); useHotkeys('shift+s', () => setShowShareLink(prev => !prev));
return ( return (
<> <>