Skip to content

LayoutSwitchKey 布局切换键

切换到指定的文本键盘布局。常用于在 QWERTY ↔ 数字符号 ↔ 符号面板之间跳转。

字段

字段类型必填说明
typestring固定为 "LayoutSwitchKey"
labelstring键面主标签,如 "?123""ABC"
subLabelstring目标布局名;留空表示回到默认文本键盘
swipeobject一个 MacroAction,可用作滑动备用动作
swipeLabelstring滑动时显示的提示文字
weight / rowHeightPercent / 颜色字段共通字段相同

切换"层" vs 切换"布局文件"

  • LayoutSwitchKey 切换的是键盘布局目标:subLabel 为内置布局名、布局文件中的 layout key,或空字符串
  • 如果只是在当前输入方案布局内切换"层",用 MacroKeylayer step

示例

json
{ "type": "LayoutSwitchKey", "label": "?123", "subLabel": "Symbol" }
json
{
  "type": "LayoutSwitchKey",
  "label": "ABC",
  "subLabel": "",
  "swipe": { "macro": [ { "type": "text", "text": " " } ] }
}

相关页面

本项目基于 fcitx5-android/fcitx5-android 修改。源码与文档以 LGPL-2.1 发布。