keylogger

package module
v0.0.0-...-1e88264 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2023 License: ISC Imports: 4 Imported by: 0

README

go-keylogger

This is a fork of go-keylogger by kindlyfire. The difference between this fork and the original proyect is that it can now regognize stuff like return carriages, tabs and if keys were pressed while pressing CTRL or ALT keys.

This proyect exists because of gologger a keylogger I'm building thanks to this library and to kindlyfire's work because they did all of the hard work.

TODO:

  • Return carriages
  • Tabs
  • CTRL
  • ALT

Documentation

Overview

Package keylogger is a keylogger for windows

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	Empty   bool
	Rune    rune
	Keycode int
}

Key is a single key entered by the user

type Keylogger

type Keylogger struct {
	// contains filtered or unexported fields
}

Keylogger represents the keylogger

func NewKeylogger

func NewKeylogger() Keylogger

NewKeylogger creates a new keylogger depending on the platform we are running on (currently only Windows is supported)

func (*Keylogger) GetKey

func (kl *Keylogger) GetKey() Key

GetKey gets the current entered key by the user, if there is any

func (Keylogger) ParseKeycode

func (kl Keylogger) ParseKeycode(keyCode int, keyState uint16) Key

ParseKeycode returns the correct Key struct for a key taking in account the current keyboard settings That struct contains the Rune for the key ParseKeycode returns the correct Key struct for a key taking into account the current keyboard settings That struct contains the Rune for the key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL