Scratch for Java

InputKey::of()

Browser availability: desktop-only.

This API requires the desktop runtime. Browser declarations may report the limitation without performing the operation.

Syntax

Java

.of(name, factory, copy)

Parameters

Name Data Type Description
name String for messages
factory Supplier<T> makes an empty state (twice: one per thread)
copy BiConsumer<T, T> copies the window thread's state into the game thread's: (from, into)

Return

InputKey<T>

of()

Create Shareable URL

Select Sections