Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

IOKit wrapper for Nintendo Joy-Con and ProController (macOS, Swift)

License

NotificationsYou must be signed in to change notification settings

magicien/JoyConSwift

Repository files navigation

IOKit wrapper for Nintendo Joy-Con and ProController (macOS, Swift)

Installation

Add the following to yourPodfile:

pod'JoyConSwift'

Set USB Capability

To use controllers, you need to checkSigning & Capabilities >App SandBox >USB in your Xcode project.

usb_capability

Usage

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()

Documentation

SeeJoyConSwift Documentation

Thanks to

dekuNukem/Nintendo_Switch_Reverse_Engineering - A look at inner workings of Joycon and Nintendo Switch

See also

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

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp