summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-10-04 16:20:07 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-10-04 16:20:07 +0300
commitca56f6d953ad596d4fc02d8568ca542f57aa5119 (patch)
tree6eec2e884abe616bffa9e302361776ae2e9644b2
parent6aab234105d6eed022afbea388ae21530c7e99dd (diff)
SL-6109 Added default key for voice
-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 95c26cdde2..fda521933f 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -1196,10 +1196,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;