summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-10-04 16:20:07 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-06-23 14:50:02 +0300
commit7cec1f3381291ffbf4cc6a07daf4a74d5af5a9ee (patch)
tree30aeb51bf67bfdbedbe92ea01d8400ed2a126a0f /indra/newview
parente211372923bed31e632bc9825913d3d57cdc2d52 (diff)
SL-6109 Added default key for voice
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/key_bindings.xml12
-rw-r--r--indra/newview/llkeyconflict.cpp1
-rw-r--r--indra/newview/llviewerinput.cpp5
3 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/app_settings/key_bindings.xml b/indra/newview/app_settings/key_bindings.xml
index 0c90ef26df..d0c25f3ed0 100644
--- a/indra/newview/app_settings/key_bindings.xml
+++ b/indra/newview/app_settings/key_bindings.xml
@@ -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> \ No newline at end of file
+</keys>
diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp
index 0b9aaea478..71ba0d37b3 100644
--- a/indra/newview/llkeyconflict.cpp
+++ b/indra/newview/llkeyconflict.cpp
@@ -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
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index 02d0dcb6c7..2327ac7f4c 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -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;