1 #ifndef __DALI_INTEGRATION_KEY_EVENT_H__
2 #define __DALI_INTEGRATION_KEY_EVENT_H__
5 * Copyright (c) 2018 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 */
58 * @param[in] keyName The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
59 * @param[in] logicalKey The logical key symbol (eg. shift + 1 == "exclamation")
60 * @param[in] keyString A string of input characters or key pressed
61 * @param[in] keyCode The unique key code for the key pressed.
62 * @param[in] keyModifier The key modifier for special keys like shift and alt
63 * @param[in] timeStamp The time (in ms) that the key event occurred.
64 * @param[in] keyState The state of the key event.
65 * @param[in] compose The key compose
66 * @param[in] deviceName Name of device KeyEvent originated from
67 * @param[in] deviceClass Class of device KeyEvent originated from
68 * @param[in] deviceSubclass Subclass of device KeyEvent originated from
70 KeyEvent(const std::string& keyName,
71 const std::string& logicalKey,
72 const std::string& keyString,
75 unsigned long timeStamp,
76 const State& keyState,
77 const std::string& compose,
78 const std::string& deviceName,
79 const Device::Class::Type deviceClass,
80 const Device::Subclass::Type deviceSubclass );
83 * Constructor, creates a Integration::KeyEvent from a Dali::KeyEvent
84 * @param[in] event Dali::KeyEvent to convert from
86 explicit KeyEvent( const Dali::KeyEvent& event );
96 *@copydoc Dali::KeyEvent::keyPressedName
101 * The logical key symbol
103 std::string logicalKey;
106 *@copydoc Dali::KeyEvent::keyPressed
108 std::string keyString;
111 * @copydoc Dali::KeyEvent::keyCode
116 *@copydoc Dali::KeyEvent::keyModifier
121 *@copydoc Dali::KeyEvent::time
126 * State of the key event.
132 * A string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one.
137 * Name of device KeyEvent originated from
139 std::string deviceName;
142 * Class of device KeyEvent originated from
144 Device::Class::Type deviceClass;
147 * Subclass of device KeyEvent originated from
149 Device::Subclass::Type deviceSubclass;
152 } // namespace Integration
156 #endif // __DALI_INTEGRATION_KEY_EVENT_H__