Google Chrome: maximum of 4 chrome.commands allowed?

This is a very old question but I had a hard time finding information anywhere and this question was the top google search result for a few of my searches, so I'll add some info here.

Despite the wordage of the error, you can have as many commands as you want. This error actually refers to the number of "suggested_key" objects you can have. Chrome's documents specify the following:

An extension can have many commands but only 4 suggested keys can be specified.

So in your manifest, while you can specify additional commands, you can only give 4 of them the "suggested_key" object

"commands": {
    "contains-suggested-key": {
        "suggested_key": {
            "default": "Ctrl+Shift+Y",
            "mac": "Command+Shift+Y"
        },
        "description": "Toggle feature foo"
      },
      "NO-suggested-key": {
          "description": "user must specify shortcut keys for this from the extensions page"
      }
}

I have looked at source code and figured out following lines of code.

constant declared for error message in extension_manifest_constants.cc

const char kInvalidKeyBindingTooMany[] =
    "Too many commands specified for 'commands': The maximum is *.";

constant declared for maximum number of commands in extension.cc

// The maximum number of commands (including page action/browser actions) an
// extension can have.
const size_t kMaxCommandsPerExtension = 4;

and validation code in extension.cc looks for following check

if (commands - > size() > kMaxCommandsPerExtension) { 
      * error = ErrorUtils::FormatErrorMessageUTF16(
        errors::kInvalidKeyBindingTooMany,
        base::IntToString(kMaxCommandsPerExtension));
        return false;
}

Google developers marked constant to 4, so you can not add more than 4 commands for now.

Work Around:

Star this issue and look for developers response, if you really want to go with commands, you have to create multiple extensions with commands set of 4 for each.

Let me know if you need more information.