skills/harmonyos-ai-agent-skill/references/hmos-multidevice-interaction-methods/SKILL.md
HarmonyOS应用多设备交互适配开发方案skill,提供触摸、鼠标、键盘、手写笔等多输入方式的交互方案和统一策略。当涉及触摸、鼠标、键盘、手写笔等设备的交互以及实现交互归一化、悬停效果、右键菜单、焦点导航、手写板输入和压感等功能时调用。
npx skillsauth add openharmonyinsight/openharmony-skills hmos-multidevice-interaction-methodsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
HarmonyOS应用交互方式适配skill,为触摸、鼠标、键盘、手写笔等多输入方式提供交互方案和统一交互策略 适用设备(device types): phone / tablet / 2in1 / tv 适用范围:交互归一化、鼠标悬浮、右键菜单、焦点导航、键盘快捷键、手写笔输入 不适用范围: 纯视觉动画微调、与输入方式无关的业务流程改造
| 标签 | 阶段 | 当前模块关注点 |
| --- | --- | --- |
| REQ | 需求分析设计 | 主输入方式、兼容输入方式、交互边界 |
| DEV | 开发 | 事件接线、焦点链路、悬浮和快捷键实现 |
| FIX | 问题修复 | 焦点断裂、鼠标无反馈、快捷键冲突、手写笔异常 |
| VAL | 功能验证 | 输入矩阵、焦点路径、悬浮效果验证、快捷键验证 |
active_phases、primary_phase、primary_scene、secondary_scenes、resources_usedREQ:device_constraints、capability_boundary、acceptance_focusDEV:code_touchpoints、reuse_resources、implementation_notes、integration_risksFIX:problem_profile、root_cause_hypothesis、fix_plan、regression_watchlistVAL:verification_matrix、evidence_requirements、pass_criteria、residual_risksdevice_constraints:指由触摸、鼠标、键盘、手写笔或外接输入设备差异带来的交互硬约束。在 interaction-methods 中,通常是哪些输入方式必须支持、是否必须有 hover 或 focus、快捷键是否是必选能力。capability_boundary:指当前交互方案覆盖哪些输入方式,哪些输入路径可以降级,哪些行为只在特定设备上生效。acceptance_focus:指需求阶段验收时必须确认的焦点链路、悬浮反馈、快捷键行为和多输入回退策略。deliverables.REQ 出现 device_constraints,表示“该交互场景命中后,需求阶段必须先明确输入适配边界”,不是对字段重新命名。开始
│
├─→ 步骤1: 分析是否涉及鼠标交互(右键菜单,鼠标悬浮)
│ └─→ 涉及 → 命中 `INPUT-01` -> 步骤2
│ └─→ 不涉及 → 步骤3
│
├─→ 步骤2: 分析是否涉及交互归一化,即一套组件同时支持触摸和鼠标
│ └─→ 涉及 → 命中 `INPUT-02` -> 步骤3
│ └─→ 不涉及 → 步骤3
│
├─→ 步骤3: 分析是否涉及键盘交互(焦点导航、样式或键盘快捷键)
│ └─→ 涉及 → 命中 `INPUT-03` -> 步骤4
│ └─→ 不涉及 → 步骤4
│
└─→ 步骤4: 分析是否涉及手写笔交互(手写笔交互,压感)
└─→ 涉及 → 命中 `INPUT-04` -> 结束
└─→ 不涉及 → 结束
INPUT-01 鼠标设备交互(点击,悬浮,右键菜单)阶段: REQ, DEV, FIX
REQ阶段
DEV阶段
FIX阶段
INPUT-02 交互归一化阶段: REQ, DEV, FIX
REQ阶段
DEV阶段
FIX阶段
INPUT-03 键盘焦点导航与快捷键阶段: REQ, DEV, FIX
REQ阶段
DEV阶段
FIX阶段
INPUT-04 手写笔输入与笔态交互阶段: REQ, DEV, FIX
REQ阶段
DEV阶段
FIX阶段
REQactive_phases、primary_phase、primary_scene、secondary_scenesdevice_constraints、capability_boundary、acceptance_focusDEVcode_touchpoints、reuse_resources、implementation_notes、integration_risksFIXproblem_profile、root_cause_hypothesis、fix_plan、regression_watchlistVALverification_matrix、evidence_requirements、pass_criteria、residual_risksINPUT-04,还要进行手写笔验证development
Run local code quality checks covering a subset of OpenHarmony gate CI (copyright, CodeArts C/C++) plus additional local checks (pylint/flake8, shellcheck/bashate, gn format). Use before committing to reduce gate failures. Triggers on: /oh-precommit-codecheck, "门禁检查", "门禁预检", "检查代码", "run codecheck", "check code quality", "lint my code", "代码检查", or after completing code implementation. WHEN to use: before git commit, before creating PR, after modifying C/C++/Python/Shell/GN files, when gate CI fails with codecheck defects, or when you want to preview what gate will flag.
development
OpenHarmony PR full lifecycle workflow. Five modes: - Commit: standardized commit with DCO sign-off and Issue linking - Create PR: commit + push to fork + create Issue + create PR on upstream - Fix Codecheck: fetch gate CI codecheck defects from a PR and auto-fix them - Review PR: fetch a PR's changes to local for code review - Fix Review: fetch unresolved review comments from a PR and auto-fix them Triggers on: /oh-pr-workflow, "提交代码", "创建PR", "提个PR", "commit", "修复告警", "修复门禁", "修复codecheck", "fix codecheck", "review pr", "review这个pr", "看下这个pr", "检视pr", "修复review", "修复检视意见", "fix review", or a GitCode PR URL with fix/review intent.
testing
分析 HM Desktop PRD 文档,提取需求信息、验证完整性、检查章节顺序(需求来源→需求背景→需求价值分析→竞品分析→需求描述)、检查 KEP 定义、检测需求冲突并生成结构化分析报告。适用于用户请求:(1) 分析或审查 PRD 文档, (2) 从需求中提取 KEP 列表, (3) 检查 PRD 完整性或一致性, (4) 将需求映射到模块架构, (5) 验证 PRD 格式合规性, (6) 验证竞品分析章节完整性。关键词:PRD分析, requirement extraction, KEP验证, completeness check, chapter order validation, 竞品分析检查, analyze PRD, 需求提取, 完整性检查, 章节顺序验证
development
基于 PRD 文档自动生成鸿蒙系统设计文档,包括架构设计文档和功能设计文档。生成前会分析 OpenHarmony 存量代码结构,确保与现有架构兼容。架构设计文档第2章必须为竞品方案分析,位于需求背景之后。适用于用户请求:(1) 生成架构设计文档, (2) 生成功能设计文档, (3) 从 PRD 生成设计文档, (4) 创建系统架构设计, (5) 编写功能规格说明, (6) 分析 OH 代码结构。关键词:architecture design, functional design, design doc, 竞品方案分析, OpenHarmony code analysis, 架构设计, 功能设计, 设计文档生成, OH代码分析, analyze codebase, competitor analysis