# Rime schema
# encoding: utf-8

schema:
  schema_id: combo_pinyin
  name: 宮保拼音
  version: '2.0'
  author:
    - 居戎氏 <chen.sst@gmail.com>
  description: |
    並擊輸入拼音
    https://github.com/rime/home/wiki/ComboPinyin

switches:
  - name: ascii_mode
    reset: 0
    states: [ 中文, 西文 ]
  - name: full_shape
    states: [ 半角, 全角 ]
  - name: simplification
    states: [ 漢字, 汉字 ]
  - name: ascii_punct
    states: [ 。，, ．， ]

engine:
  processors:
    - ascii_composer
    - recognizer
    - chord_composer  # 實現並擊按鍵處理
    - key_binder
    - speller
    - punctuator
    - selector
    - navigator
    - express_editor
  segmentors:
    - ascii_segmentor
    - matcher
    - abc_segmentor
    - punct_segmentor
    - fallback_segmentor
  translators:
    - punct_translator
    - script_translator
  filters:
    - simplifier
    - uniquifier

chord_composer:

editor:
  bindings:
    BackSpace: back_syllable

speller:
  alphabet: "zyxwvutsrqponmlkjihgfedcba'"
  initials: "zyxwvutsrqponmlkjihgfedcba"
  delimiter: " "
  algebra:
    # 拼音音節一律後加隔音符號，避免音節切分歧義
    - "xform/^([a-z]+)$/$1'/"

translator:
  dictionary: luna_pinyin
  prism: combo_pinyin
  preedit_format:
    - xform/([nl])v/$1ü/
    - xform/([nl])ue/$1üe/
    - xform/([jqxy])v/$1u/
    - "xform/' /'/"

punctuator:
  import_preset: default

key_binder:
  import_preset: default

recognizer:
  import_preset: default

__patch:
  # 默認七指禪（大衆式）
  - combo_pinyin_layouts:/use_gia_layout
  # 解封下列代碼，選用其他佈局選項
  # 八指禪，默認字母A = h
  # - combo_pinyin_layouts:/use_zhia_layout
  # 八指禪：選定左手拇指 h 鍵
  # - combo_pinyin_layouts:/use_semicolon
  # - combo_pinyin_layouts:/use_apostrophe
  # - combo_pinyin_layouts:/use_control
  # - combo_pinyin_layouts:/use_alt
  # - combo_pinyin_layouts:/use_shift
  # 九指禪
  # - combo_pinyin_layouts:/use_gya_layout
  # 十指禪，左、右拇指鍵設爲：空格鍵、單引號鍵
  # - combo_pinyin_layouts:/use_gywa_layout
  # 十指禪·Emacs用家，左、右拇指鍵設爲：Control鍵、空格鍵
  # - combo_pinyin_layouts:/use_gywa_emacsen_layout

  # 使用八股文語言模型
  - grammar:/hant?

  # 用家自選配置
  - combo_pinyin.custom:/patch?
