Confirm or cancel ContentsDialog with Enter/Esc key