Shell modal dialogs can take their action on a certain key's
key-release-event. For example on <enter> the affirmative action is
usually run.
Make sure that the key was also pressed on the dialog and we're not
seeing a spurious key-release-event from a key that was pressed before
the dialog was displayed. Rebased original patch for master by Stef
Walter to version 3.6.3.
https://bugzilla.gnome.org/show_bug.cgi?id=692937