Tego Bot API Documentation v0.1.1
Tego Bot API Documentation / keyTap
Function: keyTap()
keyTap(
key,modifier?):void
Defined in: index.ts:269
Tap a key (press and immediately release)
Parameters
key
string
Key to tap (e.g., 'a', 'enter', 'escape', 'f1')
modifier?
string[]
Optional array of modifier keys: 'control', 'shift', 'alt', 'command'
Returns
void
Example
typescript
import { keyTap } from "@tego/botjs";
// Type a single character
keyTap('a');
// Press Enter
keyTap('enter');
// Ctrl+C (copy)
keyTap('c', ['control']);
// Ctrl+Shift+V (paste without formatting)
keyTap('v', ['control', 'shift']);