diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 4 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 39 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 2 |
3 files changed, 22 insertions, 23 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index da7caad21e..e8af26c743 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -133,7 +133,7 @@ <key>Value</key> <integer>1</integer> </map> - <key>ArrowKeysMoveAvatar</key> + <key>ArrowKeysAlwaysMove</key> <map> <key>Comment</key> <string>While cursor is in chat entry box, arrow keys still control your avatar</string> @@ -142,7 +142,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>AskedAboutCrashReports</key> <map> diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b574a9c110..9b3dbcd2f6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2113,31 +2113,30 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // arrow keys move avatar while chatting hack if (chat_editor && chat_editor->hasFocus()) { - if (chat_editor->getText().empty() || gSavedSettings.getBOOL("ArrowKeysMoveAvatar")) + // If text field is empty, there's no point in trying to move + // cursor with arrow keys, so allow movement + if (chat_editor->getText().empty() + || gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) { - switch(key) + // let Control-Up and Control-Down through for chat line history, + if (!(key == KEY_UP && mask == MASK_CONTROL) + && !(key == KEY_DOWN && mask == MASK_CONTROL)) { - case KEY_LEFT: - case KEY_RIGHT: - case KEY_UP: - // let CTRL UP through for chat line history - if( MASK_CONTROL == mask ) + switch(key) { + case KEY_LEFT: + case KEY_RIGHT: + case KEY_UP: + case KEY_DOWN: + case KEY_PAGE_UP: + case KEY_PAGE_DOWN: + case KEY_HOME: + // when chatbar is empty or ArrowKeysAlwaysMove set, + // pass arrow keys on to avatar... + return FALSE; + default: break; } - case KEY_DOWN: - // let CTRL DOWN through for chat line history - if( MASK_CONTROL == mask ) - { - break; - } - case KEY_PAGE_UP: - case KEY_PAGE_DOWN: - case KEY_HOME: - // when chatbar is empty or ArrowKeysMoveAvatar set, pass arrow keys on to avatar... - return FALSE; - default: - break; } } } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index f98f3a0850..613decad8d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -212,7 +212,7 @@ Avatars: width="256" top_pad="0"/> <check_box - control_name="ArrowKeysMoveAvatar" + control_name="ArrowKeysAlwaysMove" follows="left|top" height="20" label="Arrow keys always move me" |