HidSharp | multiplatform C # library for USB HID devices

 by   IntergatedCircuits C# Version: 2.1.0 License: Non-SPDX

kandi X-RAY | HidSharp Summary

kandi X-RAY | HidSharp Summary

HidSharp is a C# library. HidSharp has no bugs, it has no vulnerabilities and it has low support. However HidSharp has a Non-SPDX License. You can download it from GitHub.

HIDSharp is a multiplatform C# library for USB HID devices. Version 2.0 allows you to read and parse reports from any USB HID input device. You can read USB gamepads, scales, anything you need. It does this by providing full report descriptor and report parsing capability. HIDSharp is, to my knowledge, the first driverless cross-platform library which can do this! Of course, raw reading and writing is still fully supported. Version 1.5 and below are COM enabled to allow use by VB6 and MS Access programs (the .NET Framework will of course need to be installed). If there is demand I may add COM support to HIDSharp 2.0. HIDSharp has received eight years of continual use with a Dymo Scale in MS Access, and seven years in commercial software with a wide variety of USB HID devices I've developed, so I know it to be reliable. HIDSharp supports Windows, MacOS, and Linux (hidraw). HIDSharp uses the Apache open-source license. Originally distributed by James F. Bellinger through his webpage. Available as a Nuget package.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              HidSharp has a low active ecosystem.
              It has 64 star(s) with 27 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 11 open issues and 7 have been closed. On average issues are closed in 28 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of HidSharp is 2.1.0

            kandi-Quality Quality

              HidSharp has 0 bugs and 0 code smells.

            kandi-Security Security

              HidSharp has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              HidSharp code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              HidSharp has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              HidSharp releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of HidSharp
            Get all kandi verified functions for this library.

            HidSharp Key Features

            No Key Features are available at this moment for HidSharp.

            HidSharp Examples and Code Snippets

            No Code Snippets are available at this moment for HidSharp.

            Community Discussions

            QUESTION

            How to send data to HID device in Unity Input System
            Asked 2022-Feb-03 at 16:25

            I managed to implement the HID device in Unity Input System and I can read from it easily. But how to send data back to the HID device?

            This is the IInputDeviceCommandInfo implementation I have:

            ...

            ANSWER

            Answered 2022-Feb-03 at 16:25

            Ok, that was not an easy problem to solve:

            The problem was that IInputDeviceCommandInfo does not force user to implement Field(0) to be an InputDeviceCommand. InputDeviceCommand must be added at Field(0) offset and other fields must be shifted respectively.

            The second problem was that my device required different size of the output data. Probably OS checks if the sizes matches (the one reported by the descriptor in capabilities.outputReportSize and the one actually to be sent).

            So I have added missing fields in the struct and it works:

            Source https://stackoverflow.com/questions/70948522

            QUESTION

            How to Create Global Keyboard Hook with C# in Linux
            Asked 2021-Oct-28 at 14:41

            I have a wireless USB remote control that I purchased on amazon that I would like to use to trigger actions in my program.

            When connected in Linux the remote shows up as a separate keyboard and mouse. So, I'm looking for a way in c# to intercept the keyboard events from the remote and use them in my application.

            Some options I've considered...

            Option 1 - Read file in /dev/input/by-id

            Inside this folder, there is a file called "usb-SG.Ltd_SG_Control_Mic-if03-mouse" which, when I tail it does produce some information.

            This is not ideal for two reasons:

            1. It requires elevated privileges to access the data
            2. It doesn't allow my program exclusive access to the input data

            Option 2 - Using HIDSharp

            https://www.zer7.com/software/hidsharp

            This is a library that looks like this can accomplish what I'm looking for, but the documentation is quite sparse.

            ...

            ANSWER

            Answered 2021-Oct-28 at 14:41

            Answering my own question here because I had to do a lot of research for it and I'm sure it will help someone else later. I went with option 1 because it seemed to be the easiest to implement.

            Warning - There is going to be a lot of code in this post

            Summary

            For my intents and purposes, I wanted to have some code that would publish an event any time the user pressed a key anywhere on the system. While developing this, I found that I could also hook into mouse events as well.

            It's important to note, that the code here like the linux OS doesn't really distinguish between a keyboard button press and a mouse button press. To linux, they're both just buttons.

            Understanding that you can actually expand this code to work with other items like gamepads and special input peripherals if you desire.

            Additional Gotchas - As expressed in the question, this code will not block the device input to other programs. This can be problematic if you want to override the default functionality of say the power button or the volume buttons.

            Setting Up Permissions

            In order to run this code, the user that runs this program will have to be in the input user group otherwise it will throw an exception. Run this code to add the current user to that group.

            Source https://stackoverflow.com/questions/69414090

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install HidSharp

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/IntergatedCircuits/HidSharp.git

          • CLI

            gh repo clone IntergatedCircuits/HidSharp

          • sshUrl

            git@github.com:IntergatedCircuits/HidSharp.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular C# Libraries

            PowerToys

            by microsoft

            shadowsocks-windows

            by shadowsocks

            PowerShell

            by PowerShell

            aspnetcore

            by dotnet

            v2rayN

            by 2dust

            Try Top Libraries by IntergatedCircuits

            USBDevice

            by IntergatedCircuitsC

            DfuBootloader

            by IntergatedCircuitsC

            STM32_XPD

            by IntergatedCircuitsC

            IPoverUSB

            by IntergatedCircuitsC

            USBDevice4Cube

            by IntergatedCircuitsC