We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
GuidesSystemHardwarePen KitAbout This Kit

About This Kit

Pen Kit is a handwriting suite provided by Huawei. It provides functions such as brush effect, handwriting editing, point prediction, instant shape, global color picker, and stylus interaction. Pen Kit can bring a premium handwriting experience to your products and create more handwriting application scenarios.

Pen Kit currently features five capabilities: handwriting suite, point prediction, Instant Shape, global color picker, and stylus interaction.

Handwriting Suite

It can be directly integrated into apps. After that, the apps will have the following features:

  • Canvas

    Supports features such as handwriting, handwriting saving, canvas zooming, and Instant Shape.

  • Toolbar

    • Brush: Offers seven brush effects, including ballpoint pen, pen, pencil, marker pen, highlighter, mosaic pen, and laser pointer with five brush widths and over 100 colors to choose from.
    • Rubber: Erases strokes, erases pixels, erases only the highlighter, and clears strokes.
    • Lasso: Enables operations including select, move, cut and paste, copy and paste, delete, and resize.
    • Preset shape tool: Since API version 26.0.0, enables operations including expanding second-level menus, adjusting shape types and line thickness, changing line colors via the palette, and recording and retaining shape parameter information. Supported shape types include rectangle, circle, arrow, and straight line, with line width ranging from 1 to 10. The default width is 4. By default, the ball-point brush is used for drawing images.
    • Handwriting menu: Since API version 26.0.0, introduces a radial toolbar that enables quick adjustment of properties such as brush effect, width, color, and opacity. Squeezing the stylus body hides the original toolbar and expands the radial toolbar. Squeezing again hides the radial toolbar.
    • Other features: Supports operations such as undo, redo, and block finger input.

Point Prediction

Touch points can be predicted and drawn in advance based on the writing track, reducing the latency. This capability is enabled in the handwriting suite by default, and can be integrated into your app on a separate basis.

Instant Shape

This capability can be triggered by holding the stylus/finger on the screen for a certain period of time when a stroke ends and then identifies the stroke as a regular shape. It is enabled in the handwriting suite by default, and can be integrated into your app on a separate basis. Pen Kit can identify the following shapes:

Expand
Type Shape
Line segment Straight line segment, line segment with arrow(s)
Circle Circle, oval
Polygon Triangle, rectangle, parallelogram, diamond, pentagon, pentagram
Curve Parabola, parabola with arrow(s)

Global Color Picker

It provides the basic capability of picking colors from the entire screen.

Stylus Interaction

It provides the capability of listening for stylus double-tap and squeeze events.

Restrictions

Supported Countries/Regions

Currently, this kit is available only in the Chinese mainland.

Supported Devices

This kit is applicable only to phones, tablets, and PCs/2-in-1 devices.

For details about the models of phones, tablets, and PCs/2-in-1 devices that support stylus hardware, please refer to the list of HUAWEI phones that are compatible with the stylus and the list of HUAWEI tablet/laptop models that support HUAWEI styluses.

Emulator Support

Currently, this kit is not supported on the Emulator.