SL-6109 Added default key for voice

meow-7.2.2
andreykproductengine 2019-10-04 16:20:07 +03:00 committed by Andrey Kleshchev
parent e211372923
commit 7cec1f3381
3 changed files with 15 additions and 3 deletions

View File

@ -31,6 +31,8 @@
<binding key="SPACE" mask="NONE" command="stop_moving"/>
<binding key="ENTER" mask="NONE" command="start_chat"/>
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
</first_person>
<third_person>
<binding key="A" mask="NONE" command="turn_left"/>
@ -122,6 +124,8 @@
<binding key="PAD_DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
<binding key="PAD_ENTER" mask="CTL_ALT_SHIFT" command="start_chat"/>
<binding key="PAD_DIVIDE" mask="CTL_ALT_SHIFT" command="start_gesture"/>
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
</third_person>
<!-- Basic editing camera control -->
@ -178,6 +182,8 @@
<binding key="PAD_PGDN" mask="ALT" command="push_down"/>
<binding key="PAD_ENTER" mask="ALT" command="start_chat"/>
<binding key="PAD_DIVIDE" mask="ALT" command="start_gesture"/>
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
</edit>
<sitting>
<binding key="A" mask="ALT" command="spin_around_cw"/>
@ -273,6 +279,8 @@
<binding key="ENTER" mask="NONE" command="start_chat"/>
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
</sitting>
<edit_avatar>
<!--Avatar editing camera controls-->
@ -298,5 +306,7 @@
<binding key="PAD_PGDN" mask="NONE" command="edit_avatar_spin_under"/>
<binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
<binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
</edit_avatar>
</keys>
</keys>

View File

@ -480,6 +480,7 @@ void LLKeyConflictHandler::saveToSettings()
// Still write empty LLKeyData to make sure we will maintain UI position
if (data.mKey == KEY_NONE)
{
// Might be better idea to be consistent and use NONE. LLViewerInput can work with both cases
binding.key = "";
}
else

View File

@ -1198,10 +1198,11 @@ S32 LLViewerInput::loadBindingMode(const LLViewerInput::KeyMode& keymode, S32 mo
++it)
{
bool processed = false;
if (!it->key.getValue().empty())
std::string key_str = it->key.getValue();
if (!key_str.empty() && key_str != "NONE")
{
KEY key;
LLKeyboard::keyFromString(it->key, &key);
LLKeyboard::keyFromString(key_str, &key);
if (key != KEY_NONE)
{
MASK mask;