Fix problem processing key events on Ubuntu Trusty