Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
237 lines (214 sloc) 6.42 KB
# Rime schema
# encoding: utf-8
schema:
schema_id: combo_pinyin_kbcon_left
name: 宮保拼音·鍵盤控式·空格居左
version: "1.5"
author:
- 佛振 <chen.sst@gmail.com>
description: |
並擊輸入拼音,適用「鍵盤控」佈局。
https://github.com/rime/home/wiki/ComboPinyinKBCon
佈局:
Ln Dt u I O
S Cr Z* Gk i* N E
Fm Bp er yu U E'
H* A*
標「*」的按鍵爲拇指、食指的基準鍵位
E' 是 E 的活用鍵位,只用於組合韻母
組合鍵:
# 組合聲母
BH = p, BF = m, DH = t, DL = n, GH = k,
ZH = zh, CH = ch, SH = sh, ZC = r
# 組合韻母及活用(同「大衆式」),括弧內爲活用組合
AI = ai, EI (OI) = ei, AU = ao, U (E'U) = ou,
uI = uei, uAI = uai, iU (yuU) = iou, iAU (yuAU) = iao,
N = en, NE = eng, AN = an, ANE = ang,
iN = in, uN = uen, yuN = yun,
iNE = ing, uNE (uIO) = ong, yuNE (yuUE') = iong,
uANE (uAIO) = uang
「鍵盤控」兼容佈局(適用標準 PC 鍵盤):
(C') Ln Dt (T') u I O A'
H' S Cr Z* Gk i* N E A
(Z') Fm Bp (P') er yu U E'
H*
標「*」的按鍵爲拇指、食指的基準鍵位
加 () 的冗餘按鍵,是爲方便用家從「大衆式」過渡到本式而增設
組合鍵增補:
# PC 鍵盤組合聲母及活用
BH' (BZ') = p, BF = m, DH' (DC') = t, DL = n, GH' (GC) = k,
ZH' (ZS) = zh, CH' = ch, SH' = sh, ZC = r
uIOA' = uNEA = uang
# 兼容「大衆式」聲母
P' = p, T' = t, FZ' = zh, LC' = ch, CS = sh
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
editor:
bindings:
BackSpace: back_syllable
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- erase/^xx$/
chord_composer:
# 字母表,包含用於並擊的按鍵
# 擊鍵雖有先後,形成並擊時,一律以字母表順序排列
alphabet: 'gtbfrvdecswxa hynjump;ki,/lo.'
# 拼寫運算規則,將一組並擊編碼轉換爲拼音音節
algebra:
# 先將物理按鍵字符對應到宮保拼音鍵位中的拼音字母
- 'xlit|gtbfrvdecswxa hynjump;ki,/lo.|gtpzdbclfsczHhXYRiuVAaNIUWeoE|'
# 以下根據宮保拼音的鍵位分別變換聲母、韻母部分
# 鍵盤控專用拇指位 h 聲母鍵單擊時發送空格(音節 he 拼作 H+E)
- 'xform/^h$/ /'
# 以下統一表記爲 h
- xform/Hh?/h/
# 以下統一表記爲 a
- xform/Aa?/a/
# 組合聲母
- xform/^bh/p/
- xform/^dh/t/
- xform/^gh/k/
#- xform/^fh/v/
- xform/^bf/m/
- xform/^dl/n/
- xform/^zc/r/
# PC 鍵盤組合聲母
- xform/^b[zcsh]+/p/
- xform/^d[zcsh]+/t/
- xform/^g[zcsh]+/k/
- xform/^[zr][sh]+/zh/
- xform/^csh/ch/
# 兼容大衆式
- xform/^cs/sh/
- xform/^lc/ch/
- xform/^fz/zh/
# 消除多餘的 h
- xform/([^zcs])h/\1/
# g,k,h 接 i/ü 時作 ji/ju, qi/qu, xi/xu
- xform/^[gz]([iV])/j$1/
- xform/^[kc]([iV])/q$1/
- xform/^[hs]([iV])/x$1/
# 單擊時發送標點符號
- xform/^U$/,/
- xform/^E$/./
- xform|^W$|/|
# a 鍵單擊時錄入拼音音節 a,而標點符號 ; 改用 Shift+; 輸入
#- 'xform/^a$/;/'
- xform/^ae$/a/
- xform/^R$/er/
# 40% 鍵盤可啓用這二鍵輸入標點符號及翻頁,但會影響回車輸入字母
#- xform/^Y$/,/
#- xform/^X$/./
- xform/[XYR]+//
# 上排三鍵並擊 ong, uang
- xform/(ua?)Io$/$1Ne/
- xform/aI$/ai/
- xform/I[oe]$/ei/
- xform/uI$/uei/
# I 鍵亦可用作韻母 ‹i›
- xform/^gI$/ji/
- xform/^kI$/qi/
- xform/^hI$/xi/
- xform/I$/i/
# 下排三鍵並擊 iong
- xform/V(UE$|U?WE)$/VNe/
- xform/Va(UE$|U?WE)$/uaNe/
# [ü] 活用爲介音 ‹i-› 以利於並擊 iao, iu
- xform/V(a?[UW])$/i$1/
- xform/a[UW]E?$/ao/
- xform/[UW]E?$|U?W$/ou/
- xform/([aiuV])Ne$/$1ng/
# ‹eng› 省略 ‹e›
- xform/Ne$/eng/
- xform/^ung$/weng/
- xform/ung$/ong/
- xform/Vng$/iong/
- xform/([aiuV])N$/$1n/
# ‹en› 省略 ‹e›
- xform/N$/en/
- xform/^un$/wen/
# 漢語拼音方案的拼寫規則
- xform/^i(ng?)$/yi$1/
- xform/^i$/yi/
- xform/^i/y/
- xform/^u$/wu/
- xform/^u/w/
- xform/^V/yu/
- xform/^([jqx])V/$1u/
# 一些容錯
- xform/^([zcsr]h?)i([aoe])/$1$2/
- xform/^([zcsr]h?)i(ng?)$/$1e$2/
# 拼寫規則
- xform/iou$/iu/
- xform/uei$/ui/
- xlit/VE/ve/
# 聲母獨用時補足隠含的韻母
- xform/^([bpf])$/$1u/
- xform/^([mdtnlgkh])$/$1e/
- xform/^([mdtnlgkh])$/$1e/
- xform/^([zcsr]h?)$/$1i/
# 並擊完成後套用的式樣
output_format:
# 追加隔音符號
- "xform/^([bpm])([iu]|a|i?e|o|[ae]i|i?ao|[oi]u|i?an|[ie]n|[ei]ng|ang|ong)$/$1$2'/"
- "xform/^([fw])(u|a|o|[ae]i|ao|ou|an|en|eng|ang|ong)$/$1$2'/"
- "xform/^([dtnl])([iuv]|i?a|[iv]?e|u?o|[aeu]i|i?ao|[oi]u|[iu]?an|[iue]n|[ei]ng|i?ang|ong)$/$1$2'/"
- "xform/^([gkh])(u|u?a|e|uo|u?ai|[ue]i|ao|ou|u?an|[ue]n|eng|u?ang|ong)$/$1$2'/"
- "xform/^([zcs]h?|r)([iu]|u?a|e|uo|u?ai|[ue]i|ao|ou|u?an|[ue]n|eng|u?ang|ong)$/$1$2'/"
- "xform/^([jqxy])([iu]|i?a|[iu]?e|o|i?ao|[oi]u|[iu]?an|[iu]n|ing|i?ang|i?ong)$/$1$2'/"
- "xform/^([aeo]|[ae]i|ao|ou|[ae]ng?|er)$/$1'/"
# 消除不構成合法音節的並擊組合
- "erase/^([A-Za-z]+)$/"
# 並擊過程中套用的式樣
prompt_format:
# 加方括弧
- 'xform/^(.*)$/[$1]/'
translator:
dictionary: luna_pinyin
prism: combo_pinyin_kbcon_left
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
punctuator:
import_preset: default
half_shape: &punct
':': [ ':', ';' ]
full_shape: *punct
key_binder:
import_preset: default
recognizer:
import_preset: default
You can’t perform that action at this time.