summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-03-16 16:42:49 -0700
committerMichael Kolb <kolby@google.com>2011-03-16 16:43:02 -0700
commit1a2eba437d354885e8f55d34e59200cd091f90b0 (patch)
treef3f614e7776f8de4d6c5870c3bef771734969c42 /src/com
parentb0ebbd0058d62a6e76ef7ae66cbe0297be38425e (diff)
downloadpackages_apps_Browser-1a2eba437d354885e8f55d34e59200cd091f90b0.zip
packages_apps_Browser-1a2eba437d354885e8f55d34e59200cd091f90b0.tar.gz
packages_apps_Browser-1a2eba437d354885e8f55d34e59200cd091f90b0.tar.bz2
add close tab shortcut
Bug: 3270434 ctrl-w to close tab Change-Id: Ic96b25bc27dd952080681acf53ce43cfcc9faf13
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/Controller.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 80cc7ca..36c519a 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -2587,7 +2587,12 @@ public class Controller
break;
// case KeyEvent.KEYCODE_U: // in Chrome: opens source of page
// case KeyEvent.KEYCODE_V: // text view intercepts to paste
-// case KeyEvent.KEYCODE_W: // menu
+ case KeyEvent.KEYCODE_W: // in Chrome: close tab
+ if (ctrl) {
+ closeCurrentTab();
+ return true;
+ }
+ break;
// case KeyEvent.KEYCODE_X: // text view intercepts to cut
// case KeyEvent.KEYCODE_Y: // unused
// case KeyEvent.KEYCODE_Z: // unused