๐ŸŽ TENYO 2026
๐Ÿšš Shipping from 12 USD
๐Ÿ’ฐ DEALS OF THE DAY

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