#include "third_party/blink/renderer/core/events/keyboard_event.h"
#include "build/build_config.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_keyboard_event_init.h"
#include "third_party/blink/renderer/core/editing/ime/input_method_controller.h"
#include "third_party/blink/renderer/core/event_interface_names.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/input/input_device_capabilities.h"
#include "third_party/blink/renderer/platform/bindings/dom_wrapper_world.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/windows_keyboard_codes.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
namespace blink {
namespace {
const AtomicString& EventTypeForKeyboardEventType(WebInputEvent::Type type) { … }
KeyboardEvent::KeyLocationCode GetKeyLocationCode(const WebInputEvent& key) { … }
bool HasCurrentComposition(LocalDOMWindow* dom_window) { … }
static String FromUTF8(const std::string& s) { … }
}
KeyboardEvent* KeyboardEvent::Create(ScriptState* script_state,
const AtomicString& type,
const KeyboardEventInit* initializer) { … }
KeyboardEvent::KeyboardEvent() : … { … }
KeyboardEvent::KeyboardEvent(const WebKeyboardEvent& key,
LocalDOMWindow* dom_window,
bool cancellable)
: … { … }
KeyboardEvent::KeyboardEvent(const AtomicString& event_type,
const KeyboardEventInit* initializer)
: … { … }
KeyboardEvent::~KeyboardEvent() = default;
void KeyboardEvent::initKeyboardEvent(ScriptState* script_state,
const AtomicString& type,
bool bubbles,
bool cancelable,
AbstractView* view,
const String& key_identifier,
unsigned location,
bool ctrl_key,
bool alt_key,
bool shift_key,
bool meta_key) { … }
int KeyboardEvent::keyCode() const { … }
int KeyboardEvent::charCode() const { … }
const AtomicString& KeyboardEvent::InterfaceName() const { … }
bool KeyboardEvent::IsKeyboardEvent() const { … }
unsigned KeyboardEvent::which() const { … }
void KeyboardEvent::InitLocationModifiers(unsigned location) { … }
void KeyboardEvent::Trace(Visitor* visitor) const { … }
}