Hi, I have stumbled upon several problems with MidiKeyboardComponent. I have read all of the related topics I could find on this forum and I'm a bit surprised that none of those mentions the points bellow (so it might as well be that I am missing something).
1) getKeyStartPosition is supposed to return the position of the key specified with index. When using vertical keyboard facing right it doesn't really return y position of the key but rather (height - position). In other words for the "lowest visible" key (which is bottom-most) it returns 0. I suppose there is a good reason for this behaviour, but it should at least be mentioned in the doc.
2) There is a function getLowestVisibleKey() used in 1). The problem is that there is no getHighestVisibleKey() or getVisibleRange() so I don't see any simple way for iterating over visible keys. The only way that I can think of right now is to divide the keyboard height and key height and than guess the number of black keys in between.
3) I think getBlackKeyWidth would be really useful when writing custom pianoroll in order to synchronize with the keyboard. I could inspire myself with protected getKeyPosition but it might be good idea to just place it there. Or there might be a public version of getKeyPos, where w reference is a key width I believe...
4) For the 3) to work one would actually need something like bool isKeyBlack(int midiNoteNumber) which would also be useful for more use cases