GithubHelp home page GithubHelp logo

gadfly361 / re-pressed Goto Github PK

View Code? Open in Web Editor NEW
162.0 9.0 14.0 8.07 MB

re-pressed is a clojurescript library that handles keyboard events for re-frame applications.

License: MIT License

HTML 1.22% Clojure 98.78%
reagent re-frame clojurescript cljs keyboard keyboard-events keypress keyup keydown

re-pressed's People

Contributors

gadfly361 avatar heyarne avatar jmarca avatar leavenha avatar reefersleep avatar simionion avatar superstructor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

re-pressed's Issues

Add ability to optionally listen to keys in select, input or textareas (currently they are always ignored)

Currently, all keys are ignored if pressed inside of a select, input, or textarea. However, it would be useful to be able to record and dispatch off of certain keys (like enter, arrows, or tab, etc.).

I think the solution here is to either:

  • add a whitelist of keys that are never ignored, like {:always-listen-keys [{:which 13}]
  • add flags to listen to select, input, and textarea, like {:ignore-select? false}, where it defaults to true.

re-frame: Subscribe was called outside of a reactive context

Hi, I am not sure if it is a bug. But whenever I press keys in an input element, a warning re-frame: Subscribe was called outside of a reactive context occurs.

To reproduce:

  1. run command lein new re-frame <app-name> +re-pressed
  2. change main-panel in views.cljs to
(defn main-panel [] [:input])
  1. press a key in the input element

Key sequences are incorrectly compared to most recent keys in reverse order

When using a key sequence to dispatch an event, the key sequence is incorrectly compared against the most recent keys in reverse order

For example, this

[
 [ [:some-event-id]
   [{:which 72} ;; h
    {:which 87} ;; w
]

Would incorrectly dispatch [:some-event-id] when w then h is pressed, and not when h and then w is pressed.

Remove jquery from dependencies

Thank you for this library but to include jquery to modern react app is not the best practice. This lib will be nicer for me when it doesn't not depend on jquery

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.