Skip to content

Event handling, a couple of extra params and some classes - #2

Open
MattReimer wants to merge 5 commits into
musicjs:masterfrom
MattReimer:master
Open

Event handling, a couple of extra params and some classes#2
MattReimer wants to merge 5 commits into
musicjs:masterfrom
MattReimer:master

Conversation

@MattReimer

Copy link
Copy Markdown

Hey there,

I love your keyboard. It's simple, semantically designed and does exactly what I need.... except for a few things.

I added some event handling for KeyPress events:

  • onKeyClick: corresponds to onclick for any piano key
  • onKeyDown: corresponds to onmousedown for any piano key
  • onKeyUp: corresponds to onmouseup for any piano key

I also added a new parameter: nameOctaves which toggles the octave number in the key name.

Also there's a new namesMode called "both" that allows both sharp and flat to coexist.

Then I added some new classes so I can select octaves and also some convenience classes for white and black classes.

Don't feel you need to merge these but I thought they might be useful to give back.

Thanks for making such a great module!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant