Your IP : 18.225.72.200


Current Path : /opt/alt/python313/lib64/python3.13/_pyrepl/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/_pyrepl/__pycache__/keymap.cpython-313.opt-1.pyc

�

1}g<��`�SrSSSSSSSSS	S
SS.r0S
S
_SS_SS_SS_SS	_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_0SS_SS_S S _S!S!_S"S"_S#S#_S$S$_S%S%_S&S&_S'S'_S(S(_S)S)_S*S*_S+S+_S,S	_S-S-_S.S/_ES
S0S1.Er"S2S3\5rS4\S,\\4S5jrS6\S7\S,\	\\\44S8jr
S;S9jrg:)<an
Keymap contains functions for parsing keyspecs and turning keyspecs into
appropriate sequences.

A keyspec is a string representing a sequence of key presses that can
be bound to a command. All characters other than the backslash represent
themselves. In the traditional manner, a backslash introduces an escape
sequence.

pyrepl uses its own keyspec format that is meant to be a strict superset of
readline's KEYSEQ format. This means that if a spec is found that readline
accepts that this doesn't, it should be logged as a bug. Note that this means
we're using the `\C-o' style of readline's keyspec, not the `Control-o' sort.

The extension to readline is that the sequence \<KEY> denotes the
sequence of characters produced by hitting KEY.

Examples:
`a'      - what you get when you hit the `a' key
`\EOA'  - Escape - O - A (up, on my terminal)
`\<UP>' - the up arrow key
`\<up>' - ditto (keynames are case-insensitive)
`\C-o', `\c-o'  - control-o
`\M-.'  - meta-period
`\E.'   - ditto (that's how meta works for pyrepl)
`\<tab>', `\<TAB>', `\t', `\011', '\x09', '\X09', '\C-i', '\C-I'
   - all of these are the tab character.
�\�'�"�����
�
�	�)rrr�a�b�e�f�n�r�t�v�	backspace�delete�down�end�enter�escape�f1�f2�f3�f4�f5�f6�f7�f8�f9�f10�f11�f12�f13�f14�f15�f16�f17�f18�f19�f20�home�insert�leftz	page downzpage up�return�right�space� �up)�tabr6c��\rSrSrSrg)�KeySpecError�h�N)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r;��5/opt/alt/python313/lib64/python3.13/_pyrepl/keymap.pyr9r9hs��rAr9�keysc��Sn/nU[U5:a/[X5up1URU5 U[U5:aM/U$)z3Parse keys in keyspec format to a sequence of keys.�)�len�_parse_single_key_sequence�extend)rC�sr�ks    rB�
parse_keysrKlsB��	�A��A�
�c�$�i�-�)�$�2���	������c�$�i�-�
�HrA�keyrIc�D�SnSnSnU(Gd+U[U5:GaXS:XGa�XS-R5nU[;a[UnUS-
nGO�US:XaSXS-S:wa[SUS-[	U54-5eU(a[S	US-[	U54-5eSnUS
-
nGOqUS:XaSXS-S:wa[SUS-[	U54-5eU(a[S
US-[	U54-5eSnUS
-
nGOUR5(a%XS-US-n[
[US55nUS-
nO�US:Xa%XS-US-n[
[US55nUS-
nO�US:Xa~URSU5nUS:Xa[SUS-[	U54-5eXS-UR5nU[;a[SXAS-[	U54-5e[UnUS-nO/[S[	U5US-[	U54-5eXnUS-
nU(dU[U5:aGMU(a>[U5S:Xa[
[U5S-5nOUS;aSU3nO[S5eU/U4nU(aUSRSS5 U$)NrE�r���c�-z*\C must be followed by `-' (char %d of %s)zdoubled \C- (char %d of %s)��mz*\M must be followed by `-' (char %d of %s)zdoubled \M- (char %d of %s)���x��<�>���z)unterminated \< starting at char %d of %sz*unrecognised keyname `%s' at char %d of %sz,unknown backslash escape %s at char %d of %s�>r1r3zctrl z\C- followed by invalid keyr)rF�lower�_escapesr9�repr�isdigit�chr�int�find�	_keynames�ordr0)	rLrI�ctrl�meta�retrQrr�results	         rBrGrGvs����D��D�
�C��a�#�c�(�l��6�T�>���E�
� � �"�A��H�}��q�k���Q����c���1�u�:��$�&�E��q�5�$�s�)�,�-����&�6�!�a�%��c��9K�K������Q����c���1�u�:��$�&�E��q�5�$�s�)�,�-����&�6�!�a�%��c��9K�K������Q���������A���A��&���#�a��)�n���Q����c���A���A��&���#�a��*�o���Q����c���H�H�S�!�$����7�&�D��q�5�$�s�)�,�-����a�%�!�n�*�*�,���i�'�&�D��A��t�C�y�1�2��� ��n����E��"�B��A�w��A��t�C�y�1�2���
�&�C�
��F�A�y�a�#�c�(�l�z��s�8�q�=��c�#�h��o�&�C�
�%�
%��#��-�C��=�>�>��U�A�X�F���q�	����F�#��MrAc�j�0nUR5H<up4[U[5(aUSSnOUSnXBRU05USS'M> UR5HLup4X;a5[	U5S:wa[SUR
5<S35eXAX#'M?[XA5X#'MN U$)NrOrEzkey definitions for z clash)�items�
isinstance�bytes�
setdefaultrFr9�values�compile_keymap)�keymap�emptyrrL�value�firsts      rBrprp�s���
�A��l�l�n�
���c�5�!�!����G�E���F�E�+0���U�B���A�B��(�%��g�g�i�
���>��5�z�Q��"�U�\�\�^�#U�V�V�����#�E�1�A�F� �
�HrAN)rA)�__doc__r^rd�	Exceptionr9�str�listrKrb�tuplerGrpr;rArB�<module>rzs9��*�<�	�	�	
�	
�	�	
�	
�	
�	
�	
���%
���%
��h�%
��F�%
�
�5�	%
�
�T�%
�
�f�
%
�	�$�%
�	�$�%
�	�$�%
�	�$�%
�	�$�%
�	�$�%
�	�$�%
�	�$�%
�	�$�%
� 
�5�!%
�"
�5�#%
�$
�5�%%
�&
�5�'%
�(
�5�)%
�*
�5�+%
�,
�5�-%
�.
�5�/%
�0
�5�1%
�2
�5�3%
�4
�5�5%
�6�F�7%
�8
�h�9%
�:�F�;%
�<��=%
�>�y�?%
�@
�d�A%
�B�W�C%
�D�S�E%
�F�
�I%
�	�P	�9�	�
�S�
�T�#�Y�
�L�C�L�C�L�E�$�s�)�S�.�4I�L�^
rA

?>