calesce / redux-slider-monitor

A custom monitor for Redux DevTools to replay recorded Redux actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Global key handler

danielkcz opened this issue · comments

Well I don't think this is a good idea. I have like a text editor in my app and suddenly I cannot even type a space because you eat it up in there :) Same for those arrow keys.

Edit: Perhaps there should be a global key first to enable/disable these keyboard shortcuts. Anything too simple is just problematic to collide with developed app.

Yeah I agree! I ported the existing LogMonitor component from the redux-devtools repo (which uses the global listener), so I just added my additional keyboard events there out of laziness 😄

c8bf788 You can now add (or not add) a keyboardEnabled prop into where you create your DevTools component. Let me know if this works for you.

@calesce Great! I think this is a good solution. This way I can setup my own key that would enable keyboard for this. Much better than something hard coded.

@FredyC it might be something to add a PR to upstream to devtools LogMonitor, although ctrl+h will have less collisions than the spacebar haha