관리-도구
편집 파일: config_key.cpython-37.opt-1.pyc
B � f�8 � @ s� d Z ddlmZmZmZmZ ddlmZmZm Z m Z mZmZ ddlm Z ddlZddlZdZeejej �Zed�ZdZd Zd Zee e e e e Zdd� ZG d d� de�Zedkr�ddlmZ edddd� ddlm Z e e� dS )z6 Dialog for building Tkinter accelerator key bindings � )�Toplevel�Listbox� StringVar�TclError)�Frame�Button�Checkbutton�Entry�Label� Scrollbar)� messageboxN)ZF1ZF2ZF3ZF4ZF5ZF6ZF7ZF8ZF9ZF10ZF11ZF12z~!@#%^&*()_-+={}[]|;:,.<>/?)�Tab�SpaceZReturn)Z BackSpaceZDeleteZInsert)ZHomeZEndzPage Upz Page Downz Left ArrowzRight ArrowzUp Arrowz Down Arrowc $ C s| ddddddddd d ddd ddddddddddddddddddd d!d"d#d$�#}|� | | �} d%|krr| tjkrr| �� } d&| � �S )'z3Translate from keycap symbol to the Tkinter keysym.ZspaceZ asciitildeZexclamZatZ numbersignZpercentZasciicircumZ ampersandZasteriskZ parenleftZ parenrightZ underscoreZminusZplusZequalZ braceleftZ bracerightZbracketleftZbracketrightZbarZ semicolonZcolonZcommaZperiodZlessZgreaterZslashZquestionZPriorZNextZLeftZRightZUpZDownr )#r �~�!�@�#�%�^�&�*�(�)�_�-�+�=�{�}�[�]�|�;�:�,�.�<�>�/�?zPage Upz Page Downz Left ArrowzRight ArrowzUp Arrowz Down Arrowr �ShiftzKey-)�get�string�ascii_lowercase�upper)�key� modifiers�mapping� r2 �7/opt/alt/python37/lib64/python3.7/idlelib/config_key.py� translate_key s r4 c @ s� e Zd ZdZddd�dd�Zdd� Zdd � Zd d� Zdd � Zddd�Z dd� Z dd� Zdd� Zd dd�Z d!dd�Zdd� Zdd� ZdS )"� GetKeysDialogzKey Sequence ErrorF)�_htest�_utestc C sF t �| |� | �� | jdd� | jddd� | �|� | �|� | �� | �d| j � || _ || _|| _d| _ t| �| _| j�d� | �� g | _x,| jD ]"}t| �}|�d� | j�|� q�W d| _| �� | �� | �d|�� |�� d | �� d |�� |�s |�� d | �� d nd f � |�sB| �� | � � d S )a� parent - parent of this dialog title - string which is the title of the popup dialog action - string, the name of the virtual event these keys will be mapped to current_key_sequences - list, a list of all key sequence lists currently mapped to virtual events, for overlap checking _htest - bool, change box location when running htest _utest - bool, do not wait when running unittest � )�borderwidthF)�height�widthZWM_DELETE_WINDOW� z+%d+%d� � N)!r �__init__ZwithdrawZ configureZ resizable�titleZ transientZgrab_setZprotocol�cancel�parent�action�current_key_sequences�resultr � key_string�set�set_modifiers_for_platform� modifier_varsr0 �append�advanced�create_widgetsZupdate_idletasksZgeometryZwinfo_rootxZwinfo_widthZwinfo_reqwidthZwinfo_rootyZwinfo_heightZwinfo_reqheightZ deiconifyZwait_window) �selfrB r@ rC rD r6 r7 �modifier�variabler2 r2 r3 r? 0 s@ *zGetKeysDialog.__init__c O s t j||� d S )N)r � showerror)rM �args�kwargsr2 r2 r3 rP ` s zGetKeysDialog.showerrorc C s0 t | ddd� | _}|jdddd� t | �}|jdd d � t|dd| jd �| _| jjddddd� t|dd| jd �| _| jjddddd� t |dd�| _ | j jdddddd� t | j d| j� d�d�}|jdd� t | j d| jddd�}|jddd d� t |�| _ | j jddddd � i | _d}xft| j| j�D ]T\}}| j�||�}t| j | j|||d!d"�} | jd|ddd#� | | j|<