Updates onKeyDown() managment

onKeyDown() is overriden only when needed, else the default OS behaviour is
applied.