Address Issue 1897: Pressing letter keys STARTS local chat
Option lives in Text Chat preferences. "Letter keys start typing into local chat" Code is from upstream..ish
This commit is contained in:
@@ -4219,6 +4219,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LetterKeysFocusChatBar</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When printable characters keys (possibly with Shift held) are pressed, the chatbar takes focus</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>ChatBubbleOpacity</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -2853,6 +2853,19 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// If "Pressing letter keys starts local chat" option is selected, we are not in mouselook,
|
||||
// no view has keyboard focus, this is a printable character key (and no modifier key is
|
||||
// pressed except shift), then give focus to nearby chat (STORM-560)
|
||||
if (gSavedSettings.getBOOL("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
|
||||
!keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT))
|
||||
{
|
||||
{
|
||||
// passing NULL here, character will be added later when it is handled by character handler.
|
||||
gChatBar->startChat(NULL);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// give menus a chance to handle unmodified accelerator keys
|
||||
if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask))
|
||||
||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)))
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<text bottom_delta="-12" height="10" left="12" mouse_opaque="false" name="text_box6" v_pad="0" width="135">Chat Options:</text>
|
||||
<check_box bottom_delta="-8" follows="top" height="16" initial_value="false" label="Close chat bar after hitting return" left="148" name="close_chat_on_return_check"/>
|
||||
<check_box bottom_delta="-20" follows="top" height="16" initial_value="false" label="Arrow keys always move avatar when chatting" name="arrow_keys_move_avatar_check"/>
|
||||
<check_box bottom_delta="-20" follows="top" height="16" control_name="LetterKeysFocusChatBar" label="Letter keys start typing into local chat" name="letter_keys_start_local_chat"/>
|
||||
<check_box bottom_delta="-20" follows="top" height="16" initial_value="false" label="Show timestamps in Local Chat" name="show_timestamps_check"/>
|
||||
<check_box bottom_delta="-20" control_name="ScriptErrorsAsChat" follows="top" height="16" initial_value="false" label="Show script errors and warnings as regular chat" name="script_errors_as_chat"/>
|
||||
<check_box bottom_delta="-20" control_name="PlayTypingAnim" follows="top" height="16" initial_value="true" label="Play typing animation when chatting" name="play_typing_animation"/>
|
||||
|
||||
Reference in New Issue
Block a user