/** * An Event Operator emitting event.key instead of any KeyboardEvent object * @returns OperatorFunction * * For one-step input pipelines, see the {@link Key | Key (uppercase)} Event Adapter * * ## Examples * * ### Collect distinct vowels typed in a text box * * The following illustrates how to get any key presses from the text box * and only pass the actual character through to the main stream * * ```ts * import { Subject, distinct, filter, scan } from 'rxjs'; * import { rml, source, key } from 'rimmel'; * * const isVowel = filter(c => 'aeiou'.includes(c)); * * const Component = () => { * const vowels = new Subject().pipe( * distinct(), * scan((a, b) => a.concat(b)), * ); * * return rml` * Unique vowels pressed: "${vowels}"" * * ; /** * An Event Adapter emitting event.key instead of any KeyboardEvent object * @returns EventSource * * For multi-step input pipelines, see {@link key | key (lowercase)} * * ## Examples * * ### Display the last key pressed in a text box * * The following illustrates how to get any key presses from the text box * and only pass the actual character through to the main stream * * ```ts * import { Subject } from 'rxjs'; * import { rml, Key } from 'rimmel'; * * const Component = () => { * const stream = new Subject(); * * return rml` * Last character pressed: "${stream}"" * * ${stream}"" * * | Partial<{ next?: import("..").ObserverFunction | undefined; error?: import("..").ObserverErrorFunction; complete?: import("..").ObserverCompleteFunction; }> | undefined) => Partial<{ next?: import("..").ObserverFunction | undefined; error?: import("..").ObserverErrorFunction; complete?: import("..").ObserverCompleteFunction; }> & { next: (value: KeyboardEvent) => void; }; export declare const asKey: import("rxjs").OperatorFunction; export declare const AsKey: (target: ((data: string) => void) | import("..").ObserverFunction | Partial<{ next?: import("..").ObserverFunction | undefined; error?: import("..").ObserverErrorFunction; complete?: import("..").ObserverCompleteFunction; }> | undefined) => Partial<{ next?: import("..").ObserverFunction | undefined; error?: import("..").ObserverErrorFunction; complete?: import("..").ObserverCompleteFunction; }> & { next: (value: KeyboardEvent) => void; }; //# sourceMappingURL=keyboard-source.d.ts.map