| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 05:12:26 GMT
X-Served-By: cache-dfw-kdal2120090-DFW, cache-bom-vanm7210060-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768626746.488146,VS0,VE327
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
switch: Nintendo Switch Controller Library
switch: Nintendo Switch Controller Library
Downloads
- switch-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0 |
|---|---|
| Change log | ChangeLog.md |
| Dependencies | attoparsec (>=0.13.2.0 && <0.14.0.0), base (>=4.7 && <5), bytestring (>=0.10.12.0 && <0.12.0.0), hidapi (>=0.1.6 && <0.2.0) [details] |
| License | BSD-3-Clause |
| Copyright | 2021 Michael Szvetits |
| Author | Michael Szvetits |
| Maintainer | typedbyte@qualified.name |
| Uploaded | by MichaelSzvetits at 2021-03-31T18:33:00Z |
| Category | Game |
| Home page | https://github.com/typedbyte/switch#readme |
| Bug tracker | https://github.com/typedbyte/switch/issues |
| Source repo | head: git clone https://github.com/typedbyte/switch |
| Distributions | |
| Downloads | 235 total (3 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs uploaded by user [build log] All reported builds failed as of 2021-03-31 [all 3 reports] |
Readme for switch-0.1.0.0
[back to package description]
switch
switch is a library for interacting with Nintendo Switch controllers, written in Haskell. It allows your application to detect controllers via Bluetooth, connect to them, read input (e.g., buttons, sensors) from them and sending commands (e.g., rumble) to them. Notable features of this library are:
- Supports all popular controller types (left Joy-Con, right Joy-Con, Pro Controller).
- Supports controller input: read button states, analog stick directions and battery information.
- Supports controller output: send rumble commands, set player lights and configure the home light.
- Supports position tracking of a controller using its accelerometer and gyroscope.
- Provides a type-safe interface for controller interaction (e.g., trying to configure the home light of a controller which has no home light results in a compile error).
The communication protocol of the controllers is based on existing efforts of the reverse engineering community. The documentation of the library can be found on Hackage.
Usage
- Press and hold the SYNC button on your Nintendo Switch controller for a few seconds. It is the small black button on the side (Joy-Con) or top (Pro Controller) of the controller.
- Scan for Bluetooth devices on your computer. Depending on your controller, you should detect a device named Joy-Con (L), Joy-Con (R) or Pro Controller. Connect to it.
- Talk to the controller by developing and running an application that uses the
switchlibrary on your computer, or try one of the provided examples.
Compatibility
This library should work with Windows, Linux and macOS, but it was primarily tested under Windows 10.
Limitations and Remarks
The following features are not implemented yet:
- Interacting with the NFC sensor of the right Joy-Con.
- Interacting with the IR camera of the right Joy-Con.