Temporary repo for a frontend keyboard event bus feature PoC
Demo: https://vulcancreative.github.io/keyboard-event-bus-poc
Open src/app.tsx to see how to add a publisher and subscriber to the keyboard event bus.
This PoC consists of several moving parts:
- KeyboardEventBus class - this is where all event publishers and subscriber temporarily stored on the memory
- useShortcut hooks - this is a React hook to monitor key press and match it to the keyboard event publishers keys.
- getLocalizedKey helper - a helper to translate the keyboard key code into localized keyboard key based on user's keyboard layout map
yarn
yarn start