Skip to content

ross1573/key_logger

Repository files navigation

KeyLogger

Multipurpose key logger for Windows and macOS writhen in C++
Requires C++ 20, tested on apple clang 14 and VC++ 14
Overhead is about 1~2 mircoseconds(on first callback invocation)

On macOS, please add 'ApplicationServices.framework' to the project

Usage

  1. create an logger object
auto example_logger = event::keyboard::logger<callback, container, traits, event_mask...>();
  1. set callback function
example_logger.set_callback(callback_function);
  1. start
example_logger.start();
  1. cleanup
example_logger.stop();

Supported Features

Container Types

  • Null container
    event::null_container = event::null_template_type
  • Stored Containers
    event::vector -> std::vector  
    event::queue  -> std::queue  
    event::deque  -> std::deque  
  • Table Containers
    event::array  -> std::array
    event::bitset -> std::bitset

Callback Function Types

  • Null callback
    event::null_container = event::null_type
  • Function types
    type                      -> std::function<void(type)>  
    return_type(param...)     -> std::function<return_type(parameter...)>  
    return_type(*)(param...)        
    return_type(class::*)(param...) 
    std::function<return_type(param)...>  
    lambda  

Event Masks

  • Key press
    event::action::key_down
  • Key release
    event::action::key_up
  • System keys
    event::action::key_system

Windows

keylogger_windows.mov

macOS

keylogger_mac.mov

About

Multipurpose keylogger for Windows and macOS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages