ashea-code / BLUI

Rich HTML UI engine for UE4
MIT License
860 stars 258 forks source link

How to send Keyinputs without using the UMG Class #32

Closed The-Skas closed 9 years ago

The-Skas commented 9 years ago

Hey,

At the moment, the blui function KeyDown, takes a KeyEvent as Input. we can only use it if its part of a UMG class (Since it overrides the Keydown method, which already passes a KeyEvent in by default), BUT how do use it if we wan't to call inputs to it directly? (Using Any of the Keyboard nodes in Blueprint (Enter, Shift, A,Z,W,S etc..)

ashea-code commented 9 years ago

Hello there! I'll be looking into this as there currently isn't a way to deal with it.

The-Skas commented 9 years ago

Awesome, Im taking a look at it as well. Good luck :+1:

ashea-code commented 9 years ago

So the latest commit should let you pass any character (like "j" or "k") as well as specify key modifiers using the Raw Character Input node. As far as things like Escape and Tab etc. I'm still looking into a good solution

The-Skas commented 9 years ago

Awesome. Now I can forward keys with ease.

Im curious as to why Escape and Tab are harder to implement though.

Anyway, thanks!

ashea-code commented 9 years ago

The issue being in CEF there is a slight difference between character key events and just plain old key events. Fact being we can't get the key code for something like ENTER from any old blueprint. CEF Events needs the native key code

cthulhusec commented 9 years ago

@AaronShea Hey, I think I have a good solution to the special keys issue, I'll have a pull request in a few minutes.

ashea-code commented 9 years ago

Closed by #35 (Testing soon)