//////////////////////////////////////////////////////////////////////////////// // virtual void LLViewerMediaImpl::paste() { LLPluginClassMedia* plugin = getMediaPlugin(); if (plugin) plugin->paste(); }
bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask) { bool result = false; LLPluginClassMedia* plugin = getMediaPlugin(); if (plugin) { // FIXME: THIS IS SO WRONG. // 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( 'C' == key ) { plugin->copy(); result = true; } else if( 'V' == key ) { plugin->paste(); result = true; } else if( 'X' == key ) { plugin->cut(); result = true; } } if(!result) { LLSD native_key_data = LLSD::emptyMap(); result = plugin->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask, native_key_data); // Since the viewer internal event dispatching doesn't give us key-up events, simulate one here. (void)plugin->keyEvent(LLPluginClassMedia::KEY_EVENT_UP ,key, mask, native_key_data); } } return result; }