Git Product home page Git Product logo

Comments (6)

RobertWHurst avatar RobertWHurst commented on August 25, 2024 1

This should be fixed now. I added a test case as well. Let me know if things are working for you now. If not please follow up and I'll have another look 👍

from keyboardjs.

boldenburg avatar boldenburg commented on August 25, 2024

@ianshade this seems to be a bug, you can get the behavior you want by passing an empty releaseHandler to bind()

keyboardJS.bind('escape', function(e) {
	e.preventRepeat();
	console.log("pressed escape");
}, function(e) {
	
});

from keyboardjs.

pycraft114 avatar pycraft114 commented on August 25, 2024

@boldenburg Wouldn't it be better not to pass unnecessary releaseHandler?

from keyboardjs.

boldenburg avatar boldenburg commented on August 25, 2024

Unfortunately it's the nature of bugs to force us into what appears to be unnecessary behavior.

from keyboardjs.

andrewstart avatar andrewstart commented on August 25, 2024

A bug in same theme: the preventRepeatByDefault parameter seems to block the press callback altogether, so manually calling preventRepeat() and supplying a no-op release handler is the only way to go.

from keyboardjs.

RobertWHurst avatar RobertWHurst commented on August 25, 2024

Hmm, this is a crappy bug. Looking into it.

from keyboardjs.

Related Issues (20)

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.