euporie.core.key_binding.key_processor

Modify the KeyProcessor to remove any timeout after an escape key press.

Functions

get_app()

Get the current active (running) Application.

Classes

KeyProcessor(*args, **kwargs)

A subclass of prompt_toolkit's keyprocessor.

Keys(value[, names, module, qualname, type, ...])

List of keys for use in key bindings.

PtKeyProcessor

alias of KeyProcessor

class euporie.core.key_binding.key_processor.KeyProcessor(*args: Any, **kwargs: Any)

Bases: KeyProcessor

A subclass of prompt_toolkit’s keyprocessor.

This adds an exception to the auto-flush timeout so that the input is flushed immediately if the key pressed is the escape key.

empty_queue() list[prompt_toolkit.key_binding.key_processor.KeyPress]

Empty the input queue. Return the unprocessed input.

feed(key_press: KeyPress, first: bool = False) None

Add a new KeyPress to the input queue. (Don’t forget to call process_keys in order to process the queue.)

Parameters:

first – If true, insert before everything else.

feed_multiple(key_presses: list[prompt_toolkit.key_binding.key_processor.KeyPress], first: bool = False) None
Parameters:

first – If true, insert before everything else.

process_keys() None

Process all the keys in the input queue.

reset() None
send_sigint() None

Send SIGINT. Immediately call the SIGINT key handler.