burn icon indicating copy to clipboard operation
burn copied to clipboard

Exit event handler if KeyEvent is of release kind

Open amfaber opened this issue 1 year ago • 1 comments

Hello, I just ran through the MNIST example in the book, and I am really impressed with the project so far! Great balance between explicitness and easy of use.

A fantastic touch to have metrics shown in a tui by default as well, though I noticed that on my Windows computer, each arrow key press changed the metric being displayed twice - once on pressing and once on release. Due to the example having only two metrics, this meant that I needed to hold down the key and hope that I landed on the correct metric when I let go.

I just had a quick go at fixing this issue by early-returning from the event handler if the KeyEvent is of the Release variant.

All checks passed with run-checks.ps1 all

amfaber avatar Dec 30 '23 18:12 amfaber

@amfaber can you rebase your PR on top of main ? It should fixes the CI checks.

syl20bnr avatar Jan 09 '24 10:01 syl20bnr

@syl20bnr rebased it myself. Lets push this PR through before the upcoming release.

antimora avatar Jan 30 '24 23:01 antimora

Thank you @antimora ! I merged it (although the tests are not passing) as the scope of the change is trivial and we know that CI is broken for another reason.

syl20bnr avatar Jan 31 '24 03:01 syl20bnr