[dali_2.3.23] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / internal / input / windows / key-mapping-win.cpp
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/input/common/key-impl.h>
20
21 namespace Dali
22 {
23 namespace Internal
24 {
25 namespace Adaptor
26 {
27 namespace KeyLookup
28 {
29 // matches a DALI_KEY enum, to key name
30 // clang-format off
31 KeyLookup KeyLookupTable[]=
32 {
33   // more than one key name can be assigned to a single dali-key code
34   // e.g. "Menu" and "XF86Menu" are both assigned to  DALI_KEY_MENU
35
36   { "Escape",                DALI_KEY_ESCAPE,                                            false },
37   { "Menu",                  DALI_KEY_MENU,                                              false },
38   { "Cancel",                DALI_KEY_CANCEL,                                            false },
39
40   { "BackSpace",             DALI_KEY_BACKSPACE,                                         false },
41   { "Up",                    DALI_KEY_CURSOR_UP,                                         false }, // To be removed after the key name is fixed in the platform
42   { "Left",                  DALI_KEY_CURSOR_LEFT,                                       false },
43   { "Right",                 DALI_KEY_CURSOR_RIGHT,                                      false },
44   { "Down",                  DALI_KEY_CURSOR_DOWN,                                       false }, // To be removed after the key name is fixed in the platform
45   { "Shift_L",               DALI_KEY_SHIFT_LEFT,                                        false },
46   { "Shift_R",               DALI_KEY_SHIFT_RIGHT,                                       false },
47   { "Delete",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_DELETE ),        false },
48   { "Control_L",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_LEFT ),  false },
49   { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false }
50 };
51 // clang-format on
52
53 const std::size_t KEY_LOOKUP_COUNT = (sizeof(KeyLookupTable)) / (sizeof(KeyLookup));
54
55 } // namespace KeyLookup
56
57 } // namespace Adaptor
58
59 } // namespace Internal
60
61 } // namespace Dali