keyboard_util.h 626 B

123456789101112131415161718192021222324
  1. // Copyright (c) 2015 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ATOM_COMMON_KEYBOARD_UTIL_H_
  5. #define ATOM_COMMON_KEYBOARD_UTIL_H_
  6. #include <string>
  7. #include "ui/events/keycodes/keyboard_codes.h"
  8. namespace atom {
  9. // Return key code of the |str|, and also determine whether the SHIFT key is
  10. // pressed.
  11. ui::KeyboardCode KeyboardCodeFromStr(const std::string& str, bool* shifted);
  12. // Ported from ui/events/blink/blink_event_util.h
  13. int WebEventModifiersToEventFlags(int modifiers);
  14. } // namespace atom
  15. #endif // ATOM_COMMON_KEYBOARD_UTIL_H_