I've added these lines to my QApplication (server) instance:

Qt Code:
  1. class MyKeyboardFilter : public KeyboardFilter
  2. {
  3. public:
  4. bool filter(int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat)
  5. {
  6. qDebug() << unicode << keycode << isPress;
  7.  
  8. return false;
  9. }
  10. }
  11.  
  12. // ... CUT ...
  13.  
  14. qwsServer->addKeyboardFilter(new MyKeyboardFilter());
  15. qwsServer->sendKeyEvent(QEvent::KeyPress, Qt::Key_Up, 0, true, false);
To copy to clipboard, switch view to plain text mode 

but the "filter" method is never called