1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

MidiKeyboardComponent: Avoid adding binding for keycode zero

This commit is contained in:
reuk 2023-08-11 16:24:30 +01:00
parent 22db5c985d
commit d821f84d6e

View file

@ -32,11 +32,11 @@ MidiKeyboardComponent::MidiKeyboardComponent (MidiKeyboardState& stateToUse, Ori
{
state.addListener (this);
// initialise with a default set of qwerty key-mappings..
int note = 0;
// initialise with a default set of qwerty key-mappings.
const std::string_view keys { "awsedftgyhujkolp;" };
for (char c : "awsedftgyhujkolp;")
setKeyPressForNote ({ c, 0, 0 }, note++);
for (const char& c : keys)
setKeyPressForNote ({c, 0, 0}, (int) std::distance (keys.data(), &c));
mouseOverNotes.insertMultiple (0, -1, 32);
mouseDownNotes.insertMultiple (0, -1, 32);