Feature request: Add the ability to use keyboard shortcuts from the login panel, whether or not the login webpage is focused

This commit is contained in:
Inusaito Sayori
2014-12-16 19:45:19 -05:00
parent cc32df6fd8
commit 9880134b4d

View File

@@ -51,6 +51,7 @@
#include "llkeyboard.h" #include "llkeyboard.h"
#include "llmarketplacefunctions.h" #include "llmarketplacefunctions.h"
#include "llmediaentry.h" #include "llmediaentry.h"
#include "llmenugl.h"
#include "llmimetypes.h" #include "llmimetypes.h"
#include "llmutelist.h" #include "llmutelist.h"
#include "llnotifications.h" #include "llnotifications.h"
@@ -2753,25 +2754,28 @@ bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask)
// Menu keys should be handled by the menu system and not passed to UI elements, but this is how LLTextEditor and LLLineEditor do it... // Menu keys should be handled by the menu system and not passed to UI elements, but this is how LLTextEditor and LLLineEditor do it...
if( MASK_CONTROL & mask ) if( MASK_CONTROL & mask )
{ {
if( 'C' == key ) if('C' == key)
{ {
plugin->copy(); plugin->copy();
result = true; result = true;
} }
else else if('V' == key)
if( 'V' == key )
{ {
plugin->paste(); plugin->paste();
result = true; result = true;
} }
else else if('X' == key)
if( 'X' == key )
{ {
plugin->cut(); plugin->cut();
result = true; result = true;
} }
} }
// Singu Note: At the very least, let's allow the login menu to function
extern LLMenuBarGL* gLoginMenuBarView;
if (gLoginMenuBarView && gLoginMenuBarView->getVisible() && gLoginMenuBarView->handleAcceleratorKey(key, mask))
return true;
if(!result) if(!result)
{ {