I think that you can define a member like this: event_token et;
Then you can keep the result: et = lvMouseKeys().SelectionChanged({ this, &MainWindow::lvMouseKeys_SelectionChanged });
To disable the handler: lvMouseKeys().SelectionChanged( et )
.
However, you can simply use a boolean flag at the beginning of the handler to skip the code.