| 727 | } |
| 728 | |
| 729 | static void HandleHotkeyDown(int key) { |
| 730 | struct HotkeyData* hkey; |
| 731 | cc_string text; |
| 732 | int i = Hotkeys_FindPartial(key); |
| 733 | |
| 734 | if (i == -1) return; |
| 735 | hkey = &HotkeysList[i]; |
| 736 | text = StringsBuffer_UNSAFE_Get(&HotkeysText, hkey->textIndex); |
| 737 | |
| 738 | if (!(hkey->flags & HOTKEY_FLAG_STAYS_OPEN)) { |
| 739 | Chat_Send(&text, false); |
| 740 | } else if (!Gui.InputGrab) { |
| 741 | ChatScreen_OpenInput(&text); |
| 742 | } |
| 743 | } |
| 744 | |
| 745 | static void HookInputBinds(void) { |
| 746 | Bind_OnTriggered[BIND_HIDE_FPS] = BindTriggered_HideFPS; |
no test coverage detected