#ifndef RME_HOTKEY_MANAGER_H #define RME_HOTKEY_MANAGER_H #include #include #include #include #include "ext/pugixml.hpp" #include class HotkeyManager { public: HotkeyManager(); struct HotkeyInfo { std::string key; std::string description; std::function callback; }; void RegisterHotkey(const std::string& name, const std::string& defaultKey, const std::string& description, std::function callback); void LoadHotkeys(); void SaveHotkeys(); void ShowHotkeyDialog(wxWindow* parent); std::map GetAllHotkeys() const; // Convert between wxKeyCode and string representation static wxString KeyCodeToString(int keyCode); static int StringToKeyCode(const wxString& keyString); private: std::map hotkeys; std::set currentModifiers; void ApplyHotkeys(); void LoadHotkeysFromNode(pugi::xml_node& node); void UpdateHotkeyString(wxTextCtrl* hotkeyEdit); // Helper methods for hotkey dialog void UpdateHotkeyList(); bool ValidateHotkeys(); }; extern HotkeyManager g_hotkey_manager; #endif // RME_HOTKEY_MANAGER_H