# Game—light topic

**URL:** <https://forum.makecode.com/t/game-light-topic/47194>\
**Category:** Show & Tell\
**Tags:** game, graphics-and-math, extension, demo\
**Created:** [November 12, 2026, 1:43am UTC](https://forum.makecode.com/t/game-light-topic/47194 "2026-11-12T01:43:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 12, 2026, 1:43am UTC](https://forum.makecode.com/t/game-light-topic/47194/1 "2026-11-12T01:43:54Z")

</div>

What is game—light you may ask?

game—light which I will now refer to as game-lite is a custom version of the game folder in makecode. Game-lite removes many features such as:

- sprites
- physics
- animations
- tilemaps
- info/score
- multiplayer

It keeps some other useful features like:

- screen/images
- controller buttons (player 1 only)
- onUpdate, onPaint, and onShade in the game namespace
- an extremely minimal scene system
- music
- all the basic javascript stuff like strings, arrays, etc.

For more information please @ Richard and also check out this [post](https://forum.makecode.com/t/using-makecode-starting-with-nothing/47009/3)

The link to a working version of this is here:

> **[game-light](https://arcade.makecode.com/09868-60286-51465-81166)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Please note the assets seem to be broken but you can either fix it by adding a custom game file like this:

> **Code**
>
> ```typescript
> 
> namespace assets{
> 
> //% helper=getImageByName
> 
> //% pyConvertToTaggedTemplate
> 
> //% blockIdentity="images.\_spriteImage"
> 
> export function image(lits: any, ...args: any\[\]): Image { return null }
> 
> //% helper=getTileByName
> 
> //% pyConvertToTaggedTemplate
> 
> //% blockIdentity="images.\_tile"
> 
> export function tile(lits: any, ...args: any\[\]): Image { return null }
> 
> //% helper=getAnimationByName
> 
> //% pyConvertToTaggedTemplate
> 
> //% blockIdentity="animation.\_animationFrames"
> 
> export function animation(lits: any, ...args: any\[\]): Image\[\] { return null }
> 
> //% helper=getSongByName
> 
> //% pyConvertToTaggedTemplate
> 
> //% blockIdentity="music.\_songFieldEditor"
> 
> export function song(lits: any, ...args: any\[\]): Buffer { return null }
> 
> }
> 
> namespace helpers {
> 
> export type ImageFactory = (name: string) => Image;
> 
> export type TileFactory = (name: string) => Image;
> 
> export type AnimationFactory = (name: string) => Image\[\];
> 
> export type SongFactory = (name: string) => Buffer;
> 
> interface Factory {
> 
> kind: string;
> 
> factory: (name: string) => any;
> 
> }
> 
> let factories: Factory\[\];
> 
> export function \_registerFactory(kind: string, factory: (name: string) => any) {
> 
> if (!factories) factories = \[\];
> 
> factories.push({
> 
> kind,
> 
> factory
> 
> });
> 
> }
> 
> export function \_getFactoryInstance(kind: string, name: string) {
> 
> if (factories) {
> 
> for (const factory of factories) {
> 
> if (factory.kind === kind) {
> 
> let data = factory.factory(name);
> 
> if (data) return data;
> 
> }
> 
> }
> 
> }
> 
> return null;
> 
> }
> 
> export function getTilemapByName(name: string) {
> 
> return \_getFactoryInstance("tilemap", name);
> 
> }
> 
> export function getImageByName(name: string) {
> 
> return \_getFactoryInstance("image", name);
> 
> }
> 
> export function getAnimationByName(name: string) {
> 
> return \_getFactoryInstance("animation", name);
> 
> }
> 
> export function getTileByName(name: string) {
> 
> return \_getFactoryInstance("tile", name);
> 
> }
> 
> export function getSongByName(name: string) {
> 
> return \_getFactoryInstance("song", name);
> 
> }
> 
> }
> 
> ```

or you can edit this version by me:

> **[Game-lite with assets](https://arcade.makecode.com/17815-67047-89903-37480)**
>
> adds working assets to game—light

Anyways another thing I have made is working browser events right here:

> **Code**
>
> ```typescript
> declare namespace browserEvents {
> 
> //% shim=browserEvents::mouseX
> 
> function mouseX(): number;
> 
> //% shim=browserEvents::mouseY
> 
> function mouseY(): number;
> 
> //% shim=browserEvents::wheelDx
> 
> function wheelDx(): number;
> 
> //% shim=browserEvents::wheelDy
> 
> function wheelDy(): number;
> 
> //% shim=browserEvents::wheelDz
> 
> function wheelDz(): number;
> 
> //% shim=browserEvents::\_setCursorVisible
> 
> function \_setCursorVisible(visible: boolean): void;
> 
> //% shim=browserEvents::currentTime
> 
> function currentTime(): number;
> 
> //% shim=browserEvents::getYear
> 
> function getYear(time: number): number;
> 
> //% shim=browserEvents::getMonth
> 
> function getMonth(time: number): number;
> 
> //% shim=browserEvents::getDayOfMonth
> 
> function getDayOfMonth(time: number): number;
> 
> //% shim=browserEvents::getDayOfWeek
> 
> function getDayOfWeek(time: number): number;
> 
> //% shim=browserEvents::getHours
> 
> function getHours(time: number): number;
> 
> //% shim=browserEvents::getMinutes
> 
> function getMinutes(time: number): number;
> 
> //% shim=browserEvents::getSeconds
> 
> function getSeconds(time: number): number;
> 
> }
> 
> //% icon="\\uf245"
> 
> //% color="#9c1355"
> 
> //% block="Browser Events"
> 
> namespace browserEvents {
> 
> export enum Event {
> 
> //% block="pointer down"
> 
> PointerDown = 6857,
> 
> //% block="pointer up"
> 
> PointerUp = 6858,
> 
> //% block="pointer move"
> 
> PointerMove = 6859,
> 
> //% block="pointer leave"
> 
> PointerLeave = 6860,
> 
> //% block="pointer enter"
> 
> PointerEnter = 6861,
> 
> //% block="pointer cancel"
> 
> PointerCancel = 6862,
> 
> //% block="pointer over"
> 
> PointerOver = 6863,
> 
> //% block="pointer out"
> 
> PointerOut = 6864,
> 
> //% block="wheel"
> 
> Wheel = 6865,
> 
> //% block="key down"
> 
> KeyDown = 6866,
> 
> //% block="key up"
> 
> KeyUp = 6867
> 
> }
> 
> export enum MouseButtonId {
> 
> //% block="left"
> 
> Left = 1,
> 
> //% block="right"
> 
> Right = 3,
> 
> //% block="wheel"
> 
> Wheel = 2,
> 
> //% block="back"
> 
> Back = 4,
> 
> //% block="forward"
> 
> Forward = 5
> 
> }
> 
> export enum MouseButtonEvent {
> 
> //% block="pressed"
> 
> Pressed = Event.PointerDown,
> 
> //% block="released"
> 
> Released = Event.PointerUp,
> 
> }
> 
> //% whenUsed
> 
> const INTERNAL_POINTER_DOWN = 6868;
> 
> //% whenUsed
> 
> const INTERNAL_POINTER_UP = 6869;
> 
> type MouseHandler = (x: number, y: number) => void;
> 
> //% fixedInstances
> 
> export class MouseButton {
> 
> protected \_pressed: boolean;
> 
> protected handlers: \_SceneButtonHandlers<MouseHandler>;
> 
> constructor(public id: number) {
> 
> control.internalOnEvent(INTERNAL_POINTER_DOWN, this.id, () => this.setPressed(true), 16);
> 
> control.internalOnEvent(INTERNAL_POINTER_UP, this.id, () => this.setPressed(false), 16);
> 
> this.\_pressed = false;
> 
> this.handlers = new \_SceneButtonHandlers<MouseHandler>(id, invokeMouseHandler);
> 
> }
> 
> setPressed(pressed: boolean) {
> 
> this.\_pressed = pressed;
> 
> if (pressed) {
> 
> control.raiseEvent(MouseButtonEvent.Pressed, this.id);
> 
> }
> 
> else {
> 
> control.raiseEvent(MouseButtonEvent.Released, this.id);
> 
> }
> 
> }
> 
> //% blockId=browserEvents_mouseButton_onEvent
> 
> //% block="on $this mouse button $event $x $y"
> 
> //% draggableParameters="reporter"
> 
> //% group="Mouse"
> 
> //% weight=50
> 
> onEvent(event: MouseButtonEvent, handler: (x: number, y: number) => void) {
> 
> this.handlers.onEvent(event, handler);
> 
> }
> 
> //% blockId=browserEvents_mouseButton_isPressed
> 
> //% block="is $this mouse button pressed"
> 
> //% group="Mouse"
> 
> //% weight=40
> 
> isPressed() {
> 
> return this.\_pressed;
> 
> }
> 
> //% blockId=browserEvents_mouseButton_pauseUntil
> 
> //% block="pause until $this mouse button is $event"
> 
> //% group="Mouse"
> 
> //% weight=30
> 
> pauseUntil(event: MouseButtonEvent) {
> 
> control.waitForEvent(event, this.id)
> 
> }
> 
> addEventListener(event: MouseButtonEvent, handler: (x: number, y: number) => void) {
> 
> this.handlers.addEventListener(event, handler);
> 
> }
> 
> removeEventListener(event: MouseButtonEvent, handler: (x: number, y: number) => void) {
> 
> this.handlers.removeEventListener(event, handler);
> 
> }
> 
> }
> 
> export class \_SceneButtonHandlers<U> {
> 
> protected handlers: ButtonHandler<U>\[\];
> 
> constructor(public id: number, protected invokeHandler: (handler: U) => void) {
> 
> this.handlers = \[\];
> 
> }
> 
> onEvent(event: number, handler: U) {
> 
> this.getHandler(event, true).handler = handler;
> 
> }
> 
> addEventListener(event: number, handler: U) {
> 
> this.getHandler(event, true).listeners.push(handler);
> 
> }
> 
> removeEventListener(event: number, handler: U) {
> 
> const eventHandler = this.getHandler(event);
> 
> if (eventHandler) {
> 
> eventHandler.listeners = eventHandler.listeners.filter(h => h !== handler);
> 
> }
> 
> }
> 
> protected getHandler(event: number, createIfMissing?: boolean) {
> 
> for (const handler of this.handlers) {
> 
> if (handler.event === event) return handler;
> 
> }
> 
> if (createIfMissing) {
> 
> const newHandler = new ButtonHandler<U>(event, this.id, this.invokeHandler);
> 
> this.handlers.push(newHandler);
> 
> return newHandler;
> 
> }
> 
> return undefined;
> 
> }
> 
> }
> 
> class ButtonHandler<U> {
> 
> handler: U;
> 
> listeners: U\[\] = \[\];
> 
> constructor(public readonly event: number, id: number, invokeHandler: (handler: U) => void) {
> 
> control.onEvent(event, id, () => {
> 
> if (this.handler) {
> 
> invokeHandler(this.handler);
> 
> }
> 
> for (const listener of this.listeners) {
> 
> invokeHandler(listener);
> 
> }
> 
> });
> 
> }
> 
> }
> 
> function invokeMouseHandler(handler: MouseHandler) {
> 
> handler(mouseX(), mouseY());
> 
> }
> 
> //% blockId=browserEvents_onEvent
> 
> //% block="on browser event $event"
> 
> //% draggableParameters="reporter"
> 
> //% group="Mouse"
> 
> //% weight=10
> 
> export function onEvent(event: Event, handler: () => void) {
> 
> control.onEvent(event, 0, handler);
> 
> }
> 
> //% blockId=browserEvents_onMouseMove
> 
> //% block="on mouse move $x $y"
> 
> //% draggableParameters="reporter"
> 
> //% group="Mouse"
> 
> //% weight=100
> 
> export function onMouseMove(handler: (x: number, y: number) => void) {
> 
> control.onEvent(Event.PointerMove, 0, () => {
> 
> handler(mouseX(), mouseY());
> 
> });
> 
> }
> 
> //% blockId=browserEvents_onWheel
> 
> //% block="on mouse wheel $dx $dy $dz"
> 
> //% draggableParameters="reporter"
> 
> //% group="Mouse"
> 
> //% weight=20
> 
> export function onWheel(handler: (dx: number, dy: number, dz: number) => void) {
> 
> control.onEvent(Event.Wheel, 0, () => {
> 
> handler(wheelDx(), wheelDy(), wheelDz());
> 
> });
> 
> }
> 
> //% blockId=browserEvents_setCursorVisible
> 
> //% block="set cursor visible $visible"
> 
> //% group="Mouse"
> 
> //% weight=0
> 
> export function setCursorVisible(visible: boolean) {
> 
> \_setCursorVisible(visible);
> 
> }
> 
> //% fixedInstance whenUsed block="left"
> 
> export const MouseLeft = new MouseButton(MouseButtonId.Left);
> 
> //% fixedInstance whenUsed block="right"
> 
> export const MouseRight = new MouseButton(MouseButtonId.Right);
> 
> //% fixedInstance whenUsed block="wheel"
> 
> export const MouseWheel = new MouseButton(MouseButtonId.Wheel);
> 
> //% fixedInstance whenUsed block="back"
> 
> export const MouseBack = new MouseButton(MouseButtonId.Back);
> 
> //% fixedInstance whenUsed block="forward"
> 
> export const MouseForward = new MouseButton(MouseButtonId.Forward);
> 
> //% fixedInstance whenUsed block="any"
> 
> export const MouseAny = new MouseButton(0);
> 
> }
> 
> namespace browserEvents {
> 
> export enum Key {
> 
> Zero = 48,
> 
> One = 49,
> 
> Two = 50,
> 
> Three = 51,
> 
> Four = 52,
> 
> Five = 53,
> 
> Six = 54,
> 
> Seven = 55,
> 
> Eight = 56,
> 
> Nine = 57,
> 
> BackTick = 192,
> 
> Hyphen = 189,
> 
> Equals = 187,
> 
> Q = 81,
> 
> W = 87,
> 
> E = 69,
> 
> R = 82,
> 
> T = 84,
> 
> Y = 89,
> 
> U = 85,
> 
> I = 73,
> 
> O = 79,
> 
> P = 80,
> 
> OpenBracket = 219,
> 
> CloseBracket = 221,
> 
> BackSlash = 220,
> 
> A = 65,
> 
> S = 83,
> 
> D = 68,
> 
> F = 70,
> 
> G = 71,
> 
> H = 72,
> 
> Space = 32,
> 
> PageUp = 33,
> 
> J = 74,
> 
> K = 75,
> 
> L = 76,
> 
> SemiColon = 186,
> 
> Apostrophe = 222,
> 
> Z = 90,
> 
> X = 88,
> 
> C = 67,
> 
> V = 86,
> 
> B = 66,
> 
> N = 78,
> 
> M = 77,
> 
> Comma = 188,
> 
> Period = 190,
> 
> ForwardSlash = 191,
> 
> Shift = 16,
> 
> Enter = 13,
> 
> CapsLock = 20,
> 
> Tab = 9,
> 
> Control = 17,
> 
> Meta = 91,
> 
> Alt = 18,
> 
> ArrowUp = 38,
> 
> ArrowDown = 40,
> 
> ArrowLeft = 37,
> 
> ArrowRight = 39,
> 
> PageDown = 34,
> 
> End = 35,
> 
> Home = 36,
> 
> LeftShift = 1016,
> 
> RightShift = 1017,
> 
> LeftControl = 1018,
> 
> RightControl = 1019,
> 
> Backspace = 8,
> 
> Delete = 46,
> 
> }
> 
> export enum KeyEvent {
> 
> //% block="pressed"
> 
> Pressed = 6872,
> 
> //% block="released"
> 
> Released = 6873,
> 
> //% block="repeat"
> 
> Repeat = 6874
> 
> }
> 
> //% whenUsed
> 
> const INTERNAL_KEY_DOWN = 6870;
> 
> //% whenUsed
> 
> const INTERNAL_KEY_UP = 6871;
> 
> export function keyToString(key: Key) {
> 
> switch (key) {
> 
> case Key.Q: return "Q";
> 
> case Key.W: return "W";
> 
> case Key.E: return "E";
> 
> case Key.R: return "R";
> 
> case Key.T: return "T";
> 
> case Key.Y: return "Y";
> 
> case Key.U: return "U";
> 
> case Key.I: return "I";
> 
> case Key.O: return "O";
> 
> case Key.P: return "P";
> 
> case Key.OpenBracket: return "\[";
> 
> case Key.CloseBracket: return "\]";
> 
> case Key.BackSlash: return "\\\\";
> 
> case Key.A: return "A";
> 
> case Key.S: return "S";
> 
> case Key.D: return "D";
> 
> case Key.F: return "F";
> 
> case Key.G: return "G";
> 
> case Key.H: return "H";
> 
> case Key.Space: return " ";
> 
> case Key.PageUp: return "PageUp";
> 
> case Key.J: return "J";
> 
> case Key.K: return "K";
> 
> case Key.L: return "L";
> 
> case Key.SemiColon: return ";";
> 
> case Key.Apostrophe: return "'";
> 
> case Key.Z: return "Z";
> 
> case Key.X: return "X";
> 
> case Key.C: return "C";
> 
> case Key.V: return "V";
> 
> case Key.B: return "B";
> 
> case Key.N: return "N";
> 
> case Key.M: return "M";
> 
> case Key.Comma: return ",";
> 
> case Key.Period: return ".";
> 
> case Key.ForwardSlash: return "/";
> 
> case Key.Shift: return "Shift";
> 
> case Key.Enter: return "Enter";
> 
> case Key.CapsLock: return "CapsLock";
> 
> case Key.Tab: return "Tab";
> 
> case Key.Control: return "Control";
> 
> case Key.Meta: return "Meta";
> 
> case Key.Alt: return "Alt";
> 
> case Key.ArrowUp: return "ArrowUp";
> 
> case Key.ArrowDown: return "ArrowDown";
> 
> case Key.ArrowLeft: return "ArrowLeft";
> 
> case Key.ArrowRight: return "ArrowRight";
> 
> case Key.PageDown: return "PageDown";
> 
> case Key.End: return "End";
> 
> case Key.Home: return "Home";
> 
> case Key.Zero: return "0";
> 
> case Key.One: return "1";
> 
> case Key.Two: return "2";
> 
> case Key.Three: return "3";
> 
> case Key.Four: return "4";
> 
> case Key.Five: return "5";
> 
> case Key.Six: return "6";
> 
> case Key.Seven: return "7";
> 
> case Key.Eight: return "8";
> 
> case Key.Nine: return "9";
> 
> case Key.BackTick: return "\`";
> 
> case Key.Hyphen: return "-";
> 
> case Key.Equals: return "=";
> 
> case Key.LeftShift: return "LeftShift";
> 
> case Key.RightShift: return "RightShift";
> 
> case Key.LeftControl: return "LeftControl";
> 
> case Key.RightControl: return "RightControl";
> 
> case Key.Backspace: return "Backspace";
> 
> case Key.Delete: return "Delete";
> 
> }
> 
> }
> 
> //% whenUsed
> 
> let \_buttonsPendingInit: KeyButton\[\];
> 
> let defaultRepeatDelay = 500;
> 
> let defaultRepeatInterval = 30;
> 
> type KeyHandler = () => void;
> 
> //% fixedInstances
> 
> export class KeyButton {
> 
> protected \_pressed: boolean;
> 
> public repeatDelay: number;
> 
> public repeatInterval: number;
> 
> private \_repeatCount: number;
> 
> private \_pressedElapsed: number;
> 
> protected handlers: \_SceneButtonHandlers<KeyHandler>;
> 
> constructor(public id: number) {
> 
> // use internalOnEvent so that events fire regardless of the current context
> 
> control.internalOnEvent(INTERNAL_KEY_UP, this.id, () => this.setPressed(false), 16);
> 
> control.internalOnEvent(INTERNAL_KEY_DOWN, this.id, () => this.setPressed(true), 16);
> 
> this.\_pressed = false;
> 
> if (control.eventContext()) {
> 
> this.\__registerUpdate();
> 
> } else {
> 
> if (!\_buttonsPendingInit) {
> 
> \_buttonsPendingInit = \[\];
> 
> control.runInBackground(() => {
> 
> pauseUntil(() => !!control.eventContext());
> 
> for (const button of \_buttonsPendingInit) {
> 
> button.\__registerUpdate();
> 
> }
> 
> \_buttonsPendingInit = undefined;
> 
> });
> 
> }
> 
> \_buttonsPendingInit.push(this);
> 
> }
> 
> this.handlers = new \_SceneButtonHandlers<KeyHandler>(id, invokeKeyHandler);
> 
> }
> 
> setPressed(pressed: boolean) {
> 
> if (this.\_pressed === pressed) return;
> 
> this.\_pressed = pressed;
> 
> if (pressed) {
> 
> this.\_repeatCount = 0;
> 
> this.\_pressedElapsed = 0;
> 
> control.raiseEvent(KeyEvent.Pressed, this.id);
> 
> } else {
> 
> control.raiseEvent(KeyEvent.Released, this.id);
> 
> }
> 
> }
> 
> //% blockId=browserEvents_key_onEvent
> 
> //% block="on $this key $event"
> 
> //% group="Keyboard"
> 
> //% weight=100
> 
> onEvent(event: KeyEvent, handler: () => void) {
> 
> this.handlers.onEvent(event, handler);
> 
> }
> 
> //% blockId=browserEvents_key_isPressed
> 
> //% block="is $this key pressed"
> 
> //% group="Keyboard"
> 
> //% weight=90
> 
> isPressed() {
> 
> return this.\_pressed;
> 
> }
> 
> //% blockId=browserEvents_key_pauseUntil
> 
> //% block="pause until $this key is $event"
> 
> //% group="Keyboard"
> 
> //% weight=80
> 
> pauseUntil(event: KeyEvent) {
> 
> control.waitForEvent(event, this.id)
> 
> }
> 
> addEventListener(event: KeyEvent, handler: () => void) {
> 
> this.handlers.addEventListener(event, handler);
> 
> }
> 
> removeEventListener(event: KeyEvent, handler: () => void) {
> 
> this.handlers.removeEventListener(event, handler);
> 
> }
> 
> \__update() {
> 
> const delay = this.repeatDelay === undefined ? defaultRepeatDelay : this.repeatDelay;
> 
> const interval = this.repeatInterval === undefined ? defaultRepeatInterval : this.repeatInterval;
> 
> if (!this.\_pressed) return;
> 
> this.\_pressedElapsed += control.eventContext().deltaTimeMillis;
> 
> // initial delay
> 
> if (this.\_pressedElapsed < delay) return;
> 
> // repeat count for this step
> 
> const count = Math.floor((this.\_pressedElapsed - delay - interval) / interval);
> 
> if (count != this.\_repeatCount) {
> 
> this.\_repeatCount = count;
> 
> control.raiseEvent(KeyEvent.Repeat, this.id);
> 
> }
> 
> }
> 
> \__registerUpdate() {
> 
> control.eventContext().registerFrameHandler(19, () => this.\__update());
> 
> }
> 
> }
> 
> function invokeKeyHandler(handler: KeyHandler) {
> 
> handler();
> 
> }
> 
> //% fixedInstance whenUsed export const A = new KeyButton(Key.A);
> 
> //% fixedInstance whenUsed export const B = new KeyButton(Key.B);
> 
> //% fixedInstance whenUsed export const C = new KeyButton(Key.C);
> 
> //% fixedInstance whenUsed export const D = new KeyButton(Key.D);
> 
> //% fixedInstance whenUsed export const E = new KeyButton(Key.E);
> 
> //% fixedInstance whenUsed export const F = new KeyButton(Key.F);
> 
> //% fixedInstance whenUsed export const G = new KeyButton(Key.G);
> 
> //% fixedInstance whenUsed export const H = new KeyButton(Key.H);
> 
> //% fixedInstance whenUsed export const I = new KeyButton(Key.I);
> 
> //% fixedInstance whenUsed export const J = new KeyButton(Key.J);
> 
> //% fixedInstance whenUsed export const K = new KeyButton(Key.K);
> 
> //% fixedInstance whenUsed export const L = new KeyButton(Key.L);
> 
> //% fixedInstance whenUsed export const M = new KeyButton(Key.M);
> 
> //% fixedInstance whenUsed export const N = new KeyButton(Key.N);
> 
> //% fixedInstance whenUsed export const O = new KeyButton(Key.O);
> 
> //% fixedInstance whenUsed export const P = new KeyButton(Key.P);
> 
> //% fixedInstance whenUsed export const Q = new KeyButton(Key.Q);
> 
> //% fixedInstance whenUsed export const R = new KeyButton(Key.R);
> 
> //% fixedInstance whenUsed export const S = new KeyButton(Key.S);
> 
> //% fixedInstance whenUsed export const T = new KeyButton(Key.T);
> 
> //% fixedInstance whenUsed export const U = new KeyButton(Key.U);
> 
> //% fixedInstance whenUsed export const V = new KeyButton(Key.V);
> 
> //% fixedInstance whenUsed export const W = new KeyButton(Key.W);
> 
> //% fixedInstance whenUsed export const X = new KeyButton(Key.X);
> 
> //% fixedInstance whenUsed export const Y = new KeyButton(Key.Y);
> 
> //% fixedInstance whenUsed export const Z = new KeyButton(Key.Z);
> 
> //% fixedInstance whenUsed export const Zero = new KeyButton(Key.Zero);
> 
> //% fixedInstance whenUsed export const One = new KeyButton(Key.One);
> 
> //% fixedInstance whenUsed export const Two = new KeyButton(Key.Two);
> 
> //% fixedInstance whenUsed export const Three = new KeyButton(Key.Three);
> 
> //% fixedInstance whenUsed export const Four = new KeyButton(Key.Four);
> 
> //% fixedInstance whenUsed export const Five = new KeyButton(Key.Five);
> 
> //% fixedInstance whenUsed export const Six = new KeyButton(Key.Six);
> 
> //% fixedInstance whenUsed export const Seven = new KeyButton(Key.Seven);
> 
> //% fixedInstance whenUsed export const Eight = new KeyButton(Key.Eight);
> 
> //% fixedInstance whenUsed export const Nine = new KeyButton(Key.Nine);
> 
> //% fixedInstance whenUsed export const Shift = new KeyButton(Key.Shift);
> 
> //% fixedInstance whenUsed export const Enter = new KeyButton(Key.Enter);
> 
> //% fixedInstance whenUsed export const CapsLock = new KeyButton(Key.CapsLock);
> 
> //% fixedInstance whenUsed export const Tab = new KeyButton(Key.Tab);
> 
> //% fixedInstance whenUsed export const Control = new KeyButton(Key.Control);
> 
> //% fixedInstance whenUsed export const Meta = new KeyButton(Key.Meta);
> 
> //% fixedInstance whenUsed export const Alt = new KeyButton(Key.Alt);
> 
> //% fixedInstance whenUsed export const ArrowUp = new KeyButton(Key.ArrowUp);
> 
> //% fixedInstance whenUsed export const ArrowDown = new KeyButton(Key.ArrowDown);
> 
> //% fixedInstance whenUsed export const ArrowLeft = new KeyButton(Key.ArrowLeft);
> 
> //% fixedInstance whenUsed export const ArrowRight = new KeyButton(Key.ArrowRight);
> 
> //% fixedInstance whenUsed export const BackTick = new KeyButton(Key.BackTick);
> 
> //% fixedInstance whenUsed export const Hyphen = new KeyButton(Key.Hyphen);
> 
> //% fixedInstance whenUsed export const Equals = new KeyButton(Key.Equals);
> 
> //% fixedInstance whenUsed export const OpenBracket = new KeyButton(Key.OpenBracket);
> 
> //% fixedInstance whenUsed export const CloseBracket = new KeyButton(Key.CloseBracket);
> 
> //% fixedInstance whenUsed export const BackSlash = new KeyButton(Key.BackSlash);
> 
> //% fixedInstance whenUsed export const Space = new KeyButton(Key.Space);
> 
> //% fixedInstance whenUsed export const PageUp = new KeyButton(Key.PageUp);
> 
> //% fixedInstance whenUsed export const SemiColon = new KeyButton(Key.SemiColon);
> 
> //% fixedInstance whenUsed export const Apostrophe = new KeyButton(Key.Apostrophe);
> 
> //% fixedInstance whenUsed export const Comma = new KeyButton(Key.Comma);
> 
> //% fixedInstance whenUsed export const Period = new KeyButton(Key.Period);
> 
> //% fixedInstance whenUsed export const ForwardSlash = new KeyButton(Key.ForwardSlash);
> 
> //% fixedInstance whenUsed export const PageDown = new KeyButton(Key.PageDown);
> 
> //% fixedInstance whenUsed export const End = new KeyButton(Key.End);
> 
> //% fixedInstance whenUsed export const Home = new KeyButton(Key.Home);
> 
> //% fixedInstance whenUsed export const LeftShift = new KeyButton(Key.LeftShift);
> 
> //% fixedInstance whenUsed export const RightShift = new KeyButton(Key.RightShift);
> 
> //% fixedInstance whenUsed export const LeftControl = new KeyButton(Key.LeftControl);
> 
> //% fixedInstance whenUsed export const RightControl = new KeyButton(Key.RightControl);
> 
> //% fixedInstance whenUsed export const Backspace = new KeyButton(Key.Backspace);
> 
> //% fixedInstance whenUsed export const Delete = new KeyButton(Key.Delete);
> 
> //% fixedInstance whenUsed export const Any = new KeyButton(0);
> 
> //% blockId=browser_events_setKeyboardRepeatDefault
> 
> //% block="set keyboard repeat delay $delay ms interval $interval ms"
> 
> //% delay.defl=500
> 
> //% interval.defl=30
> 
> //% group="Keyboard"
> 
> //% weight=0
> 
> export function setKeyboardRepeatDefault(delay: number, interval: number) {
> 
> defaultRepeatDelay = Math.max(delay, 0);
> 
> defaultRepeatInterval = Math.max(interval, 1);
> 
> }
> 
> }
> 
> ```

Post your cool stuff about Game—light here!!

---

<div class="post-metadata">

**Author:** ![RizeUpDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rizeupdev/32/37426_2.png) [@RizeUpDev](https://forum.makecode.com/u/RizeUpDev)\
**Post date:** [November 12, 2026, 2:04am UTC](https://forum.makecode.com/t/game-light-topic/47194/2 "2026-11-12T02:04:27Z")

</div>

I don’t exactly see what the point is this is or how to actually use it tho…

---

<div class="post-metadata">

**Author:** ![TheGooberEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thegooberearth/32/36693_2.png) [@TheGooberEarth](https://forum.makecode.com/u/TheGooberEarth)\
**Post date:** [November 12, 2026, 2:09am UTC](https://forum.makecode.com/t/game-light-topic/47194/3 "2026-11-12T02:09:08Z")

</div>

Its for best performance possible
