On certain versions of Ubuntu there is a problem with "xset" and keyboard repeats from a terminal window.
Typical behaviour is that the initial run of the ConsoleApp demo is fine, subsequent runs will display an endless stream of enter key inputs.
I spent a some time trying to track this down when creating Cmake files for Linux/Mingw and it turns out it's related to an Ubuntu bug with the a11y-keyboard plugin.
The following link should resolve the problem and hopefully save others time who encounter this problem.
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/367136