by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
John Coburn
@JohnC-80
Heya folks... I just opened chrisui/react-hotkeys#61 today since the FocusTrap wrapping element was not ideal for our project. I've got some other ideas for the issue as well that could be add-ons for the approach while keeping the current API intact.
Aleck Greenham
@greena13

Hey all, I am helping out to get react-hotkeys up-to-speed. I'll be focusing on getting the backlog of pull requests and issues resolved before refactoring the project to work with later versions of React and then making good on some of the promises for V1.

Please let me know if you have any input. A lot of stuff I'll be dealing with in these issues and PRs I have on passing familiarity with.

Aleck Greenham
@greena13
I've invited a few people here to discuss the next steps for the package. Please drop a message here if and when you arrive so we can start the conversation.
Jamsheed Kamardeen
@Heedster
I am here.
Aleck Greenham
@greena13

Hey, Jamhseed. This is probably going to be a somewhat asynchronous conversation. From what I understand, the people who have expressed interest in helping out are distributed across quite a few time zones. So I ask for your patience.

I am toying around at the moment with the Projects feature on github to try and capture and allocate the work that needs doing on the repository.

Jamsheed Kamardeen
@Heedster
Sure. What do you think I should start on? probably creating the HOCs?
Aleck Greenham
@greena13
If you made a start on the HOC, that would be great. We will need test coverage for the new HOC as well.
Jamsheed Kamardeen
@Heedster
sure
Aleck Greenham
@greena13
I haven't really thought about the particulars of naming and functionality, but I'm going to naively say at this point that a thin wrapper around the HotKeys component should do the job.
There is also an existing issue that you can resolve as part of your PR commit message, here: chrisui/react-hotkeys#63
Aleck Greenham
@greena13
Does anyone have experience with flow type definitions?
Jamsheed Kamardeen
@Heedster
I use them to some extend at my work.
Weihang Lo
@weihanglo
Hi everyone
It seems that React Team decide not to support Bower after React 16.1.0
https://github.com/facebook/react/releases/tag/v16.1.0
Should we follow up?
Charlie
@charliesbox

hi, one question: is there a way to handle global keys?

My problem is that I just have one keymap instance at root level, but when a form appear in the view, the listener stops working unless I click again in the root view

Luiza Pagliari
@lpagliari
@charliesbox there is: https://github.com/chrisui/react-hotkeys/issues/12#issuecomment-128278693. I had the same issue yesterday, just found it on the closed issues of the repo
Aleck Greenham
@greena13
@Heedster, would you be able to have a go at chrisui/react-hotkeys#75 if you have experience with defining flow type definitions?
@charliesbox, @lpagliari is correct - it seems historically attaching to window is the recommended way of creating global shortcuts. I think in the future we will create a nicer API wrapper around this.
@weihanglo I have been very tempted to drop bower support as it certainly complicates matters. The fact that React has dropped its support is a nice precedence.
Aleck Greenham
@greena13
I've created an issue to see if dropping Bower support will cause a major upset to those already consuming the package: chrisui/react-hotkeys#77
Roshan Choxi
@choxi
Hi. I'm trying to use react-hotkeys for a custom select menu inside of a form. The 'up' and 'down' arrow key bindings work as expected, but binding to 'enter' always submits the form unless I add event.preventDefault() into the enter handler. Any idea why that happens? I expected react-hotkeys to not propagate the event to the form (which is outside of my select component and outside of my HotKeys component).
Roshan Choxi
@choxi
Also, adding a return false instead of an event.preventDefault() to the enter handler works as well
vivian-eb
@vivian-eb
I have a PR out for the HotKeysHOC and could use some :eyes: !
ankit
@dholakiyaankit
Hello all, ctrl + t is not working, can you please tell me any hints/links to check for this?
Aleck Greenham
@greena13
@dholakiyaankit, are you still having issues?
vivian-eb
@vivian-eb
Commit up to 3ee514b with withHotKeys HOC works locally, but between 3ee514b and current master, the HOC stopped working :(
Aleck Greenham
@greena13
Strange. Do you have any idea why? It didn't break anything, which was all I tested before deploying.
Aleck Greenham
@greena13
@vivian-eb Can you please check HoC on https://github.com/greena13/react-hotkeys/releases/tag/v1.1.1 ? I think it may fix the issue you were seeing.
Robin Sandborg
@robinsandborg
Hey! I’m not having any success with the focused prop, I still need to tab once to enable my shortcuts, is there anything more than whats in the readme that I need to be doing?
Renato Marinho
@renatomarinho
This message was deleted
styks1987
@styks1987
Module not found: Error: Can't resolve './es/index.js' in node_modules/react-hotkeys
Just ran into this after installing
Error shows in the webpack build
Renato Marinho
@renatomarinho
This message was deleted
John Coburn
@JohnC-80
Coming back around to doing more work with Hotkeys in our app... I just opened a PR to add cross-env for those build commands to function on windows.
@greena13 If there are better ways to handle that, I'd gladly use them instead of adding a dependency. Here's the PR: #117
Jaroslav Páral
@JarekParal

Hi, I'm trying to use enzyme test in my app for checking if the shortcuts work in the app, but I couldn't find any way, how to test it with react-hotkeys. The react-hotkeys in app work properly but the tests couldn't check that.
I made test branch (JarekParal/kentico-onboarding-js@68b788c) where I'm testing the enzyme test without react-hotkeys and everything work (enzyme tests + shortcuts in app).

But when I have react-hotkeys in the app (JarekParal/kentico-onboarding-js@f97464b), the enzyme's simulate events are not catch by react-hotkeys. I tried to send all types of events: keypress, keydown, keyup + key, keyCode, which and nothing work.

Could you help me please?

Gregory Parsons
@gregorskii
Hi all, having two issues with this plugin @2.0.0-pre4, using global keys if I setup a component to render all available keys using const keyMap = getApplicationKeyMap(); that component renders before the keys are bound. Even if the GlobalHotKeys is defined higher in the tree.
So the keys end up being an empty object. Without a context provider there is no way to tell the display hotkeys component that the keys are now bound.
Also I have bound a key to command+shift+p and it triggers after the first time even on command+shift in 2.0.0
Gregory Parsons
@gregorskii
second I solved with a custom context
might be a good idea to change that getApplicationKeyMap process to be a context provider, or make it a listener /shrug
Aleck Greenham
@greena13
Hi @gregorskii, sorry to hear that you are having issues with react-hotkeys.
The getApplicationKeyMap() is still quite new, and it's very helpful to hear about different ways it's being used that I have previously tested. If you have the time, do you think you could file an issue that explains the problem you were having? It helps me better keep track of the work to be done on the project and to discuss possible solutions. Your suggestion of a context provider sounds like a good one.
Jordan Max
@jordantomax
@greena13 I'd like to get a version of react-hotkeys working locally. I have it forked and linked into my project, but I'm curious what your development workflow is?
For instance, what do you use to watch for changes?
Jordan Max
@jordantomax
Okay, I guess it's just build-es-development --watch
Jordan Max
@jordantomax
Still can't seem to generate new build to use within my codebase though hmm
R4VANG3R
@R4VANG3R
Hey how would you go about having multiplatform support (windows / macos)? Is there any OS detection?
Steven Lundy
@stevenlundy
I'm using GlobalHotKeys with allowCombinationSubmatches: true. I'm seeing weird behaviour when I assign shift+up and up to handlers. If I assign shift+up first, both shortcuts work. If I assign up first, shift+up doesn't fire. Is that expected?