Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keymaps regression #4173

Closed
bet4it opened this issue Jan 14, 2020 · 3 comments · Fixed by #4176
Closed

Keymaps regression #4173

bet4it opened this issue Jan 14, 2020 · 3 comments · Fixed by #4176

Comments

@bet4it
Copy link
Contributor

bet4it commented Jan 14, 2020

This bug was introduced in #3957.

We need to init Mousetrap with true as the second argument:
https://github.com/zeit/hyper/blob/d5d5bcc74ca8de4c568c410fe042b5ef353baf67/lib/containers/hyper.js#L58
But we remove this argument after #3957:
https://github.com/zeit/hyper/blob/a1eb84d8a7c277ddf29d739e46cde14c4c14b4f7/lib/containers/hyper.tsx#L62

Refer: ccampbell/mousetrap#400

@bet4it
Copy link
Contributor Author

bet4it commented Jan 14, 2020

@LabhanshAgrawal

@LabhanshAgrawal
Copy link
Collaborator

Oh, iirc this was changed after adding the mousetrap type definitions

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/f4f29cb4f9f25905a01bfa319a434378282dc6c5/types/mousetrap/index.d.ts#L13

Since it only listed 1 argument of Element type (optional which defaults to document) I removed those and tested, but didn't face any issues. I see, we are using a fork of Mousetrap which adds the capture option.

We can change this, and add a type declaration override in the ext-modules file.

P.S. what issue is caused by this? I didn't face any.

@bet4it
Copy link
Contributor Author

bet4it commented Jan 14, 2020

Some keymaps of plugins will not work. You can try hyper-pane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants