diff options
author | Josh Bell <josh@lindenlab.com> | 2008-03-04 16:59:57 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2008-03-04 16:59:57 +0000 |
commit | a10f9639004b4eedc3b6e7b624912ff4ebd8fdc5 (patch) | |
tree | 051625f9ac6a0d08f613cf11da318c3fd30b06a9 /indra/newview/llviewerkeyboard.cpp | |
parent | 62d9c7f76ce4953064fbc2a778ad4ecefb918e01 (diff) |
svn merge -r 81304:81392 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-ui-8-merge
QAR-343 - merge maint-ui-7 and maint-ui-8 to release
Diffstat (limited to 'indra/newview/llviewerkeyboard.cpp')
-rw-r--r-- | indra/newview/llviewerkeyboard.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index a8f88ec036..8a5a5e99c9 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -477,6 +477,24 @@ void start_chat( EKeystate s ) gChatBar->startChat(NULL); } +void start_gesture( EKeystate s ) +{ + if (KEYSTATE_UP == s && + !gChatBar->inputEditorHasFocus()) + { + if (gChatBar->getCurrentChat().empty()) + { + // No existing chat in chat editor, insert '/' + gChatBar->startChat("/"); + } + else + { + // Don't overwrite existing text in chat editor + gChatBar->startChat(NULL); + } + } +} + void bind_keyboard_functions() { gViewerKeyboard.bindNamedFunction("jump", agent_jump); @@ -518,6 +536,7 @@ void bind_keyboard_functions() gViewerKeyboard.bindNamedFunction("edit_avatar_move_backward", edit_avatar_move_backward); gViewerKeyboard.bindNamedFunction("stop_moving", stop_moving); gViewerKeyboard.bindNamedFunction("start_chat", start_chat); + gViewerKeyboard.bindNamedFunction("start_gesture", start_gesture); } LLViewerKeyboard::LLViewerKeyboard() |