diff options
Diffstat (limited to 'views/focus/accelerator_handler.h')
-rw-r--r-- | views/focus/accelerator_handler.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/views/focus/accelerator_handler.h b/views/focus/accelerator_handler.h index c440c6b..67ce92c 100644 --- a/views/focus/accelerator_handler.h +++ b/views/focus/accelerator_handler.h @@ -11,9 +11,7 @@ #include <gdk/gdk.h> #endif -#if defined(OS_WIN) #include <set> -#endif #include "base/message_loop.h" @@ -37,7 +35,16 @@ class AcceleratorHandler : public MessageLoopForUI::Dispatcher { // The keys currently pressed and consumed by the FocusManager. std::set<WPARAM> pressed_keys_; #else // OS_LINUX - guint last_key_pressed_; + // The set of hardware keycodes that are currently pressed. We use this + // to keep track of whether or not a key is being pressed in isolation + // or not. We must use hardware keycodes because higher-level keycodes + // may change between press and release depending on what modifier keys + // are pressed in the interim. + std::set<int> pressed_hardware_keys_; + // The set of vkey codes that were consumed by the FocusManager. + std::set<int> consumed_vkeys_; + // True if only the menu key (Alt key) was pressed, and no other keys. + bool only_menu_pressed_; #endif DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); |