hig-inputs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Apple HIG: Inputs

Apple HIG:输入方法

Check for
.claude/apple-design-context.md
before asking questions. Use existing context and only ask for information not already covered.
提问前请查看
.claude/apple-design-context.md
文件。请基于现有上下文提问,仅询问未被覆盖的信息。

Key Principles

核心原则

General

通用原则

  1. Support multiple input methods. Touch, pointer, keyboard, pencil, voice, eyes, hands, controllers. Design for the inputs available on each platform. On iPadOS, support both touch and pointer; on macOS, both pointer and keyboard.
  2. Consistent feedback for every input action. Visible, audible, or haptic response.
  1. 支持多种输入方式:触摸、指针、键盘、Apple Pencil、语音、眼球、手部、控制器。针对每个平台支持的输入方式进行设计。在iPadOS上,同时支持触摸和指针;在macOS上,同时支持指针和键盘。
  2. 为每个输入操作提供一致的反馈:视觉、听觉或触觉反馈。

Gestures

手势

  1. Standard gestures must behave consistently. Tap to activate, swipe to scroll/navigate, pinch to zoom, long press for context menus, drag to move. Don't override system gestures (edge swipes for back, Home, notifications).
  2. Use standard recognizers; keep custom gestures discoverable. Apple's built-in recognizers handle edge cases and accessibility. If you add non-standard gestures, provide hints or coaching to teach them.
  1. 标准手势的行为必须保持一致:轻点以激活、滑动以滚动/导航、捏合以缩放、长按调出上下文菜单、拖移以移动。请勿覆盖系统手势(如边缘滑动返回、回到主屏幕、查看通知)。
  2. 使用标准识别器,确保自定义手势可被发现:Apple的内置识别器可处理边缘情况并保障无障碍访问。如果添加非标准手势,请提供提示或引导来帮助用户了解。

Apple Pencil

Apple Pencil

  1. Precision drawing, markup, and selection. Support pressure, tilt, and hover. Distinguish finger from Pencil when appropriate (finger pans, Pencil draws).
  2. Support Scribble in text fields. Users expect to write with Pencil in any text input.
  1. 精准绘图、标记与选择:支持压力感应、倾斜和悬停。在合适的场景下区分手指与Apple Pencil操作(如手指用于平移,Apple Pencil用于绘图)。
  2. 在文本框中支持Scribble功能:用户期望能够在任意文本输入框中使用Apple Pencil书写。

Keyboards

键盘

  1. Keyboard shortcuts and full navigation. Standard shortcuts (Cmd+C/V/Z) plus custom ones visible in the iPadOS Command key overlay. Logical tab order.
  2. Respect the software keyboard. Adjust layout when keyboard appears. Use keyboard-avoidance APIs.
  1. 键盘快捷键与完整导航:标准快捷键(Cmd+C/V/Z)加上iPadOS Command键覆盖层中可见的自定义快捷键。合理的Tab键顺序。
  2. 尊重软件键盘:当键盘出现时调整布局。使用键盘避让API。

Game Controllers

游戏控制器

  1. MFi controllers with on-screen fallbacks. Map to extended gamepad profile, sensible defaults, remappable. Always offer touch or keyboard alternatives.
  1. MFi控制器搭配屏幕备选方案:映射到扩展游戏手柄配置文件,设置合理的默认值,支持重新映射。始终提供触摸或键盘替代方案。

Pointer and Trackpad

指针与触控板

  1. Native feel. Hover effects, pointer shape adaptation, standard cursor behaviors. Two-finger scroll, pinch to zoom, swipe to navigate.
  1. 原生体验:悬停效果、指针形状自适应、标准光标行为。双指滚动、捏合缩放、滑动导航。

Digital Crown

Digital Crown

  1. Primary scrolling and value-adjustment input on watchOS. Scrolling lists, adjusting values, navigating views. Haptic feedback at detents.
  1. watchOS上的主要滚动与数值调节输入方式:滚动列表、调节数值、导航视图。在定位点处提供触觉反馈。

Eyes and Spatial (visionOS)

眼球与空间交互(visionOS)

  1. Look and pinch. Generous hit targets (eye tracking is less precise than touch). Avoid sustained gaze for activation. Direct hand manipulation in immersive experiences.
  1. 注视与捏合:设置较大的点击目标(眼球追踪的精度低于触摸)。避免使用持续注视来触发操作。在沉浸式体验中支持直接手部操控。

Focus System

焦点系统

  1. Critical for tvOS and visionOS. Predictable focus movement. Every interactive element focusable. Clear visual indicators (scale, highlight, elevation). Logical focus groups.
  1. 对tvOS和visionOS至关重要:可预测的焦点移动。所有交互元素都可被聚焦。清晰的视觉指示器(缩放、高亮、抬升效果)。合理的焦点分组。

Remotes

遥控器

  1. Siri Remote: limited surface. Touch area for swiping, clickpad for selection, few physical buttons. Keep interactions simple.
  1. Siri Remote:操作区域有限:触摸区域用于滑动,触控板用于选择,物理按键数量少。保持交互简洁。

Motion and Nearby

运动与近距离交互

  1. Gyroscope, accelerometer, UWB: use judiciously. Suits gaming, fitness, AR. Not for essential tasks. Provide calibration and reset. For UWB, communicate distance and direction with visual or haptic cues.
  1. 陀螺仪、加速度计、UWB:谨慎使用:适用于游戏、健身、AR场景。请勿用于核心任务。提供校准和重置功能。对于UWB,使用视觉或触觉提示传达距离和方向信息。

Reference Index

参考索引

ReferenceTopicKey content
gestures.mdTouch gesturesTap, swipe, pinch, long press, drag, system gestures
apple-pencil-and-scribble.mdApple PencilPrecision, pressure, tilt, hover, handwriting
keyboards.mdKeyboardsShortcuts, navigation, software keyboard, Command key
game-controls.mdGame controllersMFi, extended gamepad, remapping, fallbacks
pointing-devices.mdPointer/trackpadHover, cursor morphing, trackpad gestures
digital-crown.mdDigital CrownScrolling, value adjustment, haptic detents
eyes.mdEye trackingLook and tap, gaze targeting, hit target sizing
spatial-interactions.mdSpatial inputHand gestures, direct manipulation, immersive input
focus-and-selection.mdFocus systemtvOS/visionOS navigation, focus indicators, groups
remotes.mdRemotesTouch surface, clickpad, simple interactions
gyro-and-accelerometer.mdMotion sensorsGyroscope, accelerometer, calibration, gaming
nearby-interactions.mdNearby interactionsU1 chip, directional finding, proximity triggers
camera-control.mdCamera ControliPhone camera hardware button, quick launch
参考文档主题核心内容
gestures.md触摸手势轻点、滑动、捏合、长按、拖移、系统手势
apple-pencil-and-scribble.mdApple Pencil精准度、压力感应、倾斜、悬停、手写
keyboards.md键盘快捷键、导航、软件键盘、Command键
game-controls.md游戏控制器MFi、扩展游戏手柄、重新映射、备选方案
pointing-devices.md指针/触控板悬停、光标形态变化、触控板手势
digital-crown.mdDigital Crown滚动、数值调节、触觉定位点
eyes.md眼球追踪注视与轻点、注视目标、点击目标尺寸
spatial-interactions.md空间输入手部手势、直接操控、沉浸式输入
focus-and-selection.md焦点系统tvOS/visionOS导航、焦点指示器、分组
remotes.md遥控器触摸区域、触控板、简洁交互
gyro-and-accelerometer.md运动传感器陀螺仪、加速度计、校准、游戏
nearby-interactions.md近距离交互U1芯片、方向查找、接近触发
camera-control.md相机控制iPhone相机硬件按键、快速启动

Output Format

输出格式

  1. Input method recommendations by platform and how they interact.
  2. Gesture specification table -- standard and custom gestures with expected behaviors.
  3. Keyboard shortcut recommendations following system conventions.
  4. Accessibility input alternatives for VoiceOver, Switch Control, etc.
  1. 按平台划分的输入方法建议及其交互方式。
  2. 手势规范表——标准和自定义手势及其预期行为。
  3. 遵循系统规范的键盘快捷键建议
  4. 无障碍输入替代方案,如VoiceOver、切换控制等。

Questions to Ask

需询问的问题

  1. Which platforms and input devices?
  2. Productivity or casual app?
  3. Custom gestures in the design?
  4. Game controller support needed?
  1. 针对哪些平台和输入设备?
  2. 是生产力类还是休闲类应用?
  3. 设计中是否包含自定义手势?
  4. 是否需要支持游戏控制器?

Related Skills

相关技能

  • hig-components-status -- Progress indicators responding to input (pull-to-refresh)
  • hig-components-system -- System experiences with unique input constraints
  • hig-technologies -- VoiceOver, Siri voice input, ARKit spatial gesture context

  • hig-components-status —— 响应输入的进度指示器(下拉刷新)
  • hig-components-system —— 具有独特输入限制的系统体验
  • hig-technologies —— VoiceOver、Siri语音输入、ARKit空间手势上下文