dsp on/off shortcuts not working on international keyboards
Today I noticed that the dsp on shortcut is not working on the German keyboard where the /
character is on a shifted key. Digging into this I also found that on the French keyboard both /
and .
are on shifted keys and neither of them works in purr-data. In the Tcl GUI (in both vanilla and pd-l2ork) these all work as intended.
These keyboard shortcuts are quite important (especially the dsp off shortcut) and they seem to be a kind of de facto standard (if I recall correctly, they also work the same way in SuperCollider at least). So they are usually among the very first shortcuts that I teach to the students.
Alas, I can't find anything in the nw.js docs about localization of keyboard shortcuts which happen to be punctuation. It does work with some keys (e.g., Ctrl+ +/- do the right thing on my German keyboard), but not with these keys.
The only way I found to work around this (for the German keyboard, where /
is the shifted 7
key) is by changing the corresponding entry in pd_menus.js as follows:
media_menu.append(m.media.audio_on = new gui.MenuItem({
label: l("menu.audio_on"),
key: "7",
modifiers: cmd_or_ctrl + "+shift",
tooltip: l("menu.audio_on_tt")
}));
But this is an awful kludge, and I'd have to reapply it every time I update the purr-data package. Any better idea?