GithubHelp home page GithubHelp logo

loamen / keymousehook Goto Github PK

View Code? Open in Web Editor NEW
95.0 95.0 35.0 133 KB

This library allows you to tap keyboard and mouse, detect and record their activity event and simulate keyboard or mouse input.类似于按键精灵的模拟键盘按键和鼠标点击操作的c#扩展类库

Home Page: http://www.loamen.com

License: MIT License

C# 99.96% Batchfile 0.04%

keymousehook's Introduction

Hi there 👋

general Top Langs
Loamen's github stats languages_activity
oding_habits_and_activity achievements
stargazers

keymousehook's People

Contributors

loamen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

keymousehook's Issues

启动Form或者Wpf后,执行两下就报错了。

Managed Debugging Assistant 'CallbackOnCollectedDelegate' : 'A callback was made on a garbage collected delegate of type 'Gma.System.MouseKeyHook!Gma.System.MouseKeyHook.WinApi.HookProcedure::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.'

How to get the window handle

When listening to the callback, how to get the handle object?

I tried to use GlobalKeyListener, but it's an internal class and I can't use it.

image

CallbackOnCollectedDelegate Crash

ERROR: 'A callback was made on a garbage collected delegate of type 'Gma.System.MouseKeyHook!Gma.System.MouseKeyHook.WinApi.HookProcedure::Invoke'

before:
private readonly KeyMouseFactory eventHookFactory = new KeyMouseFactory(Hook.GlobalEvents();
after:
private IKeyboardMouseEvents keyboardMouseFactoryGlobalEvents;
public FormMain()
{
keyboardMouseFactoryGlobalEvents = Hook.GlobalEvents();
eventHookFactory = new KeyMouseFactory(keyboardMouseFactoryGlobalEvents);
}

and other parameters: Hook.AppEvents() and Hook.GlobalEvents()

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.