2021-11-10 12:46 AM
In our GUI we need to trigger a visible change when a physical button is pressed and another change when it is released. When using real hardware I can supply separate key codes for key pressed and released events from the ButtonController class, but i cannot find any way to do this in the simulator.
2021-11-10 10:01 PM
I figured it out myself. It can be done by modifying the the taskEntry() method and the sampleKey() method in the HALSDL2 class. The event.key.repeat variable must be checked in the SDL_KEYDOWN and SDL_KEYUP events because SDL generates repeated key events.
I ended up creating an own derived HAL class because I did not want to modify the original one.