Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

實現行列的傳統功能(沒有用lua) #12

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,24 @@

以`` ` ``鍵開始輸入[拼音](https://github.com/rime/rime-luna-pinyin)以反查行列碼。

### 簡碼及特別碼選字處理
### 簡碼

本方案現時會將特別碼顯示於選字欄的首候選字,同官方輸入規則一樣在輸入特別碼後按空白即可選出該字
一、二级簡碼已編排數字鍵位,空碼位以「□」代替。欲上屏簡碼可以透過「數字鍵」來選擇

一、二級簡碼暫未編排數字鍵位,同碼的簡碼字只會順序於選字欄列出。
![按下qq後的示例](img/簡碼輸入示例.png)

### 特別碼

按下「空白鍵」可自動上屏特別碼,例如:按下`t` + `Space`將上屏「的」。


### 重碼字

按下「空白鍵」上屏文字時,若該碼位只有一個字,則會自動上屏;否則就要用「數字鍵」選擇或者再按一次「空白鍵」。

> 欲輸入「不」,可以透過`z` + `Space` + `1`或`z` + `Space` + `Space`

![按下z space的示例](img/重碼字示例.png)

## 授權條款

Expand Down
29 changes: 25 additions & 4 deletions array30.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ schema:
- 發明人 廖明德先生
- Jiehong Ma <[email protected]>
- Terry Tsang <[email protected]>
- Jeang Bo Yuan <[email protected]>
description: |
行列30輸入法
http://www.array.com.tw/
dependencies:
- array30_wsymbols
- array30_query
- luna_quanpin

switches:
Expand All @@ -31,6 +33,8 @@ switches:
states: [ 。,, ., ]
- name: emoji_suggestion
states: [ "🈚️", "🈶️" ]
- name: null2square
reset: 1

menu:
page_size: 10
Expand Down Expand Up @@ -65,6 +69,7 @@ engine:
- simplifier@emoji_suggestion
- uniquifier
- reverse_lookup_filter@reverse_lookup_array30 # 反查
- simplifier@null2square # 將簡碼中的空碼位以「□」顯示

array30_format:
- 'xform|^A$|🙂|' # Smileys & Emotion
Expand Down Expand Up @@ -107,23 +112,33 @@ array30_format:
- 'xform|\.|9↓|'
- 'xform|/|0↓|'
- 'xform|~| |' # 消除逐鍵提示前綴'~'
- 'xform|!|特|'
- 'xform|@|簡|'

speller:
alphabet: "abcdefghjiklmnopqrstuvwxyz;,./?'ABCDEFGHIJKLMNOPQRSTUVWXYZ"
auto_select: true
auto_select_pattern: "^[a-z;,./]+[ ]$" # 自動上屏特別碼
alphabet: "abcdefghjiklmnopqrstuvwxyz;,./'ABCDEFGHIJKLMNOPQRSTUVWXYZ " # 「空格」 -> 特別碼、重碼
initials: "abcdefghjiklmnopqrstuvwxyz;,./ASDFGHJKL"
finals: "'ZXCVBNMQWERTYUIOP "
use_space: true
delimiter: "\\"
algebra:
- xform/^(.*)!$/$1/ # 簡碼
- xform/^(.*)@$/$1/ # 特別碼(須置於簡碼之後)
- xform|^([a-z;,./]+)[!]?$|$1 | # 重碼和特別碼都以「空格」結尾
- xform|^([a-z;,./]+)[@]$|$1| # 簡碼,去掉@後綴

translator:
dictionary: array30
enable_charset_filter: true
enable_user_dict: true # 用戶詞典。主要用於調頻
enable_completion: true # 預設啟動逐鍵提示,照顧emoji輸入
disable_user_dict_for_patterns:
- "^[^ASDFGHJKL].?$" # 單碼及雙碼不調頻,以保持簡碼位置。Emoji例外
- "^[a-z;,./]+[! @]?$" # 特別碼、重碼、簡碼
- "^w[0-9]$" # w + 數字鍵
preedit_format:
__include: array30_format
__append:
- "xform| |重|"
comment_format:
__include: array30_format

Expand Down Expand Up @@ -160,6 +175,12 @@ emoji_suggestion:
option_name: emoji_suggestion
tips: all

null2square:
opencc_config: null2square.json
option_name: null2square
tips: none
inherit_comment: true

# 反查拼音用translator
luna_pinyin:
tag: luna_pinyin
Expand Down
2 changes: 1 addition & 1 deletion array30_emoji.dict.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ sort: original
😶 AE
😶‍🌫️ AE
😏 AE
😒 Ae
😒 AE
🙄 AE
😬 AE
😮‍💨 AE
Expand Down
Loading