| 628 | } |
| 629 | |
| 630 | void KeyConfigPrefs::OnHotkeyKeyDown(wxKeyEvent & e) |
| 631 | { |
| 632 | wxTextCtrl *t = (wxTextCtrl *)e.GetEventObject(); |
| 633 | |
| 634 | // Make sure we can navigate away from the hotkey textctrl. |
| 635 | // On Linux and OSX, it can get stuck, but it doesn't hurt |
| 636 | // to do it for Windows as well. |
| 637 | // |
| 638 | // Mac note: Don't waste time trying to figure out why the |
| 639 | // focus goes back to the prefs tree. Unless Voiceover is |
| 640 | // active, buttons on the Mac do not accept focus and all the |
| 641 | // controls between this one and the tree control are buttons. |
| 642 | if (e.GetKeyCode() == WXK_TAB) { |
| 643 | t->Navigate(e.ShiftDown() |
| 644 | ? wxNavigationKeyEvent::IsBackward |
| 645 | : wxNavigationKeyEvent::IsForward); |
| 646 | return; |
| 647 | } |
| 648 | |
| 649 | t->SetValue(KeyEventToKeyString(e).Display()); |
| 650 | } |
| 651 | |
| 652 | void KeyConfigPrefs::OnHotkeyChar(wxEvent & WXUNUSED(e)) |
| 653 | { |
nothing calls this directly
no test coverage detected