Git Product home page Git Product logo

sharplibhid's Introduction

Build status

SharpLibHid

C# HID Library using Windows Raw Input. Most useful to handle inputs from IR remotes, gamepads, joysticks or any Human Interface Devices.

HID Demo

You can get a pretty good understanding of what this library can do be running our HID Demo.

Download

The easiest way to use this library in your own project is to add a reference to the NuGet package that suits your needs.

NuGets

x64 x86 Legacy
NuGet Badge NuGet Badge NuGet Badge

Usage

To get started with this library take a look at HID Demo code. Basically there are just three things you need to do to get it working:

  1. Instantiate a SharpLib.Hid.Handler specifying which kind of raw input you want to listen to.
  2. Register with your HID handler OnHidEvent event.
  3. Feed your HID handler the Windows Raw Input from WM_INPUT messages.

Taking a look at older and simpler version of the HID Demo code can give you a better idea of what a minimal implementaiton looks like.

References

sharplibhid's People

Contributors

slion 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

Watchers

 avatar  avatar  avatar  avatar

sharplibhid's Issues

PS3 controller multiple axis with same usage reports wrong value

Hi.
I'm interfacing with a game controller and it have two "Slider" axis.
The report is correct on windows (joy.cpl)
In the HID Demo one of the sliders report is duplicate on the other. The second one don't generate any report.

The descriptor: (I added the "DataIndex" property on the list).
image

And the event log.
image

Here it's possible to see that the Sliders both are sharing the same values.

I try to debug but could not find the problem. Looks like it ignores the DataIndex if the axis is duplicate?

If you can at least point me in the right direction so I can try to fix.

Thanks.

Axis class

Consider having an Axis class to make it easier to work with axis by providing a bunch of easy to use methods to access axis id, name, value and value range.

Device hierarchy visualization

Would be nice to be able to visualise our devices hierarchy from the root parents down to their youngest children. We could either do that in a new demo device tab or add that feature to the existing devices tabs. Could be a checkbox option to toggle it.

Demo all devices tab

Would be nice to have an all devices tab in the demo showing every devices on the system and not just HID devices.

Reenable x86 build

See if we can reenable x86 build and include it in our NuGet package.
CIC is x86 so that could be useful indeed.

How to prevent inputing into textbox?

I' m using this library to receive input message and handle it in background. But if the textbox got focused, the characters will still be typing there. How to prevent it?

Handler ProcessInput does not filter registered devices

I have 2 barcode readers from different vendors. I create a handler with 1 device from vendor A. However if I scan with reader from vendor B the Handler does process the input. I would expect it to ignore this because I did not pass that device when creating the Handler.

Is this by design?

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.