yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
platform_keys.h
Go to the documentation of this file.
1#ifndef YAZE_APP_GUI_CORE_PLATFORM_KEYS_H
2#define YAZE_APP_GUI_CORE_PLATFORM_KEYS_H
3
4#include <string>
5#include <vector>
6
7#include "imgui/imgui.h"
8
9namespace yaze {
10namespace gui {
11
16enum class Platform {
18 kMacOS,
19 kLinux,
20 kWebMac, // WASM running on macOS browser
21 kWebOther, // WASM running on non-macOS browser
22};
23
31
35bool IsMacPlatform();
36
41const char* GetCtrlDisplayName();
42
47const char* GetAltDisplayName();
48
59std::string FormatShortcut(const std::vector<ImGuiKey>& keys);
60
67std::string FormatCtrlShortcut(ImGuiKey key);
68
75std::string FormatCtrlShiftShortcut(ImGuiKey key);
76
83const char* GetKeyName(ImGuiKey key);
84
85} // namespace gui
86} // namespace yaze
87
88#endif // YAZE_APP_GUI_CORE_PLATFORM_KEYS_H
const char * GetCtrlDisplayName()
Get the display name for the primary modifier key.
std::string FormatCtrlShiftShortcut(ImGuiKey key)
Convenience function for Ctrl+Shift+key shortcuts.
Platform
Runtime platform detection for display string customization.
const char * GetKeyName(ImGuiKey key)
Get the ImGui key name as a string.
Platform GetCurrentPlatform()
Get the current platform at runtime.
std::string FormatShortcut(const std::vector< ImGuiKey > &keys)
Format a list of ImGui keys into a human-readable shortcut string.
bool IsMacPlatform()
Check if running on macOS (native or web)
const char * GetAltDisplayName()
Get the display name for the secondary modifier key.
std::string FormatCtrlShortcut(ImGuiKey key)
Convenience function for Ctrl+key shortcuts.