Exiting from Screen zoom by pressing "Escape" or "Backspace" key.
[profile/tv/apps/web/browser.git] / services / SimpleUI / SimpleUI.cpp
index c86fd31..97b4ffa 100644 (file)
@@ -420,6 +420,7 @@ void SimpleUI::connectModelSignals()
 
     m_platformInputManager->returnPressed.connect(boost::bind(&elm_exit));
     m_platformInputManager->backPressed.connect(boost::bind(&SimpleUI::onBackPressed, this));
+    m_platformInputManager->escapePressed.connect(boost::bind(&SimpleUI::onEscapePressed, this));
     m_platformInputManager->mouseClicked.connect(
             boost::bind(&SimpleUI::onMouseClick, this));
 
@@ -628,7 +629,9 @@ void SimpleUI::setwvIMEStatus(bool status)
 void SimpleUI::onBackPressed()
 {
     BROWSER_LOGD("[%s]", __func__);
-    if (m_webPageUI->isHomePageActive()) {
+    if (m_zoomUI->isVisible()) {
+        m_zoomUI->escapeZoom();
+    } else if (m_webPageUI->isHomePageActive()) {
         m_quickAccess->backButtonClicked();
     } else {
         if (!m_webPageUI->getURIEntry().hasFocus() && !m_wvIMEStatus)
@@ -636,6 +639,12 @@ void SimpleUI::onBackPressed()
     }
 }
 
+void SimpleUI::onEscapePressed()
+{
+    BROWSER_LOGD("[%s]", __func__);
+    m_zoomUI->escapeZoom();
+}
+
 void SimpleUI::reloadEnable(bool enable)
 {
     m_webPageUI->setReloadButtonEnabled(enable);