Updated myApp.lua template

added proper stubs for events
fixed K400 key handling priority
fixed selectOption looping