HomeWildfire Games

Implement keyDown event
AuditedrP23701

Description

Implement keyDown event
Change HotkeyPress event to be non-repeating (HotkeyDown to replace the repeating case)
Fix shiftlag
Make toggle hotkeys only respond to the first SDL event.

Many iterations of review by: elexis

Test done by: Imarok
Comments By: vladislav, Stan
Reviewed By: wraitii
Fixes: #5055
Differential Revision: https://code.wildfiregames.com/D1398

Event Timeline

nani raised a concern with this commit.Mar 26 2021, 12:59 PM
nani added a subscriber: nani.

KeyDown event still keeps being called after being pressed down.
Example: add a warn inside stopUnits functions and see how it repeats.

This commit now has outstanding concerns.Mar 26 2021, 12:59 PM
bb requested verification of this commit.Mar 26 2021, 1:08 PM

That is a feature not a bug. Keydown should repeat, keyPress should fire just once. StopUnits has been explicitly discussed to be keyDown (hence repeating), (One reason being ungarrison, another being units going the attack)

This commit now requires verification by auditors.Mar 26 2021, 1:08 PM
nani accepted this commit.Mar 26 2021, 1:11 PM
In rP23701#50076, @bb wrote:

That is a feature not a bug. Keydown should repeat, keyPress should fire just once. StopUnits has been explicitly discussed to be keyDown (hence repeating), (One reason being ungarrison, another being units going the attack)

Okey thanks, was testing and monitoring key events that are sent to the gui and got confused.

All concerns with this commit have now been addressed.Mar 26 2021, 1:11 PM