Scales, layout vectors and note names are all derived from the tuning: a fifth stays the best fifth the tuning offers, and names come from the chain of fifths, falling back to ups-and-downs (C↑) for degrees no accidental can reach. Tunings that do not repeat at the octave number their degrees instead.
A MIDI controller plays alongside the pointer and the computer keyboard, and the sustain pedal works. A second computer keyboard cannot be told apart from the first: browsers merge all of them into one stream and give no device identity.
Keys are matched by physical position (KeyboardEvent.code), so the default rows already work on QWERTY, QWERTZ, AZERTY, Dvorak and Colemak hardware. The labels below show what each physical key produces on your layout once you press it. To remap: click a cell, then press the key you want there. Backspace clears a cell, Esc cancels. Each row is offset by the layout's row interval; cells ascend left to right by its column interval. The outer columns and the function row only reach the instrument while ⌨ Capture is on — otherwise Tab, Enter and F-keys belong to the browser. Space is reserved for sustain, so mapping it here will not play a note.