-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: Update shortcutkey logic #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Implement shorcutManager module to manage keyboard shortcuts - Prevent shortcuts from triggering inside input, textarea, and content-editable elements (except for Enter key) - Provide methods to register shortcuts, handle keydown events, and clear registered shortcuts - Add createShortcutFromEvent function to generate shortcut keys from KeyboardEvent.
- Implement usePageShortcutKeys custom hook to manage keyboard shortcuts at the page level. - Utilize useEffect to register and clean up the keydown event listener when the page is mounted/unmounted. - Call clearShortcuts on unmount to ensure shortcuts are properly removed.
- Update keyboard shortcuts for invite button, start game button, settings dropdowns, and chat activation using the new shortcut system
- Update keyboard shortcuts for redo, undo, color change, tool change, using the new shortcut system
- Each component manages its own shortcuts and cleans them up when unmounted
π Storybook preview deployed to: Visit Storybook Preview |
π¦ Lighthouse Audit ResultsMainPageCategory Scores
Core Web Vitals & Metrics
LobbyPageCategory Scores
Core Web Vitals & Metrics
|
π Storybook preview deployed to: Visit Storybook Preview |
π¦ Lighthouse Audit ResultsMainPageCategory Scores
Core Web Vitals & Metrics
LobbyPageCategory Scores
Core Web Vitals & Metrics
|
e.preventDefault(); | ||
action(); | ||
for (const config of configs) { | ||
if (config.key.toLowerCase() === shortcutKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
κ³ μνμ
¨μ΅λλ€ μ μλ..! :D
λ€λ¦μ΄μλλΌ configsλ₯Ό λ°°μ΄μ΄ μλλΌ ν€-μ ννμΈ Map λ±μΌλ‘ λ겨λ°μΌλ©΄ ν€λ€μ΄ μ΄λ²€νΈ λ°μν λλ§λ€ 루ν λμ§ μκ³ λ°λ‘ μνλ configμ μ κ·Όν μ μμ§ μλ ν΄μμ. νΉ λ°°μ΄λ‘ νμ λ€λ₯Έ μ΄μ κ° μμκΉμ?
(+) μ΄μλ μλλΌμ μ΄νλ‘λΈ νμ΅λλ€ :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
κ³ μλ§μΌμ ¨μ΅λλ€!
π μμ λ΄μ©
closes #46
π‘ μμΈν μ€λͺ
λ¨μΆν€ κΈ°λ₯
LobbyPage
GameRoomPage
Modal ν¬μ»€μ± μ κ±°
π μ°Έκ³ μλ£ & ꡬν κ²°κ³Ό (μ ν)
λ‘λΉνμ΄μ§
κ²μνμ΄μ§
π’ 리뷰 μꡬ μ¬ν (μ ν)
π© νμ μμ (μ ν)
β μ ν 체ν¬λ¦¬μ€νΈ