tari-project / tari-launchpad

A node, wallet and miner for Tari focusing on ease of use
BSD 3-Clause "New" or "Revised" License
8 stars 15 forks source link

fix: don't spam key events #266

Closed stringhandler closed 7 months ago

stringhandler commented 7 months ago

Description

Only propagate events on KeyRelease.

Motivation and Context

Previously, all keyboard events, Down, Repeat, Up would trigger this event. We only need the first down or release. Doing actions on release might be a bit strange though, so I'll also try with KeyDown. I'm not super familiar with cross term though

How Has This Been Tested?

Set your keyboard repeat rate to high to test the code before this change, then try it with this change

CjS77 commented 7 months ago

Note: This breaks launchpad in Linux & Mac