- Notifications
You must be signed in to change notification settings - Fork10
IOKit wrapper for Nintendo Joy-Con and ProController (macOS, Swift)
License
NotificationsYou must be signed in to change notification settings
magicien/JoyConSwift
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
IOKit wrapper for Nintendo Joy-Con and ProController (macOS, Swift)
UsingCocoaPods
Add the following to yourPodfile:
pod'JoyConSwift'
To use controllers, you need to checkSigning & Capabilities
>App SandBox
>USB
in your Xcode project.
import JoyConSwift// Initialize the managerletmanager=JoyConManager()// Set connection event callbacksmanager.connectHandler={ controllerin // Do something with the controller controller.setPlayerLights(l1:.on, l2:.off, l3:.off, l4:.off) controller.enableIMU(enable:true) controller.setInputMode(mode:.standardFull) controller.buttonPressHandler={ buttoninif button==.A{ // Do something with the A button}}}manager.disconnectHandler={ controllerin // Clean the controller data}// Start waiting for the connection eventsmanager.runAsync()
dekuNukem/Nintendo_Switch_Reverse_Engineering - A look at inner workings of Joycon and Nintendo Switch
JoyKeyMapper - Nintendo Joy-Con/ProController Key mapper for macOS
About
IOKit wrapper for Nintendo Joy-Con and ProController (macOS, Swift)
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published