yeah, that is totally a learned behavior
dogs are pack animals that run completely on repeated ritual, with practice you can change the trigger from you grabbing the keys to grabbing a leash, you just have to be very aware and make sure that you follow the same pattern each time for a while, and they will easily catch on to the change.
Bookmarks