Fix shortcut key handling in dialog.