diff --git a/api/@ohos.multimodalInput.keyEvent.d.ets b/api/@ohos.multimodalInput.keyEvent.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..3c223674cc6a76f4072be786faddb5205bc9dadc --- /dev/null +++ b/api/@ohos.multimodalInput.keyEvent.d.ets @@ -0,0 +1,214 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit InputKit + */ + +import { InputEvent } from './@ohos.multimodalInput.inputEvent'; +import { KeyCode } from './@ohos.multimodalInput.keyCode'; +/** + * Action + * + * @enum { number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ +export declare enum Action { + /** + * Cancel key + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + CANCEL = 0, + + /** + * Down key + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + DOWN = 1, + + /** + * Up key + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + UP = 2 +} + +/** + * Key + * + * @typedef Key + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ +export declare interface Key { + /** + * Key code + * @type { KeyCode } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + code: KeyCode; + + /** + * Time when the key is pressed + * @type { number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + pressedTime: number; + + /** + * Device to which the key belongs + * @type { number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + deviceId: number; +} + +/** + * KeyEvent + * + * @typedef KeyEvent + * @extends InputEvent + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ +export declare interface KeyEvent extends InputEvent { + /** + * Key action + * @type { Action } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + action: Action; + + /** + * Key that has changed + * @type { Key } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + key: Key; + + /** + * Unicode character corresponding to the key + * @type { number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + unicodeChar: number; + + /** + * List of pressed keys + * @type { Key[] } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + keys: Key[]; + + /** + * Whether ctrlKey is being pressed + * @type { boolean } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + ctrlKey: boolean; + + /** + * Whether altKey is being pressed + * @type { boolean } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + altKey: boolean; + + /** + * Whether shiftKey is being pressed + * @type { boolean } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + shiftKey: boolean; + + /** + * Whether logoKey is being pressed + * @type { boolean } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + logoKey: boolean; + + /** + * Whether fnKey is being pressed + * @type { boolean } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + fnKey: boolean; + + /** + * Whether capsLock is active + * @type { boolean } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + capsLock: boolean; + + /** + * Whether numLock is active + * @type { boolean } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + numLock: boolean; + + /** + * Whether scrollLock is active + * @type { boolean } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @atomicservice + * @since 20 + */ + scrollLock: boolean; +} \ No newline at end of file diff --git a/api/@ohos.multimodalInput.touchEvent.d.ets b/api/@ohos.multimodalInput.touchEvent.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..43c0728ef35edfbcc05790297c34ad827410a37f --- /dev/null +++ b/api/@ohos.multimodalInput.touchEvent.d.ets @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit InputKit + */ + +import { InputEvent } from './@ohos.multimodalInput.inputEvent'; + +/** + * ToolType + * + * @enum { number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 9 + */ +export declare enum ToolType { + /** + * Finger + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + */ + FINGER = 0, + + /** + * Stylus + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + */ + PEN = 1, + + /** + * Rubber + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + */ + RUBBER = 2, + + /** + * Brush + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + */ + BRUSH = 3, + + /** + * Pencil + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + */ + PENCIL = 4, + + /** + * Air brush + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + */ + AIRBRUSH = 5, + + /** + * Mouse + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + */ + MOUSE = 6, + + /** + * lens + * + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + */ + LENS = 7 +}