Index: chrome/browser/ui/ash/event_rewriter.h |
diff --git a/chrome/browser/ui/ash/event_rewriter.h b/chrome/browser/ui/ash/event_rewriter.h |
index 1d01ed4a2695a9250a45fb2a6341d7d48b40bdc5..49f76e5ac48b4006eb2287a99edd8e1860f18b09 100644 |
--- a/chrome/browser/ui/ash/event_rewriter.h |
+++ b/chrome/browser/ui/ash/event_rewriter.h |
@@ -95,7 +95,8 @@ class EventRewriter : public ash::EventRewriterDelegate, |
#endif |
// Rewrites the |event| by applying all RewriteXXX functions as needed. |
- void Rewrite(ui::KeyEvent* event); |
+ // Returns whether the event should be rewritten or dropped. |
+ ash::EventRewriterDelegate::Action Rewrite(ui::KeyEvent* event); |
// Rewrites a modifier key press/release following the current user |
// preferences. |
@@ -116,8 +117,21 @@ class EventRewriter : public ash::EventRewriterDelegate, |
// * Alt+Down -> Next (aka PageDown) |
// * Ctrl+Alt+Up -> Home |
// * Ctrl+Alt+Down -> End |
+ // When the Search key acts as a function key, it instead maps: |
+ // * Search+Backspace -> Delete |
+ // * Search+Up -> Prior (aka PageUp) |
+ // * Search+Down -> Next (aka PageDown) |
+ // * Search+Left -> Home |
+ // * Search+right -> End |
+ // Returns true when the |event| is rewritten. |
bool RewriteBackspaceAndArrowKeys(ui::KeyEvent* event); |
+#if defined(OS_CHROMEOS) |
+ // When the Search key acts as a function key, it drops Search key presses, |
+ // and drops the release as well if any key is pressed while Search was down. |
+ bool DropSearchKey(ui::KeyEvent* event); |
+#endif |
+ |
// Rewrites the located |event|. |
void RewriteLocatedEvent(ui::LocatedEvent* event); |
@@ -146,6 +160,8 @@ class EventRewriter : public ash::EventRewriterDelegate, |
int last_device_id_; |
#if defined(OS_CHROMEOS) |
+ bool drop_search_key_release_; |
+ |
// X keycodes corresponding to various keysyms. |
unsigned int control_l_xkeycode_; |
unsigned int control_r_xkeycode_; |