GithubHelp home page GithubHelp logo

Comments (5)

kevinsqi avatar kevinsqi commented on June 18, 2024

Yeah, this is an open issue. I investigated this way back and I recall, at least on mac, an issue with the "ctrl" key being registered as pressed when a lot of keys are pressed down at once, which causes notes to not register due to this line of code, and potentially also just keydown events not firing as expected.

I'll have to dig into it again. Any help on investigating this is welcome!

from react-piano.

kevinsqi avatar kevinsqi commented on June 18, 2024

I noticed this also happens when attempting to press down any 3 keys corresponding to sequential half steps (e.g. D, D#, E).

from react-piano.

kevinsqi avatar kevinsqi commented on June 18, 2024

This appears to not be specific to this component or to React - I created a codepen that demonstrates the issue for vanilla JS: https://codepen.io/kevinqi/pen/ZPxGoa

from react-piano.

kevinsqi avatar kevinsqi commented on June 18, 2024

ahh, it appears that this could be an issue with key rollover (a property of the keyboard), not anything JS related. See https://apple.stackexchange.com/a/70430/149027. If this is the issue, then it can't be fixed - it's an inherent limitation of the keyboard you use.

Both my macbook pro keyboard and mac magic keyboard, for example, are unable to register "s" + "e" + "d" when pressed down simultaneously. However, when I tested with a Das keyboard, it was able to register all 3 simultaneously.

@SeunghunSunmoonLee you mentioned that "I found other piano examples be able to do [6 keys at the same time]". Could you link me to an example piano where that works?

from react-piano.

kevinsqi avatar kevinsqi commented on June 18, 2024

Going to close this given that I think this is a hardware keyboard rollover issue and not related to the library, but if anyone can demonstrate otherwise, don't hesitate to reopen the issue.

from react-piano.

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.