Yes, you need both. Depending on what you're doing and how much needs to be done, you could run an alias from both events so that the code is only in one place instead of two places, but if it's only a little that is done, it's easier just writing the same thing in both events. Just remember that the events are not handled exactly the same.