Nui
Loading...
Searching...
No Matches
keyboard_event.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Nui::WebApi
6{
12 class KeyboardEvent : public UiEvent
13 {
14 public:
15 explicit KeyboardEvent(Nui::val event);
16
21 bool altKey() const;
22
26 bool ctrlKey() const;
27
31 bool shiftKey() const;
32
37 bool metaKey() const;
38
50 std::string code() const;
51
56 bool isComposing() const;
57
61 std::string key() const;
62
67 int location() const;
68
73 bool repeat() const;
74 };
75}
A keyboard event class.
Definition keyboard_event.hpp:13
std::string key() const
Returns a string representing the key value of the key represented by the event.
Definition keyboard_event.cpp:33
bool altKey() const
Returns a boolean value that is true if the Alt (Option or ⌥ on macOS) key was active when the key ev...
Definition keyboard_event.cpp:8
std::string code() const
Returns a string with the code value of the physical key represented by the event.
Definition keyboard_event.cpp:23
bool ctrlKey() const
Returns a boolean value that is true if the Ctrl key was active when the key event was generated.
Definition keyboard_event.cpp:13
bool metaKey() const
Returns a boolean value that is true if the Meta key (on Mac keyboards, the ⌘ Command key; on Windows...
Definition keyboard_event.cpp:43
bool repeat() const
Returns a boolean value that is true if the key is being held down such that it is automatically repe...
Definition keyboard_event.cpp:48
bool shiftKey() const
Returns a boolean value that is true if the Shift key was active when the key event was generated.
Definition keyboard_event.cpp:18
bool isComposing() const
Returns a boolean value that is true if the event is fired between after compositionstart and before ...
Definition keyboard_event.cpp:28
int location() const
Returns a number representing the location of the key on the keyboard or other input device.
Definition keyboard_event.cpp:38
The UIEvent interface represents simple user interface events.
Definition ui_event.hpp:14
Definition abort_controller.hpp:8
emscripten::val val
Definition val.hpp:5