提交 e321005b 编写于 作者: C Clayton Groeneveld

UI: Fix issue where space/esc hotkeys would be blank

This also modifies libobs.

This only happened on Linux.

Fixes https://obsproject.com/mantis/view.php?id=1018
上级 29a1a973
......@@ -875,6 +875,7 @@ Hotkeys.AppleKeypadSubtract="- (Keypad)"
Hotkeys.AppleKeypadDecimal=". (Keypad)"
Hotkeys.AppleKeypadEqual="= (Keypad)"
Hotkeys.MouseButton="Mouse %1"
Hotkeys.Escape="Esc"
# audio hotkeys
Mute="Mute"
......
......@@ -2037,6 +2037,7 @@ void OBSBasic::InitHotkeys()
t.apple_keypad_decimal = Str("Hotkeys.AppleKeypadDecimal");
t.apple_keypad_equal = Str("Hotkeys.AppleKeypadEqual");
t.mouse_num = Str("Hotkeys.MouseButton");
t.escape = Str("Hotkeys.Escape");
obs_hotkeys_set_translations(&t);
obs_hotkeys_set_audio_hotkeys_translations(Str("Mute"), Str("Unmute"),
......
......@@ -1479,6 +1479,7 @@ void obs_hotkeys_set_translations_s(
ADD_TRANSLATION(OBS_KEY_META, meta);
ADD_TRANSLATION(OBS_KEY_MENU, menu);
ADD_TRANSLATION(OBS_KEY_SPACE, space);
ADD_TRANSLATION(OBS_KEY_ESCAPE, escape);
#ifdef __APPLE__
const char *numpad_str = t.apple_keypad_num;
ADD_TRANSLATION(OBS_KEY_NUMSLASH, apple_keypad_divide);
......
......@@ -126,6 +126,7 @@ struct obs_hotkeys_translations {
const char *apple_keypad_decimal;
const char *apple_keypad_equal;
const char *mouse_num; /* For example, "Mouse %1" */
const char *escape;
};
/* This function is an optional way to provide translations for specific keys
......
......@@ -1114,6 +1114,8 @@ void obs_key_to_str(obs_key_t key, struct dstr *dstr)
case OBS_KEY_NUMCOMMA: return translate_key(key, "Numpad ,");
case OBS_KEY_NUMPERIOD: return translate_key(key, "Numpad .");
case OBS_KEY_NUMSLASH: return translate_key(key, "Numpad /");
case OBS_KEY_SPACE: return translate_key(key, "Space");
case OBS_KEY_ESCAPE: return translate_key(key, "Escape");
default:;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册