Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/prompt_toolkit/key_binding/bindings/__pycache__/basic.cpython-39.pyc
Ðазад
a d�h= � @ s� d dl mZ d dlmZ d dlmZmZmZmZm Z m Z d dlmZm Z d dlmZ ddlmZ dd lmZ d gZe Zddd �dd�Zedd�dd��Zedd�dd��Zdd�dd �ZdS )� )�annotations)�get_app)� Condition�emacs_insert_mode� has_selection� in_paste_mode�is_multiline�vi_insert_mode)�KeyPress� KeyPressEvent)�Keys� )�KeyBindings� )�get_by_name�load_basic_bindings�E�bool��event�returnc C s | j S )zXCallable that returns True when the previous event was delivered to another handler.)Z is_repeat�r � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/prompt_toolkit/key_binding/bindings/basic.py�if_no_repeat s r )r c C s t t� jj�S �N)r r �current_buffer�textr r r r �has_text_before_cursor s r c C s t � jS r )r � quoted_insertr r r r �in_quoted_insert% s r r c ] C sV t � } ttB }| j}|d�|d�|d�|d�|d�|d�|d�|d�|d �|d �|d�|d�|d �|d�|d�|d�|d�|d�|d�|d�|d�|d�|d�|d�|d�|d�|d�|d�|d�|d�|d�|d �|d!�|d"�|d#�|d$�|d%�|d&�|d'�|d(�|d)�|d*�|d+�|d,�|d-�|d.�|d/�|d0�|d1�|d2�|d3�|d4�|d5�|d6�|d7�|d8�|d9�|d:�|d;�|d<�|d=�|d>�|d?�|d@�|dA�|dB�|dC�|dD�|dE�|dF�|dG�|dH�|dI�|dJ�|dK�|dL�|dM�|dN�|dO�|dP�|dQ�|dR�|dS�|dT�|dU�|dV�|dW�|dX�|dY�|tj�dZd[d\�d]d^�������������������������������������������������������������������������������������������}|dA�td_�� |dB�td`�� |d<�tda�� |d;�tdb�� |dR�tdc�� |dS�tdd�� |d�tde�� |d|df�tdg�� |d|df�tdh�� |d8|tdi�tdj�� |dE|tdi�tdk�� |dG|tdi�tdk�� |tj|tdi�tdl�� |d|df�tdm�� |d |df�tdn�� |dJ|df�tdo�� |d|df�tdp�� |dHt df�tdc�� |dIt df�tdd�� |dt |@ df�tdk�� |dq|t@ df�dZd[d\�drds��}|d �dZd[d\�dtdu��}|d9�dZd[d\�dvdw��}|d:�dZd[d\�dxdy��}|dEt df�dZd[d\�dzd{��}|d�dZd[d\�d|d}��} |tj�dZd[d\�d~d��} |tjt d�d��dZd[d\�d�d���}| S )�Nzc-azc-bzc-czc-dzc-ezc-fzc-gzc-hzc-izc-jzc-kzc-lzc-mzc-nzc-ozc-pzc-qzc-rzc-szc-tzc-uzc-vzc-wzc-xzc-yzc-z�f1�f2Zf3Zf4Zf5Zf6Zf7Zf8Zf9Zf10Zf11Zf12Zf13Zf14Zf15Zf16Zf17Zf18Zf19Zf20Zf21Zf22Zf23Zf24zc-@zc-\zc-]zc-^zc-_Z backspace�upZdown�right�leftzs-upzs-downzs-rightzs-left�home�endzs-homezs-end�deletezs-deletezc-deleteZpageupZpagedownzs-tab�tabzc-s-leftz c-s-rightzc-s-homezc-s-endzc-leftzc-rightzc-upzc-downzc-homezc-end�insertzs-insertzc-insertz<sigint>r �Noner c S s dS )aM First, for any of these keys, Don't do anything by default. Also don't catch them in the 'Any' handler which will insert them as data. If people want to insert these characters as a literal, they can always do by doing a quoted insert. (ControlQ in emacs mode, ControlV in Vi mode.) Nr r r r r �_ignore/ s cz$load_basic_bindings.<locals>._ignorezbeginning-of-linezend-of-linez backward-charzforward-charzprevious-historyznext-historyzclear-screen)�filterz kill-linezunix-line-discard)r- Zsave_beforezbackward-delete-charzdelete-charzself-insertztranspose-charsz menu-completezmenu-complete-backwardzunix-word-ruboutZenterc S s | j jt� d� dS )z6 Newline (in case of multiline input. )Zcopy_marginN)r �newliner r r r r �_newline� s z%load_basic_bindings.<locals>._newlinec S s | j jttjd�dd� dS )z� By default, handle \n as if it were a \r (enter). (It appears that some terminals send \n instead of \r when pressing enter. - at least the Linux subsystem for Windows.) � T)�firstN)Z key_processor�feedr r ZControlMr r r r � _newline2� s z&load_basic_bindings.<locals>._newline2c S s | j j| jd� d S �N)�count)r Zauto_up�argr r r r �_go_up� s z#load_basic_bindings.<locals>._go_upc S s | j j| jd� d S r4 )r Z auto_downr6 r r r r �_go_down� s z%load_basic_bindings.<locals>._go_downc S s | j �� }| jj�|� d S r )r Z cut_selection�app� clipboard�set_data�r �datar r r �_cut� s z!load_basic_bindings.<locals>._cutc S s | j �| j� dS )aj By default, control-Z should literally insert Ctrl-Z. (Ansi Ctrl-Z, code 26 in MSDOS means End-Of-File. In a Python REPL for instance, it's possible to type Control-Z followed by enter to quit.) When the system bindings are loaded and suspend-to-background is supported, that will override this binding. N)r �insert_textr= r r r r �_insert_ctrl_z� s z+load_basic_bindings.<locals>._insert_ctrl_zc S s. | j }|�dd�}|�dd�}| j�|� dS )z) Pasting from clipboard. z � r0 N)r= �replacer r? r<