2015-09-18 08:33:06 +03: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.
|
|
|
|
|
2021-11-22 10:34:31 +03:00
|
|
|
#ifndef ELECTRON_SHELL_COMMON_KEYBOARD_UTIL_H_
|
|
|
|
#define ELECTRON_SHELL_COMMON_KEYBOARD_UTIL_H_
|
2015-09-18 08:33:06 +03:00
|
|
|
|
2024-01-11 01:23:35 +03:00
|
|
|
#include <optional>
|
2024-01-11 04:00:37 +03:00
|
|
|
#include <string_view>
|
2024-01-11 01:23:35 +03:00
|
|
|
|
2015-09-18 08:33:06 +03:00
|
|
|
#include "ui/events/keycodes/keyboard_codes.h"
|
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
|
2021-06-02 10:32:48 +03:00
|
|
|
// Return key code of the |str|, if the original key is a shifted character,
|
|
|
|
// for example + and /, set it in |shifted_char|.
|
2015-09-18 08:33:06 +03:00
|
|
|
// pressed.
|
2024-01-11 04:00:37 +03:00
|
|
|
ui::KeyboardCode KeyboardCodeFromStr(std::string_view str,
|
2024-01-11 01:23:35 +03:00
|
|
|
std::optional<char16_t>* shifted_char);
|
2015-09-18 08:33:06 +03:00
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2021-11-22 10:34:31 +03:00
|
|
|
#endif // ELECTRON_SHELL_COMMON_KEYBOARD_UTIL_H_
|