<commit_before>#pragma once

#include "event_queue.hpp"
#include "hid_queue_values_converter.hpp"
#include "libkrbn/libkrbn.h"
#include <atomic>
#include <pqrs/osx/iokit_hid_manager.hpp>
#include <pqrs/osx/iokit_hid_queue_value_monitor.hpp>

class libkrbn_hid_value_monitor final {
public:
  libkrbn_hid_value_monitor(const libkrbn_hid_value_monitor&) = delete;

  libkrbn_hid_value_monitor(libkrbn_hid_value_monitor_callback callback,
                            void* refcon) : observed_(false) {
    krbn::logger::get_logger()->info(__func__);

    std::vector<pqrs::cf::cf_ptr<CFDictionaryRef>> matching_dictionaries{
        pqrs::osx::iokit_hid_manager::make_matching_dictionary(
            pqrs::hid::usage_page::generic_desktop,
            pqrs::hid::usage::generic_desktop::keyboard),
    };<commit_msg>Monitor pointing devices @ libkrbn_hid_value_monitor<commit_after>#pragma once

#include "event_queue.hpp"
#include "hid_queue_values_converter.hpp"
#include "libkrbn/libkrbn.h"
#include <atomic>
#include <pqrs/osx/iokit_hid_manager.hpp>
#include <pqrs/osx/iokit_hid_queue_value_monitor.hpp>

class libkrbn_hid_value_monitor final {
public:
  libkrbn_hid_value_monitor(const libkrbn_hid_value_monitor&) = delete;

  libkrbn_hid_value_monitor(libkrbn_hid_value_monitor_callback callback,
                            void* refcon) : observed_(false) {
    krbn::logger::get_logger()->info(__func__);

    std::vector<pqrs::cf::cf_ptr<CFDictionaryRef>> matching_dictionaries{
        pqrs::osx::iokit_hid_manager::make_matching_dictionary(
            pqrs::hid::usage_page::generic_desktop,
            pqrs::hid::usage::generic_desktop::keyboard),

        pqrs::osx::iokit_hid_manager::make_matching_dictionary(
            pqrs::hid::usage_page::generic_desktop,
            pqrs::hid::usage::generic_desktop::mouse),

        pqrs::osx::iokit_hid_manager::make_matching_dictionary(
            pqrs::hid::usage_page::generic_desktop,
            pqrs::hid::usage::generic_desktop::pointer),
    };
{'fraction_non_alphanumeric': 0.11872826626924987, 'fraction_numerical': 0.0, 'mean_word_length': 5.0845921450151055, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5396248', 'n_tokens_mistral': 717, 'n_tokens_neox': 722, 'n_words': 73}