5 * Copyright (c) 2019 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.
22 #include <dali/public-api/events/key-event.h>
25 #include <dali/public-api/dali-adaptor-common.h>
30 * @addtogroup dali_adaptor_framework
35 * @brief Enumeration for mapping keyboard and mouse button event keycodes to platform specific codes.
41 DALI_KEY_INVALID = -1, ///< Invalid key value @SINCE_1_0.0
42 DALI_KEY_ESCAPE = 9, ///< Escape key @SINCE_1_0.0
43 DALI_KEY_BACKSPACE = 22, ///< Backspace key @SINCE_1_0.0
44 DALI_KEY_SHIFT_LEFT = 50, ///< Shift Left key @SINCE_1_0.0
45 DALI_KEY_SHIFT_RIGHT = 62, ///< Shift Right key @SINCE_1_0.0
46 DALI_KEY_CURSOR_UP = 111, ///< Cursor up key @SINCE_1_0.0
47 DALI_KEY_CURSOR_LEFT = 113, ///< Cursor left key @SINCE_1_0.0
48 DALI_KEY_CURSOR_RIGHT = 114, ///< Cursor right key @SINCE_1_0.0
49 DALI_KEY_CURSOR_DOWN = 116, ///< Cursor down key @SINCE_1_0.0
50 DALI_KEY_BACK = 166, ///< Back key @SINCE_1_0.0
51 DALI_KEY_CAMERA = 167, ///< Camera key @SINCE_1_0.0
52 DALI_KEY_CONFIG = 168, ///< Config key @SINCE_1_0.0
53 DALI_KEY_POWER = 169, ///< Power key @SINCE_1_0.0
54 DALI_KEY_PAUSE = 170, ///< Pause key @SINCE_1_0.0
55 DALI_KEY_CANCEL = 171, ///< Cancel key @SINCE_1_0.0
56 DALI_KEY_PLAY_CD = 172, ///< Play CD key @SINCE_1_0.0
57 DALI_KEY_STOP_CD = 173, ///< Stop CD key @SINCE_1_0.0
58 DALI_KEY_PAUSE_CD = 174, ///< Pause CD key @SINCE_1_0.0
59 DALI_KEY_NEXT_SONG = 175, ///< Next song key @SINCE_1_0.0
60 DALI_KEY_PREVIOUS_SONG = 176, ///< Previous song key @SINCE_1_0.0
61 DALI_KEY_REWIND = 177, ///< Rewind key @SINCE_1_0.0
62 DALI_KEY_FASTFORWARD = 178, ///< Fastforward key @SINCE_1_0.0
63 DALI_KEY_MEDIA = 179, ///< Media key @SINCE_1_0.0
64 DALI_KEY_PLAY_PAUSE = 180, ///< Play pause key @SINCE_1_0.0
65 DALI_KEY_MUTE = 181, ///< Mute key @SINCE_1_0.0
66 DALI_KEY_MENU = 182, ///< Menu key @SINCE_1_0.0
67 DALI_KEY_HOME = 183, ///< Home key @SINCE_1_0.0
68 DALI_KEY_HOMEPAGE = 187, ///< Homepage key @SINCE_1_0.0
69 DALI_KEY_WEBPAGE = 188, ///< Webpage key @SINCE_1_0.0
70 DALI_KEY_MAIL = 189, ///< Mail key @SINCE_1_0.0
71 DALI_KEY_SCREENSAVER = 190, ///< Screensaver key @SINCE_1_0.0
72 DALI_KEY_BRIGHTNESS_UP = 191, ///< Brightness up key @SINCE_1_0.0
73 DALI_KEY_BRIGHTNESS_DOWN = 192, ///< Brightness down key @SINCE_1_0.0
74 DALI_KEY_SOFT_KBD = 193, ///< Soft KBD key @SINCE_1_0.0
75 DALI_KEY_QUICK_PANEL = 194, ///< Quick panel key @SINCE_1_0.0
76 DALI_KEY_TASK_SWITCH = 195, ///< Task switch key @SINCE_1_0.0
77 DALI_KEY_APPS = 196, ///< Apps key @SINCE_1_0.0
78 DALI_KEY_SEARCH = 197, ///< Search key @SINCE_1_0.0
79 DALI_KEY_VOICE = 198, ///< Voice key @SINCE_1_0.0
80 DALI_KEY_LANGUAGE = 199, ///< Language key @SINCE_1_0.0
81 DALI_KEY_VOLUME_UP = 200, ///< Volume up key @SINCE_1_0.0
82 DALI_KEY_VOLUME_DOWN = 201 ///< Volume down key @SINCE_1_0.0
86 * @brief Checks if a key event is for a specific DALI KEY.
89 * @param keyEvent reference to a keyEvent structure
90 * @param daliKey Dali key enum
91 * @return @c true if the key is matched, @c false if not
93 DALI_ADAPTOR_API bool IsKey( const Dali::KeyEvent& keyEvent, Dali::KEY daliKey);
100 #endif // __DALI_KEY_H__