harmony 鸿蒙@ohos.multimodalInput.inputDevice (Input Device)

2022-08-09 浏览 (901)

@ohos.multimodalInput.inputDevice (Input Device)

The inputDevice module allows you to listen for hot swap events of input devices and query information about input devices.

NOTE

The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Modules to Import

import inputDevice from '@ohos.multimodalInput.inputDevice';

inputDevice.getDeviceList9+

getDeviceList(callback: AsyncCallback<Array<number>>): void

Obtains the IDs of all input devices. This API uses an asynchronous callback to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
callbackAsyncCallback<Array<number>>YesCallback used to return the result.

Example

try {
  inputDevice.getDeviceList((error: Error, ids: Array<Number>) => {
    if (error) {
      console.log(`Failed to get device id list, error: ${JSON.stringify(error, [`code`, `message`])}`);
      return;
    }
    console.log(`Device id list: ${JSON.stringify(ids)}`);
  });
} catch (error) {
  console.log(`Failed to get device id list, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getDeviceList9+

getDeviceList(): Promise<Array<number>>

Obtains the IDs of all input devices. This API uses a promise to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Return value

ParametersDescription
Promise<Array<number>>Promise used to return the result.

Example

try {
  inputDevice.getDeviceList().then((ids: Array<Number>) => {
    console.log(`Device id list: ${JSON.stringify(ids)}`);
  });
} catch (error) {
  console.log(`Failed to get device id list, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getDeviceInfo9+

getDeviceInfo(deviceId: number, callback: AsyncCallback<InputDeviceData>): void

Obtains information about an input device. This API uses an asynchronous callback to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesID of the input device.
callbackAsyncCallback<InputDeviceData>YesCallback used to return the result, which is an InputDeviceData object.

Example

// Obtain the name of the device whose ID is 1.
try {
  inputDevice.getDeviceInfo(1, (error: Error, deviceData: inputDevice.InputDeviceData) => {
    if (error) {
      console.log(`Failed to get device info, error: ${JSON.stringify(error, [`code`, `message`])}`);
      return;
    }
    console.log(`Device info: ${JSON.stringify(deviceData)}`);
  });
} catch (error) {
  console.log(`Failed to get device info, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getDeviceInfo9+

getDeviceInfo(deviceId: number): Promise<InputDeviceData>

Obtains information about an input device. This API uses a promise to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesID of the input device.

Return value

ParametersDescription
Promise<InputDeviceData>Promise used to return the result.

Example

// Obtain the name of the device whose ID is 1.
try {
  inputDevice.getDeviceInfo(1).then((deviceData: inputDevice.InputDeviceData) => {
    console.log(`Device info: ${JSON.stringify(deviceData)}`);
  });
} catch (error) {
  console.log(`Failed to get device info, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getDeviceInfoSync10+

getDeviceInfoSync(deviceId: number): InputDeviceData

Obtains information about the specified input device.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesID of the input device.

Return value

ParametersDescription
InputDeviceDataInformation about the input device.

Example

// Obtain the name of the device whose ID is 1.
try {
  let deviceData: inputDevice.InputDeviceData = inputDevice.getDeviceInfoSync(1)
  console.log(`Device info: ${JSON.stringify(deviceData)}`)
} catch (error) {
  console.log(`Failed to get device info, error: ${JSON.stringify(error, [`code`, `message`])}`)
}

inputDevice.on9+

on(type: "change", listener: Callback<DeviceListener>): void

Enables listening for device hot swap events.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
typestringYesEvent type of the input device.
listenerCallback<DeviceListener>YesListener for events of the input device.

Example

let isPhysicalKeyboardExist = true;
try {
  inputDevice.on("change", (data: inputDevice.DeviceListener) => {
    console.log(`Device event info: ${JSON.stringify(data)}`);
    inputDevice.getKeyboardType(data.deviceId, (err: Error, type: inputDevice.KeyboardType) => {
      console.log("The keyboard type is: " + type);
      if (type == inputDevice.KeyboardType.ALPHABETIC_KEYBOARD && data.type == 'add') {
        // The physical keyboard is connected.
        isPhysicalKeyboardExist = true;
      } else if (type == inputDevice.KeyboardType.ALPHABETIC_KEYBOARD && data.type == 'remove') {
        // The physical keyboard is disconnected.
        isPhysicalKeyboardExist = false;
      }
    });
  });
  // Check whether the soft keyboard is open based on the value of isPhysicalKeyboardExist.
} catch (error) {
  console.log(`Get device info failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.off9+

off(type: "change", listener?: Callback<DeviceListener>): void

Disables listening for device hot swap events. This API is called before the application exits.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
typestringYesEvent type of the input device.
listenerCallback<DeviceListener>NoListener for events of the input device.

Example

function callback(data: inputDevice.DeviceListener) {
  console.log(`Report device event info: ${JSON.stringify(data, [`type`, `deviceId`])}`);
};

try {
  inputDevice.on("change", callback);
} catch (error) {
  console.log(`Listen device event failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

// Disable this listener.
try {
  inputDevice.off("change", callback);
} catch (error) {
  console.log(`Cancel listening device event failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

// Disable all listeners.
try {
  inputDevice.off("change");
} catch (error) {
  console.log(`Cancel all listening device event failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getDeviceIds(deprecated)

getDeviceIds(callback: AsyncCallback<Array<number>>): void

Obtains the IDs of all input devices. This API uses an asynchronous callback to return the result.

This API is deprecated since API version 9. You are advised to use inputDevice.getDeviceList instead.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
callbackAsyncCallback<Array<number>>YesCallback used to return the result.

Example

inputDevice.getDeviceIds((error: Error, ids: Array<Number>) => {
  if (error) {
    console.log(`Failed to get device id list, error: ${JSON.stringify(error, [`code`, `message`])}`);
    return;
  }
  console.log(`Device id list: ${JSON.stringify(ids)}`);
});

inputDevice.getDeviceIds(deprecated)

getDeviceIds(): Promise<Array<number>>

Obtains the IDs of all input devices. This API uses a promise to return the result.

This API is deprecated since API version 9. You are advised to use inputDevice.getDeviceList instead.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Return value

ParametersDescription
Promise<Array<number>>Promise used to return the result.

Example

inputDevice.getDeviceIds().then((ids: Array<Number>) => {
  console.log(`Device id list: ${JSON.stringify(ids)}`);
});

inputDevice.getDevice(deprecated)

getDevice(deviceId: number, callback: AsyncCallback<InputDeviceData>): void

Obtains information about an input device. This API uses an asynchronous callback to return the result.

This API is deprecated since API version 9. You are advised to use inputDevice.getDeviceInfo instead.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesID of the input device.
callbackAsyncCallback<InputDeviceData>YesCallback used to return the result, which is an InputDeviceData object.

Example

// Obtain the name of the device whose ID is 1.
inputDevice.getDevice(1, (error: Error, deviceData: inputDevice.InputDeviceData) => {
  if (error) {
    console.log(`Failed to get device info, error: ${JSON.stringify(error, [`code`, `message`])}`);
    return;
  }
  console.log(`Device info: ${JSON.stringify(deviceData)}`);
});

inputDevice.getDevice(deprecated)

getDevice(deviceId: number): Promise<InputDeviceData>

Obtains information about an input device. This API uses a promise to return the result.

This API is deprecated since API version 9. You are advised to use inputDevice.getDeviceInfo instead.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesID of the input device.

Return value

ParametersDescription
Promise<InputDeviceData>Promise used to return the result.

Example

// Obtain the name of the device whose ID is 1.
inputDevice.getDevice(1).then((deviceData: inputDevice.InputDeviceData) => {
  console.log(`Device info: ${JSON.stringify(deviceData)}`);
});

inputDevice.supportKeys9+

supportKeys(deviceId: number, keys: Array<KeyCode>, callback: AsyncCallback <Array<boolean>>): void

Obtains the keycodes supported by the input device. This API uses an asynchronous callback to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesUnique ID of the input device. If the same physical device is repeatedly inserted and removed, its ID changes.
keysArray<KeyCode>YesKeycodes to be queried. A maximum of five keycodes can be specified.
callbackAsyncCallback<Array<boolean>>YesCallback used to return the result.

Example

// Check whether the input device whose ID is 1 supports keycodes 17, 22, and 2055.
try {
  inputDevice.supportKeys(1, [17, 22, 2055], (error: Error, supportResult: Array<Boolean>) => {
    console.log(`Query result: ${JSON.stringify(supportResult)}`);
  });
} catch (error) {
  console.log(`Query failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.supportKeys9+

supportKeys(deviceId: number, keys: Array<KeyCode>): Promise<Array<boolean>>

Obtains the keycodes supported by the input device. This API uses a promise to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesUnique ID of the input device. If the same physical device is repeatedly inserted and removed, its ID changes.
keysArray<KeyCode>YesKeycodes to be queried. A maximum of five keycodes can be specified.

Return value

ParametersDescription
Promise<Array<boolean>>Promise used to return the result.

Example

// Check whether the input device whose ID is 1 supports keycodes 17, 22, and 2055.
try {
  inputDevice.supportKeys(1, [17, 22, 2055]).then((supportResult: Array<Boolean>) => {
    console.log(`Query result: ${JSON.stringify(supportResult)}`);
  });
} catch (error) {
  console.log(`Query failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.supportKeysSync10+

supportKeysSync(deviceId: number, keys: Array<KeyCode>): Array<boolean>

Checks whether the input device supports the specified keycode value.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesUnique ID of the input device. If the same physical device is repeatedly inserted and removed, its ID changes.
keysArray<KeyCode>YesKeycodes to be queried. A maximum of five keycodes can be specified.

Return value

ParametersDescription
Array<boolean>Result indicating whether the input device supports the keycode value. The value true indicates yes, and the value false indicates no.

Example

// Check whether the input device whose ID is 1 supports keycodes 17, 22, and 2055.
try {
  let supportResult: Array<Boolean> = inputDevice.supportKeysSync(1, [17, 22, 2055])
  console.log(`Query result: ${JSON.stringify(supportResult)}`)
} catch (error) {
  console.log(`Query failed, error: ${JSON.stringify(error, [`code`, `message`])}`)
}

inputDevice.getKeyboardType9+

getKeyboardType(deviceId: number, callback: AsyncCallback<KeyboardType>): void

Obtains the keyboard type of an input device. This API uses an asynchronous callback to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesUnique ID of the input device. If the same physical device is repeatedly inserted and removed, its ID changes.
callbackAsyncCallback<KeyboardType>YesCallback used to return the result.

Example

// Query the keyboard type of the input device whose ID is 1.
try {
  inputDevice.getKeyboardType(1, (error: Error, type: Number) => {
    if (error) {
      console.log(`Failed to get keyboard type, error: ${JSON.stringify(error, [`code`, `message`])}`);
      return;
    }
    console.log(`Keyboard type: ${JSON.stringify(type)}`);
  });
} catch (error) {
  console.log(`Failed to get keyboard type, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getKeyboardType9+

getKeyboardType(deviceId: number): Promise<KeyboardType>

Obtains the keyboard type of an input device. This API uses an asynchronous callback to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesUnique ID of the input device. If the same physical device is repeatedly inserted and removed, its ID changes.

Return value

ParametersDescription
Promise<KeyboardType>Promise used to return the result.

Example

// Query the keyboard type of the input device whose ID is 1.
try {
  inputDevice.getKeyboardType(1).then((type: Number) => {
    console.log(`Keyboard type: ${JSON.stringify(type)}`);
  });
} catch (error) {
  console.log(`Failed to get keyboard type, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getKeyboardTypeSync10+

getKeyboardTypeSync(deviceId: number): KeyboardType

Obtains the keyboard type of the input device.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

Parameters

NameTypeMandatoryDescription
deviceIdnumberYesUnique ID of the input device. If the same physical device is repeatedly inserted and removed, its ID changes.

Return value

ParametersDescription
KeyboardTypeKeyboard type.

Example

// Query the keyboard type of the input device whose ID is 1.
try {
  let type: number = inputDevice.getKeyboardTypeSync(1)
  console.log(`Keyboard type: ${JSON.stringify(type)}`)
} catch (error) {
  console.log(`Failed to get keyboard type, error: ${JSON.stringify(error, [`code`, `message`])}`)
}

inputDevice.setKeyboardRepeatDelay10+

setKeyboardRepeatDelay(delay: number, callback: AsyncCallback<void>): void

Sets the keyboard repeat delay. This API uses an asynchronous callback to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

System API: This is a system API.

Parameters

NameTypeMandatoryDescription
delaynumberYesKeyboard repeat delay, in ms. The value range is [300, 1000] and the default value is 500.
callbackAsyncCallback<void>YesCallback used to return the result.

Example

try {
  inputDevice.setKeyboardRepeatDelay(350, (error: Error) => {
    if (error) {
      console.log(`Set keyboard repeat delay failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
      return;
    }
    console.log(`Set keyboard repeat delay success`);
  });
} catch (error) {
  console.log(`Set keyboard repeat delay failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.setKeyboardRepeatDelay10+

setKeyboardRepeatDelay(delay: number): Promise<void>

Sets the keyboard repeat delay. This API uses a promise to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

System API: This is a system API.

Parameters

NameTypeMandatoryDescription
delaynumberYesKeyboard repeat delay, in ms. The value range is [300, 1000] and the default value is 500.

Return value

ParametersDescription
Promise<void>Promise used to return the result.

Example

try {
  inputDevice.setKeyboardRepeatDelay(350).then(() => {
    console.log(`Set keyboard repeat delay success`);
  });
} catch (error) {
  console.log(`Set keyboard repeat delay failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getKeyboardRepeatDelay10+

getKeyboardRepeatDelay(callback: AsyncCallback<number>): void

Obtains the keyboard repeat delay. This API uses an asynchronous callback to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

System API: This is a system API.

Parameters

NameTypeMandatoryDescription
callbackAsyncCallback<number>YesCallback used to return the result.

Example

try {
  inputDevice.getKeyboardRepeatDelay((error: Error, delay: Number) => {
    if (error) {
      console.log(`Get keyboard repeat delay failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
      return;
    }
    console.log(`Get keyboard repeat delay success`);
  });
} catch (error) {
  console.log(`Get keyboard repeat delay failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getKeyboardRepeatDelay10+

getKeyboardRepeatDelay(): Promise<number>

Obtains the keyboard repeat delay. This API uses a promise to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

System API: This is a system API.

Return value

ParametersDescription
Promise<number>Promise used to return the result.

Example

try {
  inputDevice.getKeyboardRepeatDelay().then((delay: Number) => {
    console.log(`Get keyboard repeat delay success`);
  });
} catch (error) {
  console.log(`Get keyboard repeat delay failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.setKeyboardRepeatRate10+

setKeyboardRepeatRate(rate: number, callback: AsyncCallback<void>): void

Sets the keyboard repeat rate. This API uses an asynchronous callback to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

System API: This is a system API.

Parameters

NameTypeMandatoryDescription
ratenumberYesKeyboard repeat rate, in ms/time. The value range is [36, 100] and the default value is 50.
callbackAsyncCallback<void>YesCallback used to return the result.

Example

try {
  inputDevice.setKeyboardRepeatRate(60, (error: Error) => {
    if (error) {
      console.log(`Set keyboard repeat rate failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
      return;
    }
    console.log(`Set keyboard repeat rate success`);
  });
} catch (error) {
  console.log(`Set keyboard repeat rate failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.setKeyboardRepeatRate10+

setKeyboardRepeatRate(rate: number): Promise<void>

Sets the keyboard repeat rate. This API uses a promise to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

System API: This is a system API.

Parameters

NameTypeMandatoryDescription
ratenumberYesKeyboard repeat rate, in ms/time. The value range is [36, 100] and the default value is 50.

Return value

ParametersDescription
Promise<void>Promise used to return the result.

Example

try {
  inputDevice.setKeyboardRepeatRate(60).then(() => {
    console.log(`Set keyboard repeat rate success`);
  });
} catch (error) {
  console.log(`Set keyboard repeat rate failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getKeyboardRepeatRate10+

getKeyboardRepeatRate(callback: AsyncCallback<number>): void

Obtains the keyboard repeat rate. This API uses an asynchronous callback to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

System API: This is a system API.

Parameters

NameTypeMandatoryDescription
callbackAsyncCallback<number>YesCallback used to return the result.

Example

try {
  inputDevice.getKeyboardRepeatRate((error: Error, rate: Number) => {
    if (error) {
      console.log(`Get keyboard repeat rate failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
      return;
    }
    console.log(`Get keyboard repeat rate success`);
  });
} catch (error) {
  console.log(`Get keyboard repeat rate failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

inputDevice.getKeyboardRepeatRate10+

getKeyboardRepeatRate(): Promise<number>

Obtains the keyboard repeat rate. This API uses a promise to return the result.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

System API: This is a system API.

Return value

ParametersDescription
Promise<number>Promise used to return the result.

Example

try {
  inputDevice.getKeyboardRepeatRate().then((rate: Number) => {
    console.log(`Get keyboard repeat rate success`);
  });
} catch (error) {
  console.log(`Get keyboard repeat rate failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
}

DeviceListener9+

Defines the listener for hot swap events of an input device.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

NameTypeReadableWritableDescription
typeChangedTypeYesNoDevice change type, which indicates whether an input device is inserted or removed.
deviceIdnumberYesNoUnique ID of the input device. If the same physical device is repeatedly inserted and removed, its ID changes.

InputDeviceData

Defines the information about an input device.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

NameTypeReadableWritableDescription
idnumberYesNoUnique ID of the input device. If the same physical device is repeatedly inserted and removed, its ID changes.
namestringYesNoName of the input device.
sourcesArray<SourceType>YesNoSource type of the input device. For example, if a keyboard is attached with a touchpad, the device has two input sources: keyboard and touchpad.
axisRangesArray<AxisRange>YesNoAxis information of the input device.
bus9+numberYesNoBus type of the input device.
product9+numberYesNoProduct information of the input device.
vendor9+numberYesNoVendor information of the input device.
version9+numberYesNoVersion information of the input device.
phys9+stringYesNoPhysical address of the input device.
uniq9+stringYesNoUnique ID of the input device.

AxisType9+

Defines the axis type of an input device.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

NameTypeReadableWritableDescription
touchmajorstringYesNotouchmajor axis.
touchminorstringYesNotouchminor axis.
toolminorstringYesNotoolminor axis.
toolmajorstringYesNotoolmajor axis.
orientationstringYesNoOrientation axis.
pressurestringYesNoPressure axis.
xstringYesNoX axis.
ystringYesNoY axis.
nullstringYesNoNone.

AxisRange

Defines the axis range of an input device.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

NameTypeReadableWritableDescription
sourceSourceTypeYesNoInput source type of the axis.
axisAxisTypeYesNoAxis type.
maxnumberYesNoMaximum value of the axis.
minnumberYesNoMinimum value of the axis.
fuzz9+numberYesNoFuzzy value of the axis.
flat9+numberYesNoBenchmark value of the axis.
resolution9+numberYesNoResolution of the axis.

SourceType9+

Input source type of the axis. For example, if a mouse reports an x-axis event, the input source of the x-axis is the mouse.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

NameTypeReadableWritableDescription
keyboardstringYesNoThe input device is a keyboard.
touchscreenstringYesNoThe input device is a touchscreen.
mousestringYesNoThe input device is a mouse.
trackballstringYesNoThe input device is a trackball.
touchpadstringYesNoThe input device is a touchpad.
joystickstringYesNoThe input device is a joystick.

ChangedType9+

Defines the change type for the hot swap event of an input device.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

NameTypeReadableWritableDescription
addstringYesNoAn input device is inserted.
removestringYesNoAn input device is removed.

KeyboardType9+

Enumerates the keyboard types.

System capability: SystemCapability.MultimodalInput.Input.InputDevice

NameValueDescription
NONE0Keyboard without keys.
UNKNOWN1Keyboard with unknown keys.
ALPHABETIC_KEYBOARD2Full keyboard.
DIGITAL_KEYBOARD3Keypad.
HANDWRITING_PEN4Stylus.
REMOTE_CONTROL5Remote control.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙APIs

harmony 鸿蒙System Common Events (To Be Deprecated Soon)

harmony 鸿蒙System Common Events

harmony 鸿蒙API Reference Document Description

harmony 鸿蒙Enterprise Device Management Overview (for System Applications Only)

harmony 鸿蒙BundleStatusCallback

harmony 鸿蒙@ohos.bundle.innerBundleManager (innerBundleManager)

harmony 鸿蒙@ohos.distributedBundle (Distributed Bundle Management)

harmony 鸿蒙@ohos.bundle (Bundle)

harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/1c1c7d3675bc4b88a514d7d038b6f8ac