getCommandIdAt
Returns the command id at the specified |index| or -1 if not found due to invalid range or the index being a separator.
Returns the command id at the specified |index| or -1 if not found due to invalid range or the index being a separator.