Scammer asked to log in his gmail I'd in my computer

One person told me to install any desk so he could look in my computer and he asked that can he use his gmail on my computer so is there any way I could know his password and then do something that he cannot access it again.

If you saved the login details then yes but unless you had a keylogger running while he logged in then no, not really anything you can do.

Do you know any good keyloggers?

I know that at least a few scambaiters use Best Free Keylogger