KeyPress doesn't get called when holding 3 keys but only with some specific combinations of keys



From my test it look like once there is two keys pressed the third one doesn’t trigger a Keypress event if the key code is and odd number.

I get this behaviour even with just the keypress and not even using keyStateChanged.

bool MainViewController::keyPressed (const KeyPress& key, Component * originatingComponent)

        DBG(key.getTextCharacter()<<" "<<key.getKeyCode());
        return true;

Since it does work with some keys but not with others I was thinking it could be a bug in Juce and not a limitation of some kind from the os. Currently only tested in OSX.



That’s an osx not a juce problem. Try it in a DAW or something.


It may actually be a limitation in the physical keyboard itself. Most PC keyboards have this limitation as far as I’ve experienced.

Experiment: Place the cursor in any text input field (e.g. a text editor) and hold down both the I and C keys. Now try hitting the keys W, E and R. You will probably not see the E key working as long as the I and C keys are held down.

I remember playing chords on my Amiga keyboard which did not have this limitation. Also, some wireless PC keyboards do not have this limitation either.


Hey thanks so much for your responses.

Yes of course I don’t know why I didn’t thought about those 2 simple test you guys just suggested.

Specially simple what Joachip said.It has the same behaviour
I was getting with Juce.

Very interesting thing to know anyway, now this little test is something that I’m going to want to try first every time I get my hands on a new keyboard. :slight_smile: