| 1 | // LAF OS Library |
| 2 | // Copyright (C) 2018 David Capello |
| 3 | // |
| 4 | // This file is released under the terms of the MIT license. |
| 5 | // Read LICENSE.txt for more information. |
| 6 | |
| 7 | #ifndef OS_X11_KEYS_INCLUDED |
| 8 | #define OS_X11_KEYS_INCLUDED |
| 9 | #pragma once |
| 10 | |
| 11 | #include "gfx/color_space.h" // Include here avoid error with None |
| 12 | #include "os/keys.h" |
| 13 | #include <X11/X.h> |
| 14 | |
| 15 | namespace os { |
| 16 | |
| 17 | extern bool g_spaceBarIsPressed; |
| 18 | |
| 19 | KeyScancode x11_keysym_to_scancode(const KeySym keysym); |
| 20 | KeySym x11_keysym_to_scancode(const KeyScancode scancode); |
| 21 | bool x11_is_key_pressed(const KeyScancode scancode); |
| 22 | int x11_get_unicode_from_scancode(const KeyScancode scancode); |
| 23 | |
| 24 | KeyModifiers get_modifiers_from_x(const int xeventState); |
| 25 | |
| 26 | } // namespace os |
| 27 | |
| 28 | #endif |
| 29 | |