 Now that same BTN okay, if I were to run it for example All right. Well, you notice that all Around the edge I get this kind of blue haze that means this has focus What focus means is that if I hit say for example my space bar It acts like I just clicked on it So I could do this for a while I can hold this down And nothing happens, but as soon as I let go It treats that like a mouse click now one of the things I want to do is let's say what happens when I hit enter Nothing Nothing Nothing, maybe I want something to happen Maybe I want that same effect to happen as if I hit the space bar. I want it to happen when I hit the inner key It doesn't well just like with Set on action and then set on mouse entered guess what we can do We can come back over here and we can continue with that same idea of BTN okay dot set on Key notice what happens when I did it key set on well, okay I get three options set on key pressed set on key released and then set on key typed I'll just do Key pressed now again the same thing that we saw when we were dealing with everything else when we dealt with our On set action event in our mouse event. We have one for guess what our key event and I'll just Skip through right to the lambda expression. Where are you come on? There we go Because as you can guess I can immediately do the same song and dance again That I did in the past now one of the things I'm gonna do is because I've called this event Maybe I you know, I don't want it to happen every time. It's pressed right now It'll come on every time and I don't want that so let's just see that in action for a second. I run this Now I'm gonna hit the a key and you can follow along. Here's the a key so you can pause and stare at that I don't want that. I don't want that a SDF are keeping track of this. I only wanted to happen when I hit the inner key So what can I do? Well inside of here what I can actually do is I can start to utilize that E that parameter I haven't done that yet. I haven't really touched it on that yet So what I can do is I can actually come in here and I'm gonna say something like a switch statement Why a switch? Well actually yeah, a switch statement will be fine switch Now inside of here. I'm gonna actually use that event that I just worked on But you notice when I use the dot notation I get a few things that appear out of nowhere And one of the ones I want to focus in on is this get code Well, if we read through that description for a second the key code associated with the key in this key pressed or key released event That's pretty nice. It's gonna give me the code of whatever I'm dealing with and Well, if we think about Sort of the keyboard We've got a few different codes that we can work off of one of those again a switch statement if you've forgotten a switch takes in some variable and then it looks for a case and For my case. I want to deal with inner and now Let's take that code and Populate it here, and I'll just kind of clean this up a little bit more. So now all of a sudden Only when I hit enter or space will it work actually? Let's find out. I'm gonna hit the space key. Oh It's still worked. I'm gonna hit the inner key. Oh Look at that. I'm gonna hit the backspace. No, I'm gonna hit that a key. No So now all of a sudden I can specify Which key actually is going to allow me to work on this that's pretty nice You can imagine that I could do this with maybe another one of my cases so case I don't know. Why not? Well, well do the down key Mmm down key all of a sudden that's getting fancy. There we are. I was wondering why it was taking a second So I'm gonna hit the up key. I'm gonna hit the left key. I know you guys can't see this I'm gonna hit the right key. Oh Look at that. It changed focus. I'm gonna hit the left key again, and I'm gonna hit the down key Oh, look at that ladies and gentlemen so I can control My keyboard kind of interactions So if you think about your video games all of a sudden when you just arbitrarily hit the W key to move forward That's a key pressed event