Memphiz/xbmc — comment on commit 9b9732fef463d2f7aef0fd226d468ce215879834
File:  line 0
By jmarshallnz:

Over-engineered, yup, but mostly because XBMC already does most of that stuff for you ;)

A couple of points.

1. Things that generally need acceleration in XBMC already automatically do that acceleration for you. All you need do is:
a. Send repeat CKey objects to OnKey() reasonably frequently (once a frame is enough).
b. Make sure the holdTime is set to the length of time the key has been held down.
c. You might need an initial delay before sending the repeat events - not 100% sure. Most places that support held/repeated events handle it already I think, but you might want to check how SDLKeyboard is set up.

2. The code would be simpler without pointers in the queue/deque.

3. You may wish to consider having it at a higher level again (CKey level rather than at the Event level?) - the code would essentially be the same both ways.