The source project of this merge request has been removed.
Avoid shortening the keycodes GArray while walking it.
Overwrite values to be removed with UINT_MAX and remove them from the array in a separate loop.
Problem reported and solution suggested by @cemeyer in merge request !1 (merged)
I still have to test this code. I'm publishing the merge request to get comments on the approach.
Edited by Gaël Bonithon