Only react to shortcut changes if the new shortcut is actually different

This was done to prevent the handler from being called many times when the
shortcut was set to the same value