Skip to content

Commit

Permalink
More input improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
jbanana committed Sep 7, 2024
1 parent 2a42f35 commit 1c6c0e3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions TinyEdit/te_btn.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def repeatPress( abOk ):

def which( abOk = True ):
global keyMode
#oldKeyMode = keyMode
timePassed = ticks_diff( ticks_ms(), baseTicks )
result = None
if keyMode == REPEATING:
Expand All @@ -68,14 +67,13 @@ def which( abOk = True ):
elif keyMode == PRESSED:
if timePassed > REPEAT_THRESHOLD_MS:
keyMode = REPEATING
resetTimeCounter()
result = repeatPress( abOk )
if not result:
keyMode = NORMAL
resetTimeCounter()
else:
resetTimeCounter()
result = normalPress()
if result:
keyMode = PRESSED
#if oldKeyMode != keyMode: print( oldKeyMode, '->', keyMode, '-', result )
return result

0 comments on commit 1c6c0e3

Please sign in to comment.