How to disable developer shortcuts?

The “removing all shortcuts” snippet is wrong. You need to use for .. of instead of for ... in. Like this:

// Removing all shortcuts at once
for (binding of shortcut.all_shortcuts()) {
  shortcut.remove(binding.keys.join(' '));
}

I’ve added it to a JavaScriptExtension on our theme. It seems that the script is executed to early or the shortcuts were added again.

So my working solution for now is something like this:

function removeShortcuts() {
  shortcut.remove('alt a');
  shortcut.remove('alt s');
}

document.addEventListener("DOMContentLoaded", removeShortcuts);
document.observe("xwiki:dom:loaded", removeShortcuts);
document.observe("xwiki:dom:updated", removeShortcuts);