• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16export const Action = {
17    CANCEL: 0,
18    DOWN: 1,
19    UP: 2,
20}
21
22export function mockKeyEvent() {
23    const Key = {
24        code: '[PC preview] unknow code',
25        pressedTime: '[PC preview] unknow pressedTime',
26        deviceId: '[PC preview] unknow deviceId',
27    }
28    const KeyEvent = {
29        action: '[PC preview] unknow action',
30        key: Key,
31        unicodeChar: '[PC preview] unknow unicodeChar',
32        keys: ['[PC preview] unknow Key'],
33        ctrlKey: '[PC preview] unknow ctrlKey',
34        altKey: '[PC preview] unknow altKey',
35        shiftKey: '[PC preview] unknow shiftKey',
36        logoKey: '[PC preview] unknow logoKey',
37        fnKey: '[PC preview] unknow fnKey',
38        capsLock: '[PC preview] unknow capsLock',
39        numLock: '[PC preview] unknow numLock',
40        scrollLock: '[PC preview] unknow scrollLock',
41    }
42    const keyEvent = {
43        Action,
44    }
45    return keyEvent;
46}