KeyHandler // Allow numpad keys to be candidate keys.
This commit is contained in:
parent
69d93db68c
commit
ed42645034
|
@ -110,9 +110,10 @@ extension KeyHandler {
|
||||||
|
|
||||||
// 這裡必須用「isNumericPadAreaKey」這個以 KeyCode 判定數字鍵區輸入的方法來鎖定按鍵範圍。
|
// 這裡必須用「isNumericPadAreaKey」這個以 KeyCode 判定數字鍵區輸入的方法來鎖定按鍵範圍。
|
||||||
// 不然的話,會誤傷到在主鍵盤區域的功能鍵。
|
// 不然的話,會誤傷到在主鍵盤區域的功能鍵。
|
||||||
|
// 我們先規定允許小鍵盤區域操縱選字窗,其餘場合一律直接放行。
|
||||||
if input.isNumericPadAreaKey {
|
if input.isNumericPadAreaKey {
|
||||||
if !input.isLeft, !input.isRight, !input.isDown,
|
if !(state is InputState.ChoosingCandidate || state is InputState.AssociatedPhrases
|
||||||
!input.isUp, !input.isSpace, charCode.isPrintableASCII
|
|| state is InputState.SymbolTable)
|
||||||
{
|
{
|
||||||
clear()
|
clear()
|
||||||
stateCallback(InputState.Empty())
|
stateCallback(InputState.Empty())
|
||||||
|
|
Loading…
Reference in New Issue