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>
35 * An instance of this class should be used by the adaptor to send a key event to
39 struct DALI_CORE_API KeyEvent : public Event
42 // Specifies the state of the key event.
45 DOWN, /**< Key down */
56 * @param[in] keyName The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
57 * @param[in] logicalKey The logical key symbol (eg. shift + 1 == "exclamation")
58 * @param[in] keyString The string of input characters or key pressed
59 * @param[in] keyCode The unique key code for the key pressed.
60 * @param[in] keyModifier The key modifier for special keys like shift and alt
61 * @param[in] timeStamp The time (in ms) that the key event occurred.
62 * @param[in] keyState The state of the key event.
63 * @param[in] compose The key compose
64 * @param[in] deviceName The name of device KeyEvent originated from
65 * @param[in] deviceClass The class of device KeyEvent originated from
66 * @param[in] deviceSubclass The subclass of device KeyEvent originated from
68 KeyEvent(const std::string& keyName,
69 const std::string& logicalKey,
70 const std::string& keyString,
73 unsigned long timeStamp,
74 const State& keyState,
75 const std::string& compose,
76 const std::string& deviceName,
77 const Device::Class::Type deviceClass,
78 const Device::Subclass::Type deviceSubclass );
88 * The name of the key pressed or command from the IMF
93 * The logical key symbol
95 std::string logicalKey;
98 * The string of input characters or key pressed
100 std::string keyString;
103 * The unique key code for the key pressed.
108 * The key modifier for special keys like shift and alt
113 * The time (in ms) that the key event occurred.
118 * State of the key event.
124 * If this keystroke has modified a string in the middle of being composed - this string replaces the previous one.
129 * The name of device KeyEvent originated from
131 std::string deviceName;
134 * The class of device KeyEvent originated from
136 Device::Class::Type deviceClass;
139 * The subclass of device KeyEvent originated from
141 Device::Subclass::Type deviceSubclass;
144 } // namespace Integration
148 #endif // DALI_INTEGRATION_KEY_EVENT_H