mousetrap icon indicating copy to clipboard operation
mousetrap copied to clipboard

Simple library for handling keyboard shortcuts in Javascript

Results 101 mousetrap issues
Sort by recently updated
recently updated
newest added

Consider this snippet: ```js class TestComponent extends React.Component { handleInputKeyDown(e) { e.stopPropagation(); console.log("input key down", e.key); } handleWrapperKeyDown(e) { e.stopPropagation(); console.log("wrapper key down", e.key); } componentDidMount() { Mousetrap(this.wrapper).bind('esc', this.handleWrapperKeyDown, 'keydown');...

[The mousetrap npm](https://www.npmjs.com/package/mousetrap) has 676 kB in a local. Files in the `tests` can be removed in the distribution packages. ``` $ du -hd1 node_modules/mousetrap 508.0K node_modules/mousetrap/tests 92.0K node_modules/mousetrap/plugins 676.0K...

Buttons are primarily used as form elements, behaving essentially as inputs. For consistency's sake, we should treat them as such and not fire the callback when the event target is...

Hi, Is it possible to get a list of bound keys via the API ?

Hi. I have a gallery. Every photo in the gallery have unique numbers. If I type 25, I want to go to photo 25. But instead, it goes to photo...

Intended behavior: enable shortcut while user is in text area (in focus) Attempted solution: ``` ``` Reference: [Section I in the docs](https://craig.is/killing/mice) Expected: Shortcut clicks button Actual: Nothing happens There's...

I have a timer that I toggle through Mousetrap pressing the space bar in an Angular application. here there is some code: ``` timeForm = new FormGroup({ minutes: new FormControl(0,...

https://prnt.sc/va75u4 I tried the npm way, but what i see is nyan cat. it's rainbow!