UNPKG

@babylonjs/core

Version:

Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.

40 lines (39 loc) 1.64 kB
import { type KeyboardInfo } from "../../../Events/keyboardEvents.js"; import { type FlowGraphContext } from "../../flowGraphContext.js"; import { type FlowGraphDataConnection } from "../../flowGraphDataConnection.js"; import { FlowGraphEventType } from "../../flowGraphEventType.js"; import { FlowGraphKeyboardEventBlock, type IFlowGraphKeyboardEventBlockConfiguration } from "./flowGraphKeyboardEventBlock.js"; /** * Configuration for the key down event block. */ export interface IFlowGraphKeyDownEventBlockConfiguration extends IFlowGraphKeyboardEventBlockConfiguration { /** * When true, auto-repeat key-down events (the user holding a key) are * ignored and only the initial press fires the block. Defaults to false. */ ignoreRepeat?: boolean; } /** * A keyboard event block that fires when a key is pressed down. * Extends {@link FlowGraphKeyboardEventBlock} with an `isRepeat` output * and an `ignoreRepeat` configuration option. */ export declare class FlowGraphKeyDownEventBlock extends FlowGraphKeyboardEventBlock { /** * Output connection: whether this is an auto-repeat event (key held down). */ readonly isRepeat: FlowGraphDataConnection<boolean>; /** @internal */ readonly type: FlowGraphEventType; /** * Creates a new FlowGraphKeyDownEventBlock. * @param config optional configuration */ constructor(config?: IFlowGraphKeyDownEventBlockConfiguration); /** @internal */ _executeEvent(context: FlowGraphContext, keyboardInfo: KeyboardInfo): boolean; /** * @returns class name of the block. */ getClassName(): string; }