Yes, the PR is too big, but there was no real alternative—all the changes are interrelated.
I fervently hope this will be the last mass update to Leo's gui code.
Rather than obsessing over diffs, I relied on all my testing tools. It was rather like flying on instruments.
The highlight of this PR is a much-improved LeoKeyEvent.__init__ method. It:
- Performs thorough checks on incoming Qt key events.
- Supports enhanced key tracing (--trace=keys).
I'll wait for your comments before merging this code into the "6.8.9" branch. Please continue testing the "devel" branch!
Edward
P.S. Several key-related quirps remain. See
#4652.
--trace=keys reveals that these issues are "upstream"
from LeoKeyEvent.__init__. That is, the issues happen before the ctor
is called. Sometimes Qt calls
k.masterKeyHandler without calling the ctor. Sometimes Qt doesn't call either method.
To
summarize, the fix for #4652 has little to do with PR #4646. I
expect the new PR will be just a few lines long, but finding those lines
will be a challenge. Happily, #4652 has a low priority. I have bigger
bugs to fix.
EKR