UInteractiveTool Keybinds

I’ve been trying to get Keybinds to work for a while now with my Plugin. So far, I’ve overridden the RegisterActions method in my UInteractiveTool subclass so the Action is registered and I’ve created a TInteractiveToolCommands subclass. I’ve also overridden the GetToolDefaultObjectList method where I’m adding the Class Default Objects of my UInteractiveTool subclass. The Documentation of the TInteractiveToolCommands ( TInteractiveToolCommands | Unreal Engine 5.6 Documentation | Epic Developer Community ) reads this:

  • in your EdMode Module, create a subclass-instance of this, say FMyToolCommands and call FMyToolCommands::Register() in your ::StartupModule() function

  • subclass must implement GetToolDefaultObjectList(), here you just add GetMutableDefault to the input list for all your Tools

  • add a member TSharedPtr UICommandList; to your EdMode impl

  • when you start a new Tool, call FMyToolCommands::Get().BindCommandsForCurrentTool(UICommandList, NewTool)

  • when you end a Tool, call FMyToolCommands::Get().UnbindActiveCommands()

  • in your EdModeImpl::InputKey override, call UICommandList->ProcessCommandBindings()

So far I’ve done everything I could, but I moved the FMyToolCommands::Get().BindCommandsForCurrentTool(UICommandList, NewTool) into the Setup() method of my UInteractive Tool subclass with the UnbindActiveCommands() in the shutdown, because I thought it might work, correct me please if there is a better way to do it.

But there is no InputKey method to override, since The EditorMode is a UEdMode subclass, not a FEdMode subclass, since that is what Unreal Engine generated when I created my plugin. Now I’m confused. What am I supposed to do to make the keybinds work? The Keybind shows up in the Editor, it just doesn’t call the Test Function that logs a string like it’s supposed to.