#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/events/keycodes/keyboard_code_conversion.h"
#include <algorithm>
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/dom_us_layout_data.h"
#include "ui/events/types/event_type.h"
namespace ui {
namespace {
bool IsRightSideDomCode(DomCode code) { … }
}
char16_t DomCodeToUsLayoutCharacter(DomCode dom_code, int flags) { … }
bool DomCodeToNonPrintableDomKey(DomCode dom_code,
DomKey* out_dom_key,
KeyboardCode* out_key_code) { … }
bool DomCodeToUsLayoutDomKey(DomCode dom_code,
int flags,
DomKey* out_dom_key,
KeyboardCode* out_key_code) { … }
bool DomCodeToControlCharacter(DomCode dom_code,
int flags,
DomKey* dom_key,
KeyboardCode* key_code) { … }
KeyboardCode NonPrintableDomKeyToKeyboardCode(DomKey dom_key) { … }
KeyboardCode LocatedToNonLocatedKeyboardCode(KeyboardCode key_code) { … }
KeyboardCode NonLocatedToLocatedKeyboardCode(KeyboardCode key_code,
DomCode dom_code) { … }
DomCode UsLayoutKeyboardCodeToDomCode(KeyboardCode key_code) { … }
KeyboardCode DomCodeToUsLayoutKeyboardCode(DomCode dom_code) { … }
KeyboardCode DomCodeToUsLayoutNonLocatedKeyboardCode(DomCode dom_code) { … }
int ModifierDomKeyToEventFlag(DomKey key) { … }
DomCode UsLayoutDomKeyToDomCode(DomKey dom_key) { … }
}