2015-09-18 05:33:06 +00:00
|
|
|
// Copyright (c) 2015 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 20:56:58 +00:00
|
|
|
#ifndef SHELL_COMMON_KEYBOARD_UTIL_H_
|
|
|
|
#define SHELL_COMMON_KEYBOARD_UTIL_H_
|
2015-09-18 05:33:06 +00:00
|
|
|
|
2015-11-16 03:15:13 +00:00
|
|
|
#include <string>
|
2016-03-06 06:04:05 +00:00
|
|
|
|
2018-10-29 18:08:47 +00:00
|
|
|
#include "base/strings/string16.h"
|
2015-09-18 05:33:06 +00:00
|
|
|
#include "ui/events/keycodes/keyboard_codes.h"
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2015-09-18 05:33:06 +00:00
|
|
|
|
2018-10-29 18:08:47 +00:00
|
|
|
// Return key code of the char, and also determine whether the SHIFT key is
|
|
|
|
// pressed.
|
|
|
|
ui::KeyboardCode KeyboardCodeFromCharCode(base::char16 c, bool* shifted);
|
|
|
|
|
2016-03-06 06:04:05 +00:00
|
|
|
// Return key code of the |str|, and also determine whether the SHIFT key is
|
2015-09-18 05:33:06 +00:00
|
|
|
// pressed.
|
2016-03-06 06:04:05 +00:00
|
|
|
ui::KeyboardCode KeyboardCodeFromStr(const std::string& str, bool* shifted);
|
2015-09-18 05:33:06 +00:00
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
} // namespace electron
|
2015-09-18 05:33:06 +00:00
|
|
|
|
2019-06-19 20:56:58 +00:00
|
|
|
#endif // SHELL_COMMON_KEYBOARD_UTIL_H_
|