SuperAPI AI Directory

hmos-multidevice-interaction-methods

Frontend & websites

View repository

Updated 10-16 03:11

About this skill

Interaction Method Adaptation

Skill Overview

HarmonyOS application interaction method adaptation skill, providing interaction solutions and unified interaction strategies for multiple input methods such as touch, mouse, keyboard, and stylus Applicable device types: phone / tablet / 2in1 / tv Applicable scope: interaction normalization, mouse hover, context menus, focus navigation, keyboard shortcuts, stylus input Not applicable: purely visual animation fine-tuning, business process transformation unrelated to input methods

Core Constraints

  • First clarify the primary input method and compatible input methods of the current page, then decide the interaction model.
  • Prioritize interaction normalization solutions to avoid maintaining completely independent primary flows for different input methods.
  • When involving a mouse or touchpad, hover, right-click, and drag feedback must be supplemented.
  • When involving the keyboard, the focus order, arrow key behavior, and shortcut key behavior must be clarified.
  • When involving a stylus, touch and press must be distinguished.
  • When multiple inputs coexist, a priority strategy must be provided.

Stage Tags

Tag Stage Current Module Focus
REQ Requirements Analysis and Design Primary input method, compatible input methods, interaction boundaries
DEV Development Event wiring, focus chain, hover and shortcut key implementation
FIX Bug Fixing Focus breaks, no mouse feedback, shortcut key conflicts, stylus anomalies
VAL Feature Verification Input matrix, focus path, hover effect verification, shortcut key verification

Unified Output Fields

  • Routing Fields:active_phases、primary_phase、primary_scene、secondary_scenes、resources_used
  • REQ:device_constraints、capability_boundary、acceptance_focus
  • DEV:code_touchpoints、reuse_resources、implementation_notes、integration_risks
  • FIX:problem_profile、root_cause_hypothesis、fix_plan、regression_watchlist
  • VAL:verification_matrix、evidence_requirements、pass_criteria、residual_risks

Field Definitions

  • device_constraints: refers to the interaction hard constraints brought about by differences in touch, mouse, keyboard, stylus, or external input devices. In interaction-methods , it is usually which input methods must be supported, whether hover or focus is required, and whether shortcut keys are a mandatory capability.
  • capability_boundary: refers to which input methods the current interaction solution covers, which input paths can be degraded, and which behaviors only take effect on specific devices.
  • acceptance_focus: refers to the focus chain, hover feedback, shortcut key behavior, and multi-input fallback strategy that must be confirmed during acceptance in the requirements stage.
  • In scene, deliverables.REQ appears device_constraints, indicating that "after this interaction scenario is matched, the input adaptation boundaries must first be clarified in the requirements stage", not that the field is being renamed.

Scenario Decision Tree

开始
  │
  ├─→ 步骤1: 分析是否涉及鼠标交互(右键菜单,鼠标悬浮)
  │     └─→ 涉及 → 命中 `INPUT-01` -> 步骤2
  │     └─→ 不涉及 → 步骤3
  │
  ├─→ 步骤2: 分析是否涉及交互归一化,即一套组件同时支持触摸和鼠标
  │     └─→ 涉及 → 命中 `INPUT-02` -> 步骤3
  │     └─→ 不涉及 → 步骤3
  │
  ├─→ 步骤3: 分析是否涉及键盘交互(焦点导航、样式或键盘快捷键)
  │     └─→ 涉及 → 命中 `INPUT-03` -> 步骤4
  │     └─→ 不涉及 → 步骤4
  │
  └─→ 步骤4: 分析是否涉及手写笔交互(手写笔交互,压感)
        └─→ 涉及 → 命中 `INPUT-04` -> 结束
        └─→ 不涉及 → 结束

Scenario Index

INPUT-01 Mouse device interaction (click, hover, context menu)

Stage: REQ, DEV, FIX

Applicable Scenarios

  • The page needs to target a PC or tablet with an external mouse
  • The current problem manifests as no feedback on mouse hover or no menu on right-click

Inapplicable Scenarios

  • The page only targets pure touch devices

Key Decisions

  • Clarify the interaction hierarchy of hover state feedback, context menus, and drag gestures
  • Decide whether to provide additional shortcut operations for desktop devices

File Reading

REQ Stage

DEV phase

FIX phase


INPUT-02 Interaction Normalization

Phase: REQ, DEV, FIX

Applicable scenarios

  • The same component needs to be compatible with both touch and mouse
  • The current problem manifests as different input methods following different main flows

Inapplicable scenarios

  • The current page supports only a single input method

Key decisions

  • Choose a unified event entry point and differentiated feedback exit points
  • Determine the priority among long press, right click, and drag

File reading

REQ phase

DEV phase

FIX phase


INPUT-03 Keyboard Focus Navigation and Shortcuts

Phase: REQ, DEV, FIX

Applicable scenarios

  • When the page needs focus navigation, arrow-key focus switching, or keyboard shortcuts
  • The current problem manifests as disordered focus order or shortcut conflicts

Inapplicable scenarios

  • The page does not support keyboard input at all

Key decisions

  • Define the focus order, arrow-key mappings, and shortcut namespaces
  • Determine the boundary between automatic navigation and manual navigation

File reading

REQ phase

DEV phase

FIX phase


INPUT-04 Stylus Input and Pen-State Interaction

Phase: REQ, DEV, FIX

Applicable scenarios

  • The page needs to support stylus touch, press, or hover
  • The current problem manifests as confusion between pen input and finger input

Inapplicable scenarios

  • The target device does not support a stylus

Key decisions

  • Distinguish pen input from ordinary touch input
  • Determine the feedback methods for hover, press, and ink preview

File reading

REQ phase

DEV phase

FIX Phase


Phase Output Contract

REQ

  • Must output:active_phases、primary_phase、primary_scene、secondary_scenes
  • Must output:device_constraints、capability_boundary、acceptance_focus
  • Additional requirement: clarify the primary input method, compatible input methods, and whether input priority exists

DEV

  • Must output:code_touchpoints、reuse_resources、implementation_notes、integration_risks
  • Additional requirement: clarify the event entry point, focus management entry point, and shortcut key trigger logic

FIX

  • Must output:problem_profile、root_cause_hypothesis、fix_plan、regression_watchlist
  • Additional requirement: clarify whether the issue is missing event normalization, an incorrect focus chain, missing hover feedback, or incorrect stylus input routing

VAL

  • Must output:verification_matrix、evidence_requirements、pass_criteria、residual_risks
  • Additional requirement: cover at least the applicable combinations among the three input categories of touch, mouse or trackpad, and keyboard; if it hits INPUT-04, stylus verification must also be performed