inputs_keyboard_last_action_parameter
Last key pressed or released (inputs.keyboard.last_action), to react once to a key press.
Fields and methods
Members of the struct inputs_keyboard_last_action_parameter. Most of what you do with a CGP type goes through the free functions listed below.
Fields
int key = -1 | GLFW key code of the last keyboard event, -1 before the first event. |
int action = -1 | GLFW_PRESS, GLFW_RELEASE or GLFW_REPEAT for the last keyboard event, -1 before the first event. |
Methods
bool is_pressed(int glfw_key) const | Returns true if the last keyboard event is the press (not a repeat) of the key with this GLFW code; it stays true until the next key event, so test it in keyboard_event().3 overloads src |
bool is_pressed(char keyname) const | Returns true if the last keyboard event is the press of the key whose character is keyname on the layout in use (printable keys only). src |
bool is_pressed(std::string const& keyname) const | Returns true if the last keyboard event is the press of the key with this name on the layout in use (glfwGetKeyName, printable keys only). src |
bool is_released(int glfw_key) const | Returns true if the last keyboard event is the release of the key with this GLFW code.3 overloads src |
bool is_released(char keyname) const | Returns true if the last keyboard event is the release of the key whose character is keyname on the layout in use (printable keys only). src |
bool is_released(std::string const& keyname) const | Returns true if the last keyboard event is the release of the key with this name on the layout in use (glfwGetKeyName, printable keys only). src |
Functions taking a inputs_keyboard_last_action_parameter
None.
Functions returning a inputs_keyboard_last_action_parameter
None.
Operators
None.