From ed4264503496027fff3ba660302390f7e7502470 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 25 Jul 2022 08:16:26 +0800 Subject: [PATCH] KeyHandler // Allow numpad keys to be candidate keys. --- .../Modules/ControllerModules/KeyHandler_HandleInput.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift index ee83d184..8a475086 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift @@ -110,9 +110,10 @@ extension KeyHandler { // 這裡必須用「isNumericPadAreaKey」這個以 KeyCode 判定數字鍵區輸入的方法來鎖定按鍵範圍。 // 不然的話,會誤傷到在主鍵盤區域的功能鍵。 + // 我們先規定允許小鍵盤區域操縱選字窗,其餘場合一律直接放行。 if input.isNumericPadAreaKey { - if !input.isLeft, !input.isRight, !input.isDown, - !input.isUp, !input.isSpace, charCode.isPrintableASCII + if !(state is InputState.ChoosingCandidate || state is InputState.AssociatedPhrases + || state is InputState.SymbolTable) { clear() stateCallback(InputState.Empty())