HarmonyOS ArkUI Event Handling: Mouse and Keyboard Events
Mouse Events
The onMouse event handler responds to various user interactions with the mouse interface. This callback function triggers when users perform mouse actions on the UI, enabling developers to capture and respond to mouse clicks, movements, scrolling, hovering, and other mouse-related operations.
The syntax for the onMouse event handle ...
Posted on Tue, 19 May 2026 06:32:44 +0000 by bdamod1
Advanced Interaction Patterns with Composite Gestures in ArkUI
ArkUI facilitates sophisticated user inputs by allowing developers to chain or merge basic touch primitives into composite actions. The primary mechanism is the GestureGroup constructor, which evaluates multiple gesture nodes simultaneously or sequentially based on a specified mode.
GestureGroup(mode: GestureMode, ...gestureNodes: GestureNode[] ...
Posted on Mon, 18 May 2026 06:03:59 +0000 by dark_destroyer
Handling Mouse and Keyboard Interactions in HarmonyOS ArkUI
HarmonyOS ArkUI provides a structured event system for capturing peripheral input. Effective UI development requires precise management of pointer tracking, visual feedback, and hardware keyboard interception.
Pointer Hover Detection
The onHover modifier monitors when a pointing device enters or exits a component's bounding box. It supplies a b ...
Posted on Sun, 17 May 2026 05:58:08 +0000 by spirp
Building Dynamic Lists in ArkUI for HarmonyOS
Axis ConfigurationBy default, the List component arranges its items vertically, automatically enabling vertical scrolling. To create a horizontally scrolling list, assign Axis.Horizontal to the listDirection property. The default value is Axis.Vertical.List() {
// ...
}
.listDirection(Axis.Horizontal)
Cross-Axis LayoutThe cross-axis layout is ...
Posted on Tue, 12 May 2026 14:55:02 +0000 by freeloader
Implementing Navigation and Tab Layout in HarmonyOS
Router Configuration
Add the router map reference in module.json5:
"routerMap": "$profile:route_map"
Route Map Definition
Create route_map.json in resources/base/profile/:
{
"routerMap": [
{
"name": "LaunchScreen",
"pageSourceFile": "src/main/ets/components/Laun ...
Posted on Sun, 10 May 2026 06:57:57 +0000 by silversinner