mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Try adding tilde key to hotkey action
This commit is contained in:
parent
98f3f51ba9
commit
b25c1250e5
|
|
@ -160,7 +160,9 @@ enum class HotkeyType {
|
||||||
Key_NumpadMultiply,
|
Key_NumpadMultiply,
|
||||||
Key_NumpadDivide,
|
Key_NumpadDivide,
|
||||||
Key_NumpadDecimal,
|
Key_NumpadDecimal,
|
||||||
Key_NumpadEnter
|
Key_NumpadEnter,
|
||||||
|
|
||||||
|
Key_Tilde,
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|
|
||||||
|
|
@ -555,6 +555,9 @@ static std::unordered_map<HotkeyType, long> keyTable = {
|
||||||
{HotkeyType::Key_8, XK_8},
|
{HotkeyType::Key_8, XK_8},
|
||||||
{HotkeyType::Key_9, XK_9},
|
{HotkeyType::Key_9, XK_9},
|
||||||
|
|
||||||
|
// Other
|
||||||
|
{HotkeyType::Key_Tilde, XK_asciitilde},
|
||||||
|
|
||||||
{HotkeyType::Key_F1, XK_F1},
|
{HotkeyType::Key_F1, XK_F1},
|
||||||
{HotkeyType::Key_F2, XK_F2},
|
{HotkeyType::Key_F2, XK_F2},
|
||||||
{HotkeyType::Key_F3, XK_F3},
|
{HotkeyType::Key_F3, XK_F3},
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,14 @@ bool MacroActionHotkey::_registered = MacroActionFactory::Register(
|
||||||
{MacroActionHotkey::Create, MacroActionHotkeyEdit::Create,
|
{MacroActionHotkey::Create, MacroActionHotkeyEdit::Create,
|
||||||
"AdvSceneSwitcher.action.hotkey"});
|
"AdvSceneSwitcher.action.hotkey"});
|
||||||
|
|
||||||
const static std::map<MacroActionHotkey::Action, std::string> actionTypes = {
|
static const std::map<MacroActionHotkey::Action, std::string> actionTypes = {
|
||||||
{MacroActionHotkey::Action::OBS_HOTKEY,
|
{MacroActionHotkey::Action::OBS_HOTKEY,
|
||||||
"AdvSceneSwitcher.action.hotkey.type.obs"},
|
"AdvSceneSwitcher.action.hotkey.type.obs"},
|
||||||
{MacroActionHotkey::Action::CUSTOM,
|
{MacroActionHotkey::Action::CUSTOM,
|
||||||
"AdvSceneSwitcher.action.hotkey.type.custom"},
|
"AdvSceneSwitcher.action.hotkey.type.custom"},
|
||||||
};
|
};
|
||||||
|
|
||||||
const static std::map<obs_hotkey_registerer_type, std::string> hotkeyTypes = {
|
static const std::map<obs_hotkey_registerer_type, std::string> hotkeyTypes = {
|
||||||
{OBS_HOTKEY_REGISTERER_FRONTEND,
|
{OBS_HOTKEY_REGISTERER_FRONTEND,
|
||||||
"AdvSceneSwitcher.action.hotkey.type.obs.type.frontend"},
|
"AdvSceneSwitcher.action.hotkey.type.obs.type.frontend"},
|
||||||
{OBS_HOTKEY_REGISTERER_SOURCE,
|
{OBS_HOTKEY_REGISTERER_SOURCE,
|
||||||
|
|
@ -34,7 +34,7 @@ const static std::map<obs_hotkey_registerer_type, std::string> hotkeyTypes = {
|
||||||
"AdvSceneSwitcher.action.hotkey.type.obs.type.service"},
|
"AdvSceneSwitcher.action.hotkey.type.obs.type.service"},
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::unordered_map<HotkeyType, long> keyTable = {
|
static const std::unordered_map<HotkeyType, long> keyTable = {
|
||||||
// Chars
|
// Chars
|
||||||
{HotkeyType::Key_A, OBS_KEY_A},
|
{HotkeyType::Key_A, OBS_KEY_A},
|
||||||
{HotkeyType::Key_B, OBS_KEY_B},
|
{HotkeyType::Key_B, OBS_KEY_B},
|
||||||
|
|
@ -75,6 +75,9 @@ static std::unordered_map<HotkeyType, long> keyTable = {
|
||||||
{HotkeyType::Key_8, OBS_KEY_8},
|
{HotkeyType::Key_8, OBS_KEY_8},
|
||||||
{HotkeyType::Key_9, OBS_KEY_9},
|
{HotkeyType::Key_9, OBS_KEY_9},
|
||||||
|
|
||||||
|
// Other
|
||||||
|
{HotkeyType::Key_Tilde, OBS_KEY_ASCIITILDE},
|
||||||
|
|
||||||
{HotkeyType::Key_F1, OBS_KEY_F1},
|
{HotkeyType::Key_F1, OBS_KEY_F1},
|
||||||
{HotkeyType::Key_F2, OBS_KEY_F2},
|
{HotkeyType::Key_F2, OBS_KEY_F2},
|
||||||
{HotkeyType::Key_F3, OBS_KEY_F3},
|
{HotkeyType::Key_F3, OBS_KEY_F3},
|
||||||
|
|
@ -525,6 +528,7 @@ static inline void populateKeySelection(QComboBox *list)
|
||||||
list->addItem("NumpadDivide");
|
list->addItem("NumpadDivide");
|
||||||
list->addItem("NumpadDecimal");
|
list->addItem("NumpadDecimal");
|
||||||
list->addItem("NumpadEnter");
|
list->addItem("NumpadEnter");
|
||||||
|
list->addItem("Tilde");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void populateActionSelection(QComboBox *list)
|
static void populateActionSelection(QComboBox *list)
|
||||||
|
|
|
||||||
|
|
@ -383,6 +383,9 @@ static std::map<HotkeyType, CGKeyCode> keyTable = {
|
||||||
{HotkeyType::Key_8, kVK_ANSI_8},
|
{HotkeyType::Key_8, kVK_ANSI_8},
|
||||||
{HotkeyType::Key_9, kVK_ANSI_9},
|
{HotkeyType::Key_9, kVK_ANSI_9},
|
||||||
|
|
||||||
|
// Other
|
||||||
|
// Not sure which key to use for tilde
|
||||||
|
|
||||||
{HotkeyType::Key_F1, kVK_F1},
|
{HotkeyType::Key_F1, kVK_F1},
|
||||||
{HotkeyType::Key_F2, kVK_F2},
|
{HotkeyType::Key_F2, kVK_F2},
|
||||||
{HotkeyType::Key_F3, kVK_F3},
|
{HotkeyType::Key_F3, kVK_F3},
|
||||||
|
|
|
||||||
|
|
@ -435,46 +435,49 @@ bool IsInFocus(const QString &executable)
|
||||||
return (equals || matches);
|
return (equals || matches);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::unordered_map<HotkeyType, long> keyTable = {
|
static const std::unordered_map<HotkeyType, long> keyTable = {
|
||||||
// Chars
|
// Chars
|
||||||
{HotkeyType::Key_A, 0x41},
|
{HotkeyType::Key_A, 'A'},
|
||||||
{HotkeyType::Key_B, 0x42},
|
{HotkeyType::Key_B, 'B'},
|
||||||
{HotkeyType::Key_C, 0x43},
|
{HotkeyType::Key_C, 'C'},
|
||||||
{HotkeyType::Key_D, 0x44},
|
{HotkeyType::Key_D, 'D'},
|
||||||
{HotkeyType::Key_E, 0x45},
|
{HotkeyType::Key_E, 'E'},
|
||||||
{HotkeyType::Key_F, 0x46},
|
{HotkeyType::Key_F, 'F'},
|
||||||
{HotkeyType::Key_G, 0x47},
|
{HotkeyType::Key_G, 'G'},
|
||||||
{HotkeyType::Key_H, 0x48},
|
{HotkeyType::Key_H, 'H'},
|
||||||
{HotkeyType::Key_I, 0x49},
|
{HotkeyType::Key_I, 'I'},
|
||||||
{HotkeyType::Key_J, 0x4A},
|
{HotkeyType::Key_J, 'J'},
|
||||||
{HotkeyType::Key_K, 0x4B},
|
{HotkeyType::Key_K, 'K'},
|
||||||
{HotkeyType::Key_L, 0x4C},
|
{HotkeyType::Key_L, 'L'},
|
||||||
{HotkeyType::Key_M, 0x4D},
|
{HotkeyType::Key_M, 'M'},
|
||||||
{HotkeyType::Key_N, 0x4E},
|
{HotkeyType::Key_N, 'N'},
|
||||||
{HotkeyType::Key_O, 0x4F},
|
{HotkeyType::Key_O, 'O'},
|
||||||
{HotkeyType::Key_P, 0x50},
|
{HotkeyType::Key_P, 'P'},
|
||||||
{HotkeyType::Key_Q, 0x51},
|
{HotkeyType::Key_Q, 'Q'},
|
||||||
{HotkeyType::Key_R, 0x52},
|
{HotkeyType::Key_R, 'R'},
|
||||||
{HotkeyType::Key_S, 0x53},
|
{HotkeyType::Key_S, 'S'},
|
||||||
{HotkeyType::Key_T, 0x54},
|
{HotkeyType::Key_T, 'T'},
|
||||||
{HotkeyType::Key_U, 0x55},
|
{HotkeyType::Key_U, 'U'},
|
||||||
{HotkeyType::Key_V, 0x56},
|
{HotkeyType::Key_V, 'V'},
|
||||||
{HotkeyType::Key_W, 0x57},
|
{HotkeyType::Key_W, 'W'},
|
||||||
{HotkeyType::Key_X, 0x58},
|
{HotkeyType::Key_X, 'X'},
|
||||||
{HotkeyType::Key_Y, 0x59},
|
{HotkeyType::Key_Y, 'Y'},
|
||||||
{HotkeyType::Key_Z, 0x5A},
|
{HotkeyType::Key_Z, 'Z'},
|
||||||
|
|
||||||
// Numbers
|
// Numbers
|
||||||
{HotkeyType::Key_0, 0x30},
|
{HotkeyType::Key_0, '0'},
|
||||||
{HotkeyType::Key_1, 0x31},
|
{HotkeyType::Key_1, '1'},
|
||||||
{HotkeyType::Key_2, 0x32},
|
{HotkeyType::Key_2, '2'},
|
||||||
{HotkeyType::Key_3, 0x33},
|
{HotkeyType::Key_3, '3'},
|
||||||
{HotkeyType::Key_4, 0x34},
|
{HotkeyType::Key_4, '4'},
|
||||||
{HotkeyType::Key_5, 0x35},
|
{HotkeyType::Key_5, '5'},
|
||||||
{HotkeyType::Key_6, 0x36},
|
{HotkeyType::Key_6, '6'},
|
||||||
{HotkeyType::Key_7, 0x37},
|
{HotkeyType::Key_7, '7'},
|
||||||
{HotkeyType::Key_8, 0x38},
|
{HotkeyType::Key_8, '8'},
|
||||||
{HotkeyType::Key_9, 0x39},
|
{HotkeyType::Key_9, '9'},
|
||||||
|
|
||||||
|
// Other
|
||||||
|
{HotkeyType::Key_Tilde, '~'},
|
||||||
|
|
||||||
{HotkeyType::Key_F1, VK_F1},
|
{HotkeyType::Key_F1, VK_F1},
|
||||||
{HotkeyType::Key_F2, VK_F2},
|
{HotkeyType::Key_F2, VK_F2},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user