* Handle Toolbar hotkey events - can come from a source like the MacBook Touch Bar. * @param hotkey Hotkey code */
| 2634 | * @param hotkey Hotkey code |
| 2635 | */ |
| 2636 | void HandleToolbarHotkey(int hotkey) |
| 2637 | { |
| 2638 | assert(HasModalProgress() || IsLocalCompany()); |
| 2639 | |
| 2640 | Window *w = FindWindowById(WC_MAIN_TOOLBAR, 0); |
| 2641 | if (w != nullptr) { |
| 2642 | if (w->window_desc.hotkeys != nullptr) { |
| 2643 | if (hotkey >= 0 && w->OnHotkey(hotkey) == ES_HANDLED) return; |
| 2644 | } |
| 2645 | } |
| 2646 | } |
| 2647 | |
| 2648 | /** |
| 2649 | * Handle keyboard input. |
nothing calls this directly
no test coverage detected