Skip to main content

GLFWKeyLookup Namespace

Definition

namespace helios::ext::glfw::input::GLFWKeyLookup { ... }

Functions Index

intfrom (const helios::input::types::Key key) noexcept

Provides a lookup for converting helios key codes to glfw-specific key codes. More...

Functions

from()

int helios::ext::glfw::input::GLFWKeyLookup::from (const helios::input::types::Key key)
inline noexcept

Provides a lookup for converting helios key codes to glfw-specific key codes.

Parameters
key

The helios key to map to the key codes registered by GLFW

Returns

A key-code in glfw space.

Definition at line 23 of file GLFWKeyLookup.ixx.

23 inline int from(const helios::input::types::Key key) noexcept {
24
25 static constexpr std::array<int, helios::input::types::Key::size_> HELIOS_TO_GLFW=[] {
26 std::array<int, helios::input::types::Key::size_> map{};
27
28 map[helios::input::types::Key::ESC] = GLFW_KEY_ESCAPE;
29 map[helios::input::types::Key::TILDE] = GLFW_KEY_GRAVE_ACCENT;
30 return map;
31 }();
32
33 return HELIOS_TO_GLFW[key];
34 }

References helios::input::types::ESC and helios::input::types::TILDE.

Referenced by helios::ext::glfw::input::GLFWInputAdapter::isKeyPressed and helios::ext::glfw::input::GLFWInputAdapter::isKeyReleased.


The documentation for this namespace was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.