Giter Site home page Giter Site logo

keymage's Issues

Add meta

The code mentions some weird modifier called alt. For those of us still using emacs, this is an insult.

Please rename to meta so that it works cross-platform (TM).

Support attaching to keypress and not only keydown

In some occasions, it's desired to be able to attach to the keypress event instead of keydown, especially since some special character combinations are not consistent across devices.

I guess the consistent place to define this in keymage would be the options object.

Travis-CI integration

Make tests run under phantomjs. wru supports that, but how do I have single file with tests running in both phantomjs and regular browser?

Publish to NPM

It would be great if keymage was published to NPM so Browserify can easily fetch the files.

Allow to unbind key events

Is there a way to unbind key events.

I looked into the tests and the code but didn't found anything.

Is it even possible?

Does not fully override browser hotkeys

I found this on reddit. Keymage is a really neat tool. I was testing this out and noticed that 'defmod-j c', which you have for the index.html does not work on my browser. Ctrl + J is the native hotkey for downloads and when using that key combination it opens the downloads tab on chrome.

Keymage does work on single combinations modifier + key (e.g. ctrl-q) and it does properly executes preventDefault. When testing ctrl-j on the dummy index.html it does override the opening of the downloads tab.

Andrew

Google Chrome 23.0.1271.95 (Official Build 169798) m
OS Windows
WebKit 537.11 (@135931)
JavaScript V8 3.13.7.5
Flash 11.5.31.2
User Agent Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11

Use with specific DOM element, don't attach to window

I'm trying to replace combokeys with keymage in a project, since it's considerably smaller when not minified (minfied as well, OFC). However, to support the use case, keymage would need to attach to a specific DOM element and not window, and additionally support cleaning up.

Implementation should be fairly easy, it's mainly a question of what the new API should be and if this is a desired feature(?). Some solutions that come to mind will probably break existing code that assumes keymage would be attached to the window and immediately available.

Return prepared unbind()-function from keymage()

It's a increasingly popular pattern to return an undo/unbind function as a result to a do/bind function call.

var unbindOk = keymage("o k", ...);

// Later
unbindOk();

The unbindOk also acts as a reflectional variable to verify whether the binding has happened before, for example to prevent duplicate bindings.

Add a tag

Hi there, can you tag the latest commit? So we could add keymage to cdnjs. Thanks!

Make bindings for blessed

Hey, nice library! It would be really cool if I could use this with chjj/blessed, which as you may know is a TUI library like ncurses. Is there any way to change the key listener backend to something other than the browser?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.