foohid | OSX IOKit driver for implementing virtual HID devices | Runtime Evironment library

 by   unbit C++ Version: Current License: MIT

kandi X-RAY | foohid Summary

kandi X-RAY | foohid Summary

foohid is a C++ library typically used in Server, Runtime Evironment applications. foohid has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

OSX IOKit driver for implementing virtual HID devices from userspace. *** The foohid driver is currently unsupported and lacks proper thread-safety (leading to security problems), please do not use it in production unless you want to sponsor the project contacting info at unbit dot it ***.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              foohid has a low active ecosystem.
              It has 232 star(s) with 36 fork(s). There are 18 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 12 open issues and 6 have been closed. On average issues are closed in 59 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of foohid is current.

            kandi-Quality Quality

              foohid has no bugs reported.

            kandi-Security Security

              foohid has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              foohid is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              foohid releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            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 foohid
            Get all kandi verified functions for this library.

            foohid Key Features

            No Key Features are available at this moment for foohid.

            foohid Examples and Code Snippets

            No Code Snippets are available at this moment for foohid.

            Community Discussions

            QUESTION

            Applying Non-Standard Power Assertions & Creating Virtual HIDs
            Asked 2020-Jan-04 at 11:21

            I've got a big ask here, but I am hoping someone might be able to help me. If there's another site you think this should be posted on, please let me know.

            I'm the developer of the free app Amphetamine for macOS and I'm hoping to add a new feature to the app - keeping a Mac awake while in closed-display (clamshell) mode while not having a keyboard/mouse/power adapter/display connected to the Mac. I get requests to add this feature on an almost daily basis.

            I've been working on a solution (and it's mostly ready) which uses a non-App Store helper app that must be download and installed separately. I could still go with that solution, but I want to explore one more option before pushing the separate app solution out to the world.

            An Amphetamine user tipped me off that another app, AntiSleep can keep a Mac awake while in closed-display mode, while not meeting Apple's requirements. I've tested this claim, and it's true. After doing a bit of digging into how AntiSleep might be accomplishing this, I've come up with 2 possible theories so far (though there may be more to it):

            1. In addition to the standard power assertion types, it looks like AntiSleep is using (a) private framework(s) to apply non-standard power assertions. The following non-standard power assertion types are active when AntiSleep is keeping a Mac awake: DenySystemSleep, UserIsActive, RequiresDisplayAudio, & InternalPreventDisplaySleep. I haven't been able to find much information on these power assertion types beyond what appears in IOPMLibPrivate.h. I'm not familiar at all with using private frameworks, but I assume I could theoretically add the IOPMLibPrivate header file to a project and then create these power assertion types. I understand that would likely result in an App Store review rejection for Amphetamine, of course. What about non-App Store apps? Would Apple notarize an app using this? Beyond that, could someone help me confirm that the only way to apply these non-standard power assertions is to use a private framework?

            2. I suspect that AntiSleep may also be creating a virtual keyboard and mouse. Certainly, the idea of creating a virtual keyboard and mouse to get around Apple's requirement of having a keyboard and mouse connected to the Mac when using closed-display mode is an intriguing idea. After doing some searching, I found foohid. However, I ran into all kinds of errors trying to add and use the foohid files in a test project. Would someone be willing to take a look at the foohid project and help me understand whether it is theoretically possible to include this functionality in an App Store compatible app? I'm not asking for code help with that (yet). I'd just like some help determining whether it might be possible to do.

            Thank you in advance for taking a look.

            ...

            ANSWER

            Answered 2020-Jan-04 at 11:21

            Would Apple notarize an app using this?

            I haven't seen any issues with notarising code that uses private APIs. Currently, Apple only seems to use notarisation for scanning for inclusion of known malware.

            Would someone be willing to take a look at the foohid project and help me understand whether it is theoretically possible to include this functionality in an App Store compatible app?

            Taking a quick glance at the code of that project, it's clear it implements a kernel extension (kext). Those are not allowed on the App Store.

            However, since macOS 10.15 Catalina, there's a new way to write HID drivers, using DriverKit. The idea is that the APIs are very similar to the kernel APIs, although I suspect it'll be a rewrite of the kext as a DriverKit driver, rather than a simple port.

            • DriverKit drivers are permitted to be included in App Store apps.
            • I don't know if a DriverKit based HID driver will solve your specific power management issue.
            • If you go with a DriverKit solution, this will only work on 10.15+.

            I suspect that AntiSleep may also be creating a virtual keyboard and mouse.

            I haven't looked at AntiSleep, but I do know that in addition to writing an outright HID driver, it's possible to generate HID events using user space APIs such as IOHIDPostEvent(). I don't know if those are allowed on the App Store, but as far as I'm aware, IOKitLib is generally fine.

            It's possible you might be able to implement your virtual input device using those.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install foohid

            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/unbit/foohid.git

          • CLI

            gh repo clone unbit/foohid

          • sshUrl

            git@github.com:unbit/foohid.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