core: split key command when the key is created (improve speed when executing commands of a key)