How to create a custom Gumball?

Yeah, we’re listening to keyboard events and changing functionality based on user input.

As for the code example:

EDIT: You might also want to check this one out: