No, I meant to manipulate the item selection model of the view.

A simplified version would be something close to this:
Qt Code:
  1. void MyView::keyPressEvent(QKeyEvent *event){
  2. if(event->key()!=Qt::Key_Space) { QAbstractItemView::keyPressEvent(event); return; }
  3. selectionModel()->select(currentIndex(), QItemSelectionModel::SelectCurrent);
  4. }
To copy to clipboard, switch view to plain text mode