From a10f9639004b4eedc3b6e7b624912ff4ebd8fdc5 Mon Sep 17 00:00:00 2001 From: Josh Bell Date: Tue, 4 Mar 2008 16:59:57 +0000 Subject: 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 --- indra/newview/llviewerkeyboard.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/newview/llviewerkeyboard.cpp') 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() -- cgit v1.2.3