Git Product home page Git Product logo

osx-event-observer-examples's Introduction

License

osx-event-observer-examples

  • cgeventtap-example
    • CGEventTapCreate
    • cgeventtap-example
  • iokit-hid-value-example
    • IOHIDQueueRegisterValueAvailableCallback
    • iokit-hid-value-example
  • nsapplication-example
    • [NSApplication sendEvent]
    • cgeventtap-example
  • nsevent-example
    • [NSEvent addGlobalMonitorForEvents]
    • (Equivalent to CGEventTapCreate but cannot modify received events)
    • nsevent-example
  • nsview-example
    • [NSView keyDown]
    • nsview-example

Related documentation

All about macOS event observation


System requirements

  • macOS 10.12 or later

Building example apps

Requirements

  • CMake (brew install cmake)

Steps

  1. Find your codesign identity if you have one.
    (Skip this step if you don't have your codesign identity.)

    security find-identity -p codesigning -v | grep 'Developer ID Application'

    The result is as follows.

    1) 8D660191481C98F5C56630847A6C39D95C166F22 "Developer ID Application: Fumihiko Takayama (G43BCU2T37)"
    

    Your codesign identity is 8D660191481C98F5C56630847A6C39D95C166F22 in the above case.

  2. Set environment variable to use your codesign identity.
    (Skip this step if you don't have your codesign identity.)

    export PQRS_ORG_CODE_SIGN_IDENTITY=8D660191481C98F5C56630847A6C39D95C166F22
  3. Build dist/osx-event-observer-examples.dmg by the following command on terminal.

    make dist

Note

User approval of Accessibility is required to use cgeventtap-example and nsevent-example. (User approval of Input Monitoring is also required since macOS 10.15)

processes

User approval of Accessibility and Input Monitoring is required to use iokit-hid-value-example since macOS 10.15.

processes

osx-event-observer-examples's People

Contributors

tekezo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.