kindlyfire / go-keylogger

Keylogger lib implemented in Go, built for Windows
ISC License
59 stars 19 forks source link

ENTER Key #2

Open alacerda opened 3 years ago

alacerda commented 3 years ago

Is is possible to add a new line "\n" when the ENTER key is pressed?

kindlyfire commented 3 years ago

Yes. You need to make sure the enter key isn't skipped by the if statement here and then return \n when the right keycode is active.

alacerda commented 3 years ago

Hi, Thanks for the response. Plese, see the following piece of code:

pressed := klg.GetKey() if !pressed.Empty { klgFile.WriteString(string(pressed.Rune)) }

I am not skipping the key. How Can I detect that the ENTER key was pressed? The piece of code abode do not add new lines automatically... so I have to find a way of adding new lines when the ENTER key is pressed.

Thanks,

On Mon, 22 Feb 2021 at 06:46, Kindly notifications@github.com wrote:

Yes. You need to make sure the enter key isn't skipped by the if statement here https://github.com/kindlyfire/go-keylogger/blob/master/keylogger.go#L54 and then return \n when the right keycode is active.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kindlyfire/go-keylogger/issues/2#issuecomment-783243276, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACABXG5VTLL2IJJ6OYVUKWLTAIRXPANCNFSM4X7UAWHA .

-- Atenciosamente, Alan M C Lacerda

OSCP, DCPT, LPIC-1, LPIC-201, CCNA

Pentester | Consultor de Segurança da Informação

LinkedIn: https://br.linkedin.com/in/alancordeiro

--

The nice thing about standards is that there are so many to choose from. And if you really don't like all the standards you just have to wait another year until the one arises you are looking for. -- A. Tanenbaum, "Introduction to Computer Networks"