Back to Momentum Firmware

Byte input GUI view {#js_gui__byte_input}

documentation/js/js_gui__byte_input.md

latest1.2 KB
Original Source

Byte input GUI view {#js_gui__byte_input}

Displays a hexadecimal keyboard.

js
let eventLoop = require("event_loop");
let gui = require("gui");
let byteInputView = require("gui/byte_input");

This module depends on the gui module, which in turn depends on the event_loop module, so they must be imported in this order. It is also recommended to conceptualize these modules first before using this one.

Example

For an example refer to the gui.js example script.

View props

PropTypeDescription
lengthnumberThe length in bytes of the buffer to modify.
headerstringA single line of text that appears above the keyboard.
defaultDatastringData to show by default.

View events

ItemTypeDescription
inputArrayBufferFires when the user selects the "Save" button.