
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
mopad
Advanced tools
An anywidget that allows gamepad input in Marimo notebooks. Perfect for interactive data exploration, games, or any application that needs real-time gamepad input.
pip install mopad
import marimo as mo
from mopad import MopadWidget
# Create and display the widget
gamepad = mo.ui.anywidget(MopadWidget())
gamepad
For a full demo you can check Github pages.
| Property | Type | Description |
|---|---|---|
last_button_pressed | int | Index of the last pressed button (-1 if none) |
current_timestamp | float | Timestamp of the most recent button press (ms) |
previous_timestamp | float | Timestamp of the previous button press (ms) |
axes | list[float] | Analog stick values: [left_x, left_y, right_x, right_y] |
dpad_up | bool | True when D-pad up is pressed |
dpad_down | bool | True when D-pad down is pressed |
dpad_left | bool | True when D-pad left is pressed |
dpad_right | bool | True when D-pad right is pressed |
button_id | int | Legacy property for backward compatibility |
| k |
Note: Due to browser security policies, gamepads need user interaction to be detected. The widget will guide you through the connection process with clear visual indicators.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
An anywidget that allows gamepad input in Marimo
We found that mopad demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.