Comments (3)
Hmmm, unless you are using the "is_exclusive" property on both combos, they should both be firing. What do you mean exactly by "fires both events separately"? Could you give a code sample of your combo definitions.
from keypress.
Single Key shortcut:
keypress.combo('z', function(event) { console.log('z'); }, false);
Combination Shortcut:
keypress.combo('meta z', function(event) { console.log('meta z'); }, false);
Works fine in every browser except for IE.
Pressing "CTRL Z" outputs both "z" and "meta z" to the console in IE one after the other. I'll be honest, I haven't yet tried creating the combos using the other methods, but see it as a bug in IE.
from keypress.
I used the register_combo method and this fixed my bug, just a side note: you're missing a coma in your example on the website: after the "is_exclusive" : false line.
My apologies regarding the "non-bug", your keypress library is by far the best I've come across when it comes to key capturing.
from keypress.
Related Issues (20)
- Support for mobile
- Published node-package 2.1.4 is broke HOT 1
- how to make a key pressed and won't interrupt by other keys before it keyup ? HOT 1
- bug: meta combos are not being unregistered HOT 3
- jQuery integration HOT 1
- calling "register_combo" with Typescript needs to initialize all the parameters HOT 2
- simple_combo('r') fires even with modifier keys. HOT 1
- basic key binding not working as expected
- TypeError: window.keypress is undefined HOT 3
- `simple_combo` doesn't work in a bootstrap modal
- Using with Meteor [ TypeError: Keypress.Listener is not a constructor ] HOT 3
- Delay HOT 3
- location support?
- how to distinguish inputs from multiple keyboards? HOT 1
- ALT CTRL 1 works, but ALT 1 and CTRL 1 do not. HOT 5
- Blocked by EasyPrivacy HOT 1
- keycodes HOT 1
- Providing an "on_keydown" handler shouldn't stop the key from working inside inputs.
- Select all keyboard keys HOT 3
- Untrimmed key combination string silently causes issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keypress.