1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_KEYBOARD_DRIVEN_EVENT_REWRITER_H_
6 #define CHROME_BROWSER_CHROMEOS_EVENTS_KEYBOARD_DRIVEN_EVENT_REWRITER_H_
8 #include "base/basictypes.h"
10 typedef union _XEvent XEvent
;
14 // KeyboardDrivenEventRewriter removes the modifier flags from
15 // Shift+<Arrow keys|Enter|F6> key events. This mapping only happens
16 // on login screen and only when the keyboard driven oobe is enabled.
17 class KeyboardDrivenEventRewriter
{
19 KeyboardDrivenEventRewriter();
20 ~KeyboardDrivenEventRewriter();
22 // Calls RewriteEvent to modify |event| if it is on login screen and the
23 // keyboard driven flag is enabled. Returns true if the event is changed
24 // and no further changes should happen.
25 bool RewriteIfKeyboardDrivenOnLoginScreen(XEvent
* event
);
27 // Calls RewriteEvent for testing.
28 bool RewriteForTesting(XEvent
* event
);
31 bool RewriteEvent(XEvent
* event
);
33 DISALLOW_COPY_AND_ASSIGN(KeyboardDrivenEventRewriter
);
36 } // namespace chromeos
38 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_KEYBOARD_DRIVEN_EVENT_REWRITER_H_