node-insim
Version:
An InSim library for NodeJS with TypeScript support
32 lines (31 loc) • 1 kB
TypeScript
import { SendablePacket } from './base';
import { PacketType } from './enums';
import type { PacketData } from './types';
/**
* Single CHaracter
*
* You can send individual key presses to LFS with the IS_SCH packet.
* For standard keys (e.g. V and H) you should send a capital letter.
* This does not work with some keys like F keys, arrows or CTRL keys.
* You can also use {@link IS_MST} with the /press /shift /ctrl /alt commands.
*/
export declare class IS_SCH extends SendablePacket {
readonly Size = 8;
readonly Type = PacketType.ISP_SCH;
readonly ReqI = 0;
readonly Zero = 0;
/** Key to press */
CharB: number;
/** Bit 0: Shift / bit 1: Ctrl */
Flags: CharacterModifiers | 0;
private readonly Spare2;
private readonly Spare3;
constructor(data?: IS_SCH_Data);
}
export declare enum CharacterModifiers {
/** Shift key */
SHIFT = 1,
/** Ctrl key */
CTRL = 2
}
export type IS_SCH_Data = Pick<PacketData<IS_SCH>, 'CharB' | 'Flags'>;