Okay, now let's go create our keylogger.
For creating keylogger we need to use a module called our input.
So this pi input if you want to learn more more than this course you can go and read its documentation
okay.
So first you need to install this module.
Very easy okay.
Come to your terminal use pip or pip three okay pip three install pi and hit enter.
And if you don't have it installed so it will be installed into the system that you are using if you
have it.
So you have it.
See that I already have this.
And like every other module that we were using here, we need to import this okay.
Import I input dot keyboard.
And here we need to create a keyboard listener.
So let's name it keyboard underscore listener.
So this is equal to pi input dot keyboard dot listener because we are creating a keyboard listener.
So it's going to be input that keyboard dot listener.
Here we need to call a callback function that we are going to create.
So here we use Onpress.
And here you can name any function you want.
But for me it is going to be passes key.
Please.
Okay I will create this function.
Let's create it here.
Div prices.
Are.
The price.
And we are going to give the key as argument.
And right now I'm just going to print key.
And down here we are going to use width.
We have the keyboard listener okay.
Keyboard listener.
Down here I need to use something called keyboard And listener dot.
Join.
Join is a method that you can use to start this.
Okay.
Now.
Right now we are just printing any key that is going to be executed.
Okay so let's come here.
I'm going to clear this.
Okay.
Let's use Python key logger.py.
So you see right now it is executing and it's doing nothing.
So here let's in this terminal write something anything.
Okay.
For example hello.
You see right now that I am typing anything here, you see that we are receiving it in this terminal.
See I am pressing backspace.
It is giving me that you're pressing backspace.
I'm pressing one two capslock.
Anything that I'm pressing that is giving me that right here.
So this program you learned very simple thing and that is how to capture that on press okay and print
that on the terminal.
So thanks for watching.