Announcement

Collapse
No announcement yet.

OnKeyDown not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    OnKeyDown not working

    Hi,

    I'm currently trying to make a control menu for my game, but i figured out my OnKeyDown function is never called. My OnMouseButtonDown is called.
    OnKeyDown:
    Click image for larger version

Name:	25454ad5a5aa416045b7c0626cc1fd0c.png
Views:	1
Size:	275.8 KB
ID:	1203953


    OnMouseButtonDown:
    Click image for larger version

Name:	25454ad5a5aa416045b7c0626cc1fd0c.png
Views:	1
Size:	275.8 KB
ID:	1203953


    Pressed the button:
    Click image for larger version

Name:	0c9f27f407ee01e58e2d1be2d1bb9a88.png
Views:	1
Size:	138.3 KB
ID:	1203954

    I found out that the widget never has keyboard focus. This is my test setup:
    Click image for larger version

Name:	a15b81256fa2437118f08b90c40e41d5.png
Views:	1
Size:	96.7 KB
ID:	1203955

    Does anybody knows what the problem is?
    Thanks in advance

    #2
    I found the solution. As target, i had to select the button, and not the widget itself.

    Comment

    Working...
    X