1 #ifndef DALI_INTEGRATION_KEY_EVENT_H
2 #define DALI_INTEGRATION_KEY_EVENT_H
5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <dali/integration-api/events/event.h>
26 #include <dali/public-api/events/key-event.h>
33 * An instance of this class should be used by the adaptor to send a key event to
37 struct DALI_CORE_API KeyEvent : public Event
40 // Specifies the state of the key event.
43 DOWN, /**< Key down */
54 * @param[in] keyName The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
55 * @param[in] logicalKey The logical key symbol (eg. shift + 1 == "exclamation")
56 * @param[in] keyString The string of input characters or key pressed
57 * @param[in] keyCode The unique key code for the key pressed.
58 * @param[in] keyModifier The key modifier for special keys like shift and alt
59 * @param[in] timeStamp The time (in ms) that the key event occurred.
60 * @param[in] keyState The state of the key event.
61 * @param[in] compose The key compose
62 * @param[in] deviceName The name of device KeyEvent originated from
63 * @param[in] deviceClass The class of device KeyEvent originated from
64 * @param[in] deviceSubclass The subclass of device KeyEvent originated from
66 KeyEvent(const std::string& keyName,
67 const std::string& logicalKey,
68 const std::string& keyString,
71 unsigned long timeStamp,
72 const State& keyState,
73 const std::string& compose,
74 const std::string& deviceName,
75 const Device::Class::Type deviceClass,
76 const Device::Subclass::Type deviceSubclass);
86 * The name of the key pressed or command from the IMF
91 * The logical key symbol
93 std::string logicalKey;
96 * The string of input characters or key pressed
98 std::string keyString;
101 * The unique key code for the key pressed.
106 * The key modifier for special keys like shift and alt
111 * The time (in ms) that the key event occurred.
116 * State of the key event.
122 * If this keystroke has modified a string in the middle of being composed - this string replaces the previous one.
127 * The name of device KeyEvent originated from
129 std::string deviceName;
132 * The class of device KeyEvent originated from
134 Device::Class::Type deviceClass;
137 * The subclass of device KeyEvent originated from
139 Device::Subclass::Type deviceSubclass;
142 } // namespace Integration
146 #endif // DALI_INTEGRATION_KEY_EVENT_H