Comments (5)
Not really right now, no, but I would love to see a contribution!
How do you imagine this to work? I guess it's not worth it enabling it for everyone, plus this will break users of library... Maybe an opt-in process, call keymage.preventOnInput()
to do that? Any other ideas?
from keymage.
Would this work by attaching the default keyhandlers to a specific scope and enable/disable those with the input/textarea focus and blur events?
from keymage.
Sure, it will, if a bit inconveniently. :) I remember someone (keymaster maybe?) disabling all hotkeys on inputs, but that was one of the reasons I wrote this library - I needed hotkeys working while editing textarea.
from keymage.
Can we unregister listeners in nested scopes?
keymage('a', 'shift ?', function() { ... }); // capture ?
keymage('a', 'myTextInput', 'shift ?', undefined); // in a text scope so let it through
from keymage.
I love this idea! If you're up to implementing that, you're very welcome! If not, I guess I'll get to that sooner or later, but no real estimates right now, sorry. :)
from keymage.
Related Issues (13)
- Does not fully override browser hotkeys HOT 5
- Make bindings for blessed HOT 1
- Add meta HOT 3
- 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
- Publish to NPM HOT 12
- 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.