🎁 TENYO 2026 BUNDLE
💰 ON SALE
🚚 Shipping from 12 USD

Buttons

Button Support

Atom relies heavily on button inputs, making them the most important input method. MagiScript supports button press and release events from three devices:

  • Atom, which has 12 buttons,
  • PeekSmith 3, which has 3 buttons, and
  • SB Watch, which has a single button (the crown).

Atom Hardware

Atom has 12 buttons, numbered from 0 to 11. They are in 4 rows, and there are 3 buttons per row.

Currently, there is no default layout or behavior associated with them, but the system reports button press-related events.

Events

MagiScript is receiving events via the onEvent function. The event structure is the same for the buttons:

  • value: a string with the button ID
  • type: “press”, “release” strings
  • source: “atom:button”, “ps:button”, “sbwatch:button”

				
					function onEvent(e) {
    console.log(e.value, e.type, e.source);
}
				
			

Events Types

Different devices have different support.

  • Atom supports press, release, click, longpress and repeatpress events.
  • PeekSmith has press and release events only (for now, maybe a later firmware will introduce the same events as Atom).
  • SB Watch supports press, release, click, longpress and repeatpress events, however sometimes a click event is coming with no button press (it is a bug, which might be fixed in the future).

Devices & MagiScript

⚛️ Atom Remote

🔢 Quantum Calculator

🤹‍♂️ MagiScript Language

🤹‍♂️ MagiScript Examples

🤹‍♂️ MagiScript Tutorials

General

📃 First Steps

MagiScript Editor

📃 Basics

📃 Keyboard Shortcuts

📃 Running Your First Program

📃 App Store

📃 Atom Settings (Editor)

📃 Debugging Techniques

Input/Output

📃 Buttons

📃 Vibration Motor

📃 RGB LED

📃 Devices

📃 PeekSmith

📃 Quantum

📃 Teleport

📃 Spotted Dice

📃 SB Watch

📃 IARVEL Watch

📃 Fossil Watch

📃 Cosmos Printer

📃 PeriPage Printer

📃 ATC Remote

📃 Labco Scrabble

📃 Bluetooth Keyboard

📃 Bluetooth Mouse

📃 Timers

📃 Database

📃 Events

📃 System (exit, sleep, rand)

📃 Objects (card, time)

Language

📃 Summary

📃 Comments

📃 Variable Declarations

📃 Operators

📃 Control Flow

📃 Functions

📃 Numbers

📃 Strings

📃 Arrays

📃 Objects

📃 Uint8Array