Support multiple controls per keyboard shortcut.

Also switches to O(1) keyboard shortcut lookups instead of O(n). Fixes Bug #1081137.