What hotkey?
I am the go-to tech geek in my family. In addition to (happily) being internationally on-call 24/7 for family IT support (I love you grandma), I am also the recipient of everyone's app ideas -- and there have been some great ones, too! All the same, I was proud to have my personal eureka moment when I determined my own. I present, What Hotkey? Or... Whatkey? Or perhaps... Whotkey. Wotkey?
A hotkey visualisation app, and great candidate for my first Redux app. An issue I had encountered before was state management across a React app, specifically child components informing distant cousin components. In the past I used a messy combination of Context, Refs, and parent-passing-functions-to-children to hoist the data up to parents and across the application. Yuck.
Enter Redux, the answer to my global state management issues. The app works in the following way:
- On keypress, record e.key values in Store. These values resemble {pressedKey: x, shiftKey: false, etc.}
- Search config data for match (pressed key + modifier(s))
- Display hotkey description if any, and allow user to edit description of active key combination
It's currently just a working demo of the above, and in time I look forward to adding:
- Profiles for storing configs
- Shared config repository
- Keyboard visualisation