Escape key should only close Dropdown

fixes #14646
Why switch to `keyCode` from `which`? I mean, `keyCode` should always be defined on a `keydown` event but `which` is normalized by jQuery.