Skip to content

Commit

Permalink
Merge pull request #2 from w-sx/master
Browse files Browse the repository at this point in the history
• Fix errors caused by rapidly pressing the spacebar in Microsoft Input Method
  • Loading branch information
cary-rowen authored Nov 22, 2024
2 parents 11cd34f + 6eef12c commit b563993
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addon/globalPlugins/ime_expressive.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def reportFocus(self): pass
candidateList=[]
selectedIndex=0
def handleInputCandidateListUpdate(self,candidatesString,selectionIndex,inputMethod):
if inputMethod == 'ms' and self.inputEnd: return
global pt,lastCandidate
if candidatesString:
ct=time.time()
Expand Down Expand Up @@ -228,6 +229,7 @@ def getDescribedSymbols(self,candidate):

isSkip=False
def handleInputCompositionStart(self,compositionString,selectionStart,selectionEnd,isReading):
self.inputEnd = False
if self.isSkip:
self.isSkip=False
return
Expand Down Expand Up @@ -290,7 +292,9 @@ def speakPunc(self,isl=False):
charInfo.move(textInfos.UNIT_CHARACTER,1)
api.setReviewPosition(charInfo)

inputEnd = True
def clear_ime(self):
self.inputEnd = True
global lastCandidate
if api.getNavigatorObject() and api.getNavigatorObject().windowText=='Microsoft Text Input Application' and (not api.getNavigatorObject().isFocusable): self.setNavigatorObject(api.getFocusObject())
lastCandidate=''
Expand Down

0 comments on commit b563993

Please sign in to comment.