(self, cbTS, opened)
| 2456 | |
| 2457 | # 鍵盤開啟/關閉時會被呼叫 (在 Windows 10 Ctrl+Space 時) |
| 2458 | def onKeyboardStatusChanged(self, cbTS, opened): |
| 2459 | if opened: # 鍵盤開啟 |
| 2460 | self.resetComposition(cbTS) |
| 2461 | self.resetCompositionBuffer(cbTS) |
| 2462 | else: # 鍵盤關閉,輸入法停用 |
| 2463 | self.resetComposition(cbTS) |
| 2464 | self.resetCompositionBuffer(cbTS) |
| 2465 | |
| 2466 | # Windows 8 systray IME mode icon |
| 2467 | if cbTS.client.isWindows8Above: |
| 2468 | # 若鍵盤關閉,我們需要把 widnows 8 mode icon 設定為 disabled |
| 2469 | cbTS.changeButton("windows-mode-icon", enable=opened) |
| 2470 | # FIXME: 是否需要同時 disable 其他語言列按鈕? |
| 2471 | |
| 2472 | |
| 2473 | # 當中文編輯結束時會被呼叫。若中文編輯不是正常結束,而是因為使用者 |
nothing calls this directly
no test coverage detected