microsoft / dotnet

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.
https://devblogs.microsoft.com/dotnet/
MIT License
14.25k stars 2.2k forks source link

Update dotnet-developer-projects.md #1432

Open Empiree opened 4 months ago

Empiree commented 4 months ago

Added DeftSharp.Windows.Input to "UI and Control libraries"

Hello! I am developing an open source library that allows you to easily interact with mouse and keyboard events in Windows UI applications (WPF, MAUI, Avalonia). For example, you can subscribe to press any button, or on the contrary, prohibit its pressing. The project is currently under active development, it is already available on Nuget. I will be glad to any support!

Repository: https://github.com/Empiree/DeftSharp.Windows.Input

I will be adding full documentation with all the library features soon.

Here are small examples of use cases:

Subscription to left mouse click:


var mouseListener = new MouseListener();

mouseListener.Subscribe(MouseEvent.LeftButtonDown, () =>
{
    // This code will be triggered after each left mouse button click
});

One-time subscription for pressing a button on the keyboard:


var keyboardListener = new KeyboardListener();

keyboardListener.SubscribeOnce(Key.A, key =>
{
    // This code will only work once, after pressing button 'A'
});

Furthermore, you can take advantage of specialized classes for different usage scenarios. For example, for the NumPad:

var numpadListener = new NumpadListener(keyboardListener);

// 0-9 numpad buttons
numpadListener.Subscribe(number =>
{
    // Your code here
});
Abdurahmon0412 commented 3 months ago

good