OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/keyboard_lock/keyboard_lock_host.h" |
| 6 |
| 7 #include <X11/XKBlib.h> |
| 8 |
| 9 #include "ui/gfx/x/x11_types.h" |
| 10 |
| 11 namespace keyboard_lock { |
| 12 |
| 13 // static |
| 14 ui::KeyboardCode KeyboardLockHost::NativeKeycodeToKeyboardCode( |
| 15 uint32_t keycode) { |
| 16 return static_cast<ui::KeyboardCode>(XkbKeycodeToKeysym( |
| 17 gfx::GetXDisplay(), keycode, 0, 1)); |
| 18 } |
| 19 |
| 20 } // namespace keyboard_lock |
OLD | NEW |