// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifdef UNSAFE_BUFFERS_BUILD // TODO(crbug.com/40285824): Remove this and convert code to safer constructs. #pragma allow_unsafe_buffers #endif #include "remoting/host/linux/unicode_to_keysym.h" #include <algorithm> #include "ui/gfx/x/keysyms/keysyms.h" namespace remoting { namespace { struct CodePair { … }; // The table has been sorted by the second column so it can be searched using // binary search. There might be multiple present keysyms for the same unicode // value (e.g. see XK_Tab and XK_KP_Tab). It excludes Latin1 characters (which // have 1-to-1 mapping between keysym and unicode), but includes some // alternative keysyms for some of them (e.g. XK_KP_0 for '0'). const CodePair kKeySymUnicodeMap[] = …; bool CompareCodePair(const CodePair& pair, uint32_t unicode) { … } } // namespace std::vector<uint32_t> GetKeySymsForUnicode(uint32_t unicode) { … } } // namespace remoting