Hotfix for keyboard nav in prefs

Fixed tab order, and set cancel button so user can cancel dialog by
pressing esc.