Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Assign NameStore TupleLoad Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BoolOpAnd CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return NameLoad Assign NameStore Call NameLoad BinOpAdd SubscriptLoad NameLoad Slice Num TupleLoad AttributeLoad NameLoad attr Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return NameLoad Return ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call NameLoad GeneratorExp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore NameLoad While NameLoad body If NameLoad body Assign NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr Yield If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr Call AttributeLoad NameLoad attr body Assign NameStore NameLoad If BoolOpAnd UnaryOpNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad Assign NameStore ListLoad orelse If BoolOpAnd UnaryOpNot NameLoad UnaryOpNot NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad For NameStore Call NameLoad Call NameLoad NameLoad Num Num body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert Call NameLoad NameLoad NameLoad If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore CompareEq NameLoad AttributeLoad NameLoad attr TryExcept body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad handlers ExceptHandler type NameLoad body Pass Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return BoolOpOr AttributeLoad NameLoad attr Num decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert CompareIn NameLoad Str Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If CompareGtE Call NameLoad NameLoad Num body Assign NameStore NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list
N/A N/A 
An :class:`~.InputProcessor` receives callbacks for the keystrokes parsed from
the input in the :class:`~prompt_toolkit.inputstream.InputStream` instance.

The `InputProcessor` will according to the implemented keybindings call the
correct callbacks when new key presses are feed through `feed_key`.
 __future__ unicode_literals keys Keys utils Callback prompt_toolkit.buffer EditReadOnlyBuffer N/A weakref N/A __all__ N/A InputProcessor KeyPress KeyPress N/A object N/A N/A 
    :param key: a `Keys` instance.
    :param data: The received string on stdin. (Often vt100 escape codes.)
     __init__ N/A N/A self key data N/A N/A N/A N/A self key key N/A N/A self data data N/A __repr__ N/A N/A self N/A N/A N/A N/A %s(key=%r, data=%r) N/A N/A N/A self __class__ __name__ N/A self key N/A self data N/A __eq__ N/A N/A self other N/A N/A N/A N/A N/A N/A self key N/A other key N/A N/A self data N/A other data N/A N/A InputProcessor N/A object N/A N/A 
    Statemachine that receives :class:`KeyPress` instances and according to the
    key bindings in the given :class:`Registry`, calls the matching handlers.

    ::

        p = InputProcessor(registry)

        # Send keys into the processor.
        p.feed_key(KeyPress(Keys.ControlX, ''))
        p.feed_key(KeyPress(Keys.ControlC, '')

        # Now the ControlX-ControlC callback will be called if this sequence is
        # registered in the registry.

    :param registry: `Registry` instance.
    :param cli_ref: weakref to `CommandLineInterface`.
     __init__ N/A N/A self registry cli_ref N/A N/A N/A N/A self _registry registry N/A N/A self _cli_ref cli_ref N/A N/A N/A self reset N/A N/A self beforeKeyPress N/A Callback N/A N/A self afterKeyPress N/A Callback N/A reset N/A N/A self N/A N/A N/A N/A self _previous_key_sequence None N/A N/A self _previous_handler None N/A N/A self _process_coroutine N/A N/A self _process N/A N/A N/A N/A self _process_coroutine send None N/A N/A self arg None N/A _get_matches N/A N/A self key_presses N/A N/A N/A 
        For a list of :class:`KeyPress` instances. Give the matching handlers
        that would handle this.
         N/A keys N/A tuple N/A N/A k key N/A k key_presses N/A cli N/A N/A self _cli_ref N/A with_mode N/A b N/A b N/A N/A N/A self _registry get_bindings_for_keys keys N/A N/A b filter cli N/A with_mode N/A N/A with_mode N/A keys_any N/A tuple N/A N/A keys N/A -1 N/A N/A Keys Any N/A with_mode_any N/A b N/A b N/A N/A N/A self _registry get_bindings_for_keys keys_any N/A N/A b filter cli N/A with_mode_any N/A N/A with_mode_any N/A N/A N/A _is_prefix_of_longer_match N/A N/A self key_presses N/A N/A N/A 
        For a list of :class:`KeyPress` instances. Return True if there is any
        handler that is bound to a suffix of this keys.
         N/A keys N/A tuple N/A N/A k key N/A k key_presses N/A cli N/A N/A self _cli_ref N/A filters N/A set N/A N/A b filter N/A b N/A N/A N/A self _registry get_bindings_starting_with_keys keys N/A N/A any N/A N/A f cli N/A f filters N/A _process N/A N/A self N/A N/A N/A 
        Coroutine implementing the key match algorithm. Key strokes are sent
        into this generator, and it calls the appropriate handlers.
         N/A buffer N/A N/A retry False N/A True N/A N/A retry N/A N/A retry False N/A N/A N/A N/A buffer append N/A N/A buffer N/A N/A is_prefix_of_longer_match N/A N/A self _is_prefix_of_longer_match buffer N/A matches N/A N/A self _get_matches buffer N/A N/A matches N/A N/A N/A matches N/A -1 eager N/A N/A self _cli_ref N/A N/A is_prefix_of_longer_match False N/A N/A N/A is_prefix_of_longer_match matches N/A N/A N/A N/A self _call_handler N/A matches N/A -1 key_sequence buffer N/A buffer N/A N/A N/A N/A N/A is_prefix_of_longer_match N/A matches N/A N/A retry True N/A found False N/A i N/A range N/A len buffer 0 -1 N/A N/A matches N/A N/A self _get_matches N/A buffer N/A i N/A matches N/A N/A N/A N/A self _call_handler N/A matches N/A -1 key_sequence N/A buffer N/A i N/A buffer N/A buffer N/A i N/A found True N/A N/A found N/A N/A buffer N/A buffer N/A 1 N/A feed_key N/A N/A self key_press N/A N/A N/A 
        Send a new :class:`KeyPress` into this processor.
         N/A N/A isinstance key_press KeyPress N/A N/A N/A key_press key N/A Keys CPRResponse N/A N/A N/A N/A N/A self beforeKeyPress fire N/A N/A N/A N/A self _process_coroutine send key_press N/A N/A N/A key_press key N/A Keys CPRResponse N/A N/A N/A N/A N/A self afterKeyPress fire N/A _call_handler N/A N/A self handler key_sequence N/A None N/A N/A arg N/A self arg N/A N/A self arg None N/A is_repeat N/A handler N/A self _previous_handler N/A N/A N/A event N/A Event N/A N/A weakref ref self arg arg key_sequence key_sequence previous_key_sequence N/A self _previous_key_sequence is_repeat is_repeat N/A N/A N/A handler call event N/A N/A N/A N/A N/A self _registry on_handler_called fire event N/A N/A N/A EditReadOnlyBuffer N/A N/A N/A N/A self _previous_key_sequence key_sequence N/A N/A self _previous_handler handler N/A cli N/A N/A self _cli_ref N/A N/A cli N/A N/A handler invalidate_ui cli N/A N/A N/A N/A cli invalidate N/A N/A Event N/A object N/A N/A 
    Key press event, delivered to key bindings.

    :param input_processor_ref: Weak reference to the `InputProcessor`.
    :param arg: Repetition argument.
    :param key_sequence: List of `KeyPress` instances.
    :param previouskey_sequence: Previous list of `KeyPress` instances.
    :param is_repeat: True when the previous event was delivered to the same handler.
     __init__ N/A N/A self input_processor_ref arg key_sequence previous_key_sequence is_repeat N/A None None None False N/A N/A N/A self _input_processor_ref input_processor_ref N/A N/A self key_sequence key_sequence N/A N/A self previous_key_sequence previous_key_sequence N/A N/A self is_repeat is_repeat N/A N/A self _arg arg N/A __repr__ N/A N/A self N/A N/A N/A N/A Event(arg=%r, key_sequence=%r, is_repeat=%r) N/A N/A self arg N/A self key_sequence N/A self is_repeat N/A data N/A N/A self N/A N/A N/A N/A N/A N/A self key_sequence N/A -1 data N/A property input_processor N/A N/A self N/A N/A N/A N/A N/A self _input_processor_ref N/A property cli N/A N/A self N/A N/A N/A 
        Command line interface.
         N/A N/A N/A N/A self input_processor _cli_ref N/A property current_buffer N/A N/A self N/A N/A N/A 
        The current buffer.
         N/A N/A N/A self cli current_buffer N/A property arg N/A N/A self N/A N/A N/A 
        Repetition argument.
         N/A N/A N/A self _arg 1 N/A property append_to_arg_count N/A N/A self data N/A N/A N/A 
        Add digit to the input argument.

        :param data: the typed digit as string
         N/A N/A data -0123456789 N/A current N/A self _arg N/A N/A current None N/A N/A N/A data - N/A N/A data -1 N/A result N/A int data N/A N/A result N/A int N/A %s%s N/A current data N/A N/A N/A int result 1000000 N/A N/A result None N/A N/A N/A self input_processor arg result N/A N/A