Here’s the code I used to implement your suggestion, in case someone finds it helpful:
// outer class handler definition
FReply MyOuterClass::onKeyCustom(const FGeometry& MyGeometry, const FKeyEvent& KeyEvent) {
printf("key pressed custom\n");
return FReply::Handled();
}
// code to assign the handler for UEditableTextBox* myInput
SEditableTextBox* mySlateText = (SEditableTextBox*) myInput->GetCachedWidget().Get();
mySlateText->SetOnKeyDownHandler(FOnKeyDown::CreateRaw(this, &MyOuterClass::onKeyCustom));