Ensure keypress/keydown event handlers are removed when the scope is destroyed