Download

Can't figure out keyboard input with UI BPs

The ability to pull up a shiny red ‘key input’ node (eg. spacebar) only seems to work on my level BP and not the other UI BPs I load over top.

My project has a single level loading and 1 UI BP loaded with it. I then use additional UI BPs for my sub-menu screens, that are loaded by the mainmenu UI BP when buttons are clicked.

I want to be able to set a few keyboard-shortcuts to control buttons on those screens, but can’t get them to see any keyboard input. Either the ‘key input’ node on my level BP can’t see any values to edit from the UI BP or the UI BP with the buttons I want pressed, won’t allow me to create a ‘key input’ node. Why can’t I call a ‘key input’ in those UI BPs? Why can’t my level BP see my UI BPs?

Any help is greatly appreciated. :slight_smile:

Each blueprint should have input under defaults tab, if you check under auto receive input it is probably disabled. Also when you use the same key in multiple blueprints, click on the node and you should be seeing options to consume input as well.

Hopefully this helps! :slight_smile:

Setting ‘auto receive’ made no difference and the keyboard key nodes default to ‘consume’. So I’m still stuck. Thanks for the help though bhex.

After trying your suggestions I thought it might help if I made it more clear in my OP what BPs I’m using… if that helps… UMG Widget BPs that is.

Okay, I figured out that what I need is a BP Interface, but I could really use a small example to get through this, if anyone is up to helping out?

I’ve created my “BP Interface” and properly ‘implemented’ it within the other BPs. I’ve tried to talk back and forth between the various other BPs and I’ve also tried a ton of different nodes, etc, but with no luck.

So I need 3 things basically…

  1. I need to define a ‘Spacebar Hotkey’ as a value of some sort in my “Interface BP”. Is that the only value I need? Or do I need references to the other BPs here?
  2. I need to interact with the “BP Interface” via my “Playercontroller BP” so I can setup the actual “Key_Event”. What node setup does this need? I know I’ll be referencing the “BP Interface” somehow?
  3. I finally need to be able to call the “Key_Event” I just created, from a 3rd BP that contains the UMG button I want to activate with the ‘spacebar’.

… anyone? :o