saas-js / saas-ui

The React component library for startups, built with Chakra UI.
https://saas-ui.dev
MIT License
1.36k stars 131 forks source link

UseHotKeys: Have to press Ctrl every time when combined with other keys #250

Open haroonriaz-15 opened 3 months ago

haroonriaz-15 commented 3 months ago

Description

I am using useHotKeys with Ctrl and arrow keys combination, I was expecting to keep the Ctrl key pressed and then press arrowKeys, But currently I have to press Ctrl key again each time when I have to press the arrowKey.

Link to Reproduction

No response

Steps to reproduce

Implement a combination of Ctrl+ arrow Keys, and keep Ctrl pressed and then press arrow Keys one by one, you'll notice it will only work for first arrow key press for other arrow keys it considers arrow Key as individual press and Ctrl prop is false after first time, you have to release the Ctrl key and press again each time

Saas UI Version

2.8.2

Chakra UI Version

No response

Browser

Google Chrome

Operating System

Additional Information

No response

linear[bot] commented 3 months ago

SUI-514 UseHotKeys: Have to press Ctrl every time when combined with other keys