Skip to content

Commit e325d31

Browse files
committed
Fix the broken input for phonetic symbols 'ㄦ'.
1 parent a637e8c commit e325d31

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/input_methods/braille_chewing/braille_chewing_ime.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,26 +195,26 @@ def handle_braille_keys(self, keyEvent):
195195
bopomofo_seq = '˙'
196196
elif current_braille == '156': # 'ㄦ'
197197
# 如果 ㄦ 前面是舌尖音則呼略 ㄦ
198-
if bopomofo_is_category(last_bopomofo[-1], "舌尖音"):
199-
bopomofo_seq = ''
198+
if last_bopomofo and bopomofo_is_category(last_bopomofo[-1], "舌尖音"):
199+
bopomofo_seq = last_bopomofo
200200
else:
201-
import winsound
201+
bopomofo_seq = 'ㄦ'
202202
else:
203203
bopomofo_seq = None
204204

205205
if self.last_braille and bopomofo_seq: # 如果有剛剛無法判斷注音的六點輸入,和現在的輸入接在一起判斷
206206
if bopomofo_is_category(bopomofo_seq, "韻母") or (bopomofo_is_category(bopomofo_seq, "疊韻") and bopomofo_seq[0] == 'ㄨ') or bopomofo_seq == 'ㄨ':
207207
# 韻母 或 ㄨ疊韻 或ㄨ直接當韻母
208208
last_bopomofo = {'13': 'ㄍ', '15': 'ㄙ', '245': 'ㄘ'}.get(self.last_braille)
209-
bopomofo_seq = last_bopomofo + bopomofo_seq
209+
bopomofo_seq = last_bopomofo + bopomofo_seq
210210
elif bopomofo_seq in ('ㄧ', 'ㄩ') or (bopomofo_is_category(bopomofo_seq, "疊韻") and bopomofo_seq[0] in ('ㄧ', 'ㄩ')):
211211
# ㄧ,ㄩ疊韻 或 ㄧ、、ㄩ直接當韻母
212212
last_bopomofo = {'13': 'ㄐ', '15': 'ㄒ', '245': 'ㄑ'}.get(self.last_braille)
213213
bopomofo_seq = last_bopomofo + bopomofo_seq
214214
else:
215215
bopomofo_seq = None
216216

217-
#print(current_braille, "=>", bopomofo_seq)
217+
print(current_braille, "=>", bopomofo_seq)
218218
if bopomofo_seq:
219219
# 把注音送給新酷音
220220
self.send_bopomofo_to_chewing(bopomofo_seq, keyEvent)

0 commit comments

Comments
 (0)