Comments (12)
Makes sense. I'll try to get to that soon.
from keymage.
Done! Please check if everything's ok for you. :)
from keymage.
Does not work, since you did not export anything. If you can't get this done, drop me a line, so I can assist
from keymage.
Hah, that's funny, sorry. Should be ok now.
from keymage.
Wow, that was fast... works like a charm 👍 Was in the process of switching to keymaster... but now I'm back.
from keymage.
Cool, thanks for feedback, and making me feel that my work is not useless! Hope it'll serve you well, but if anything - don't hesitate to open an issue. :) Or send a pull request FWIW. ;)
from keymage.
As far as I can say from currently having one key binding in my App, your module works great 👯
Keeping calm when called in node-env would be nice to have. Currently I have to shim this out in my isomorphic application
global.window = {
addEventListener: function(){}
};
global.navigator = {
userAgent: ''
};
from keymage.
I've made to ignore navigator, but then I'm really not sure what to do with window
. Probably just ignoring it is fine... Maybe I should issue a warning or something?
from keymage.
I just wonder if that will make someone's life harder by not reporting this error properly.
from keymage.
maybe I handle this myself. But just in case you want to handle this too, this will do the trick:
if (typeof window !== 'undefined') {
window.addEventListener('keydown', dispatch, false);
}
from keymage.
Yeah, that's understandable (I handled navigator
this way), but it's just I'm worried it'll prevent someone from discovering what is the problem. So I think it's better for your app to just explicitly handle this problem, than for keymage to silently not work in an environment which is not suitable.
from keymage.
yeah sounds reasonable!
from keymage.
Related Issues (13)
- Does not fully override browser hotkeys HOT 5
- Make bindings for blessed HOT 1
- Add meta HOT 3
- Disable while text field is focused? HOT 5
- Use with specific DOM element, don't attach to window HOT 4
- Support attaching to keypress and not only keydown HOT 16
- Can't bind listener for the "Shift" key only HOT 2
- KeyboardEvent.keyCode deprecated HOT 1
- Add a tag HOT 9
- Travis-CI integration HOT 1
- Allow to unbind key events HOT 3
- Return prepared unbind()-function from keymage() HOT 2
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 keymage.