Repository navigation
Makes the timeout for multiple keypress configurable #12049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
f1b94b0
a843751
06c8eb3
417af9f
977c0e5
3973885
7a55b1e
dfe94bf
1c88c49
f48c690
c988293
24a2e94
440eb90
da822d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -290,7 +290,10 @@ def executeScript(script, gesture): | |
| try: | ||
| scriptTime = time.time() | ||
| scriptRef = weakref.ref(scriptFunc) | ||
| if (scriptTime - _lastScriptTime) <= 0.5 and scriptFunc == lastScriptRef: | ||
| if ( | ||
| (scriptTime - _lastScriptTime) * 1000 <= config.conf["keyboard"]["multiPressTimeout"] | ||
| and scriptFunc == lastScriptRef | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @CyrilleB79 you asked what I meant about "preferred linting" or some such phrase I used. I meant, NVDA's preferred coding style. However, I checked |
||
| ): | ||
| _lastScriptCount += 1 | ||
| else: | ||
| _lastScriptCount = 0 | ||
|
|
@@ -311,7 +314,7 @@ def getLastScriptRepeatCount(): | |
| @returns: a value greater or equal to 0. If the script has not been repeated it is 0, if it has been repeated once its 1, and so forth. | ||
| @rtype: integer | ||
| """ | ||
| if (time.time() - _lastScriptTime) > 0.5: | ||
| if (time.time() - _lastScriptTime) * 1000 > config.conf["keyboard"]["multiPressTimeout"]: | ||
| return 0 | ||
| else: | ||
| return _lastScriptCount | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.