Lib/idlelib/configdialog.py
def create_page_keys(self):
        """Return frame of widgets for Keys tab.

        Configuration attributes:
            builtin_keys: Menu variable for built-in keybindings.
            custom_keys: Menu variable for custom keybindings.
            are_keys_builtin: Selector for built-in or custom keybindings.
            keybinding: Action/key bindings.
        """
        parent = self.parent
        self.builtin_keys = StringVar(parent)
        self.custom_keys = StringVar(parent)
        self.are_keys_builtin = BooleanVar(parent)
        self.keybinding = StringVar(parent)

        ##widget creation
        #body frame
        frame = self.tab_pages.pages['Keys'].frame
        #body section frames
        frame_custom = LabelFrame(
                frame, borderwidth=2, relief=GROOVE,
                text=' Custom Key Bindings ')
        frame_key_sets = LabelFrame(
                frame, borderwidth=2, relief=GROOVE, text=' Key Set ')
        #frame_custom
        frame_target = Frame(frame_custom)
        target_title = Label(frame_target, text='Action - Key(s)')
        scroll_target_y = Scrollbar(frame_target)
        scroll_target_x = Scrollbar(frame_target, orient=HORIZONTAL)
        self.list_bindings = Listbox(
                frame_target, takefocus=FALSE, exportselection=FALSE)
        self.list_bindings.bind('<ButtonRelease-1>', self.keybinding_selected)
        scroll_target_y.config(command=self.list_bindings.yview)
        scroll_target_x.config(command=self.list_bindings.xview)
        self.list_bindings.config(yscrollcommand=scroll_target_y.set)
        self.list_bindings.config(xscrollcommand=scroll_target_x.set)
        self.button_new_keys = Button(
                frame_custom, text='Get New Keys for Selection',
                command=self.get_new_keys, state=DISABLED)
        #frame_key_sets
        frames = [Frame(frame_key_sets, padx=2, pady=2, borderwidth=0)
                  for i in range(2)]
        self.radio_keys_builtin = Radiobutton(
                frames[0], variable=self.are_keys_builtin, value=1,
                command=self.set_keys_type, text='Use a Built-in Key Set')
        self.radio_keys_custom = Radiobutton(
                frames[0], variable=self.are_keys_builtin,  value=0,
                command=self.set_keys_type, text='Use a Custom Key Set')
        self.opt_menu_keys_builtin = DynOptionMenu(
                frames[0], self.builtin_keys, None, command=None)
        self.opt_menu_keys_custom = DynOptionMenu(
                frames[0], self.custom_keys, None, command=None)
        self.button_delete_custom_keys = Button(
                frames[1], text='Delete Custom Key Set',
                command=self.delete_custom_keys)
        button_save_custom_keys = Button(
                frames[1], text='Save as New Custom Key Set',
                command=self.save_as_new_key_set)
        self.new_custom_keys = Label(frames[0], bd=2)

        ##widget packing
        #body
        frame_custom.pack(side=BOTTOM, padx=5, pady=5, expand=TRUE, fill=BOTH)
        frame_key_sets.pack(side=BOTTOM, padx=5, pady=5, fill=BOTH)
        #frame_custom
        self.button_new_keys.pack(side=BOTTOM, fill=X, padx=5, pady=5)
        frame_target.pack(side=LEFT, padx=5, pady=5, expand=TRUE, fill=BOTH)
        #frame target
        frame_target.columnconfigure(0, weight=1)
        frame_target.rowconfigure(1, weight=1)
        target_title.grid(row=0, column=0, columnspan=2, sticky=W)
        self.list_bindings.grid(row=1, column=0, sticky=NSEW)
        scroll_target_y.grid(row=1, column=1, sticky=NS)
        scroll_target_x.grid(row=2, column=0, sticky=EW)
        #frame_key_sets
        self.radio_keys_builtin.grid(row=0, column=0, sticky=W+NS)
        self.radio_keys_custom.grid(row=1, column=0, sticky=W+NS)
        self.opt_menu_keys_builtin.grid(row=0, column=1, sticky=NSEW)
        self.opt_menu_keys_custom.grid(row=1, column=1, sticky=NSEW)
        self.new_custom_keys.grid(row=0, column=2, sticky=NSEW, padx=5, pady=5)
        self.button_delete_custom_keys.pack(side=LEFT, fill=X, expand=True, padx=2)
        button_save_custom_keys.pack(side=LEFT, fill=X, expand=True, padx=2)
        frames[0].pack(side=TOP, fill=BOTH, expand=True)
        frames[1].pack(side=TOP, fill=X, expand=True, pady=2)
        return frame
Return frame of widgets for Keys tab.

        Configuration attributes:
            builtin_keys: Menu variable for built-in keybindings.
            custom_keys: Menu variable for custom keybindings.
            are_keys_builtin: Selector for built-in or custom keybindings.
            keybinding: Action/key bindings.
        
Return frame of widgets for Keys tab.
Configuration attributes:
builtin_keys: Menu variable for built-in keybindings.
custom_keys: Menu variable for custom keybindings.
are_keys_builtin: Selector for built-in or custom keybindings.
keybinding: Action/key bindings.
Return frame of widgets for Keys tab . Configuration attributes : builtin_keys : Menu variable for built - in keybindings . custom_keys : Menu variable for custom keybindings . are_keys_builtin : Selector for built - in or custom keybindings . keybinding : Action / key bindings .
def create_page_keys(self):
        parent = self.parent
        self.builtin_keys = StringVar(parent)
        self.custom_keys = StringVar(parent)
        self.are_keys_builtin = BooleanVar(parent)
        self.keybinding = StringVar(parent)
        frame = self.tab_pages.pages['Keys'].frame
        frame_custom = LabelFrame(
                frame, borderwidth=2, relief=GROOVE,
                text=' Custom Key Bindings ')
        frame_key_sets = LabelFrame(
                frame, borderwidth=2, relief=GROOVE, text=' Key Set ')
        frame_target = Frame(frame_custom)
        target_title = Label(frame_target, text='Action - Key(s)')
        scroll_target_y = Scrollbar(frame_target)
        scroll_target_x = Scrollbar(frame_target, orient=HORIZONTAL)
        self.list_bindings = Listbox(
                frame_target, takefocus=FALSE, exportselection=FALSE)
        self.list_bindings.bind('<ButtonRelease-1>', self.keybinding_selected)
        scroll_target_y.config(command=self.list_bindings.yview)
        scroll_target_x.config(command=self.list_bindings.xview)
        self.list_bindings.config(yscrollcommand=scroll_target_y.set)
        self.list_bindings.config(xscrollcommand=scroll_target_x.set)
        self.button_new_keys = Button(
                frame_custom, text='Get New Keys for Selection',
                command=self.get_new_keys, state=DISABLED)
        frames = [Frame(frame_key_sets, padx=2, pady=2, borderwidth=0)
                  for i in range(2)]
        self.radio_keys_builtin = Radiobutton(
                frames[0], variable=self.are_keys_builtin, value=1,
                command=self.set_keys_type, text='Use a Built-in Key Set')
        self.radio_keys_custom = Radiobutton(
                frames[0], variable=self.are_keys_builtin,  value=0,
                command=self.set_keys_type, text='Use a Custom Key Set')
        self.opt_menu_keys_builtin = DynOptionMenu(
                frames[0], self.builtin_keys, None, command=None)
        self.opt_menu_keys_custom = DynOptionMenu(
                frames[0], self.custom_keys, None, command=None)
        self.button_delete_custom_keys = Button(
                frames[1], text='Delete Custom Key Set',
                command=self.delete_custom_keys)
        button_save_custom_keys = Button(
                frames[1], text='Save as New Custom Key Set',
                command=self.save_as_new_key_set)
        self.new_custom_keys = Label(frames[0], bd=2)
        frame_custom.pack(side=BOTTOM, padx=5, pady=5, expand=TRUE, fill=BOTH)
        frame_key_sets.pack(side=BOTTOM, padx=5, pady=5, fill=BOTH)
        self.button_new_keys.pack(side=BOTTOM, fill=X, padx=5, pady=5)
        frame_target.pack(side=LEFT, padx=5, pady=5, expand=TRUE, fill=BOTH)
        frame_target.columnconfigure(0, weight=1)
        frame_target.rowconfigure(1, weight=1)
        target_title.grid(row=0, column=0, columnspan=2, sticky=W)
        self.list_bindings.grid(row=1, column=0, sticky=NSEW)
        scroll_target_y.grid(row=1, column=1, sticky=NS)
        scroll_target_x.grid(row=2, column=0, sticky=EW)
        self.radio_keys_builtin.grid(row=0, column=0, sticky=W+NS)
        self.radio_keys_custom.grid(row=1, column=0, sticky=W+NS)
        self.opt_menu_keys_builtin.grid(row=0, column=1, sticky=NSEW)
        self.opt_menu_keys_custom.grid(row=1, column=1, sticky=NSEW)
        self.new_custom_keys.grid(row=0, column=2, sticky=NSEW, padx=5, pady=5)
        self.button_delete_custom_keys.pack(side=LEFT, fill=X, expand=True, padx=2)
        button_save_custom_keys.pack(side=LEFT, fill=X, expand=True, padx=2)
        frames[0].pack(side=TOP, fill=BOTH, expand=True)
        frames[1].pack(side=TOP, fill=X, expand=True, pady=2)
        return frame
def create_page_keys ( self ) : parent = self . parent self . builtin_keys = StringVar ( parent ) self . custom_keys = StringVar ( parent ) self . are_keys_builtin = BooleanVar ( parent ) self . keybinding = StringVar ( parent ) frame = self . tab_pages . pages [ 'Keys' ] . frame frame_custom = LabelFrame ( frame , borderwidth = 2 , relief = GROOVE , text = ' Custom Key Bindings ' ) frame_key_sets = LabelFrame ( frame , borderwidth = 2 , relief = GROOVE , text = ' Key Set ' ) frame_target = Frame ( frame_custom ) target_title = Label ( frame_target , text = 'Action - Key(s)' ) scroll_target_y = Scrollbar ( frame_target ) scroll_target_x = Scrollbar ( frame_target , orient = HORIZONTAL ) self . list_bindings = Listbox ( frame_target , takefocus = FALSE , exportselection = FALSE ) self . list_bindings . bind ( '<ButtonRelease-1>' , self . keybinding_selected ) scroll_target_y . config ( command = self . list_bindings . yview ) scroll_target_x . config ( command = self . list_bindings . xview ) self . list_bindings . config ( yscrollcommand = scroll_target_y . set ) self . list_bindings . config ( xscrollcommand = scroll_target_x . set ) self . button_new_keys = Button ( frame_custom , text = 'Get New Keys for Selection' , command = self . get_new_keys , state = DISABLED ) frames = [ Frame ( frame_key_sets , padx = 2 , pady = 2 , borderwidth = 0 ) for i in range ( 2 ) ] self . radio_keys_builtin = Radiobutton ( frames [ 0 ] , variable = self . are_keys_builtin , value = 1 , command = self . set_keys_type , text = 'Use a Built-in Key Set' ) self . radio_keys_custom = Radiobutton ( frames [ 0 ] , variable = self . are_keys_builtin , value = 0 , command = self . set_keys_type , text = 'Use a Custom Key Set' ) self . opt_menu_keys_builtin = DynOptionMenu ( frames [ 0 ] , self . builtin_keys , None , command = None ) self . opt_menu_keys_custom = DynOptionMenu ( frames [ 0 ] , self . custom_keys , None , command = None ) self . button_delete_custom_keys = Button ( frames [ 1 ] , text = 'Delete Custom Key Set' , command = self . delete_custom_keys ) button_save_custom_keys = Button ( frames [ 1 ] , text = 'Save as New Custom Key Set' , command = self . save_as_new_key_set ) self . new_custom_keys = Label ( frames [ 0 ] , bd = 2 ) frame_custom . pack ( side = BOTTOM , padx = 5 , pady = 5 , expand = TRUE , fill = BOTH ) frame_key_sets . pack ( side = BOTTOM , padx = 5 , pady = 5 , fill = BOTH ) self . button_new_keys . pack ( side = BOTTOM , fill = X , padx = 5 , pady = 5 ) frame_target . pack ( side = LEFT , padx = 5 , pady = 5 , expand = TRUE , fill = BOTH ) frame_target . columnconfigure ( 0 , weight = 1 ) frame_target . rowconfigure ( 1 , weight = 1 ) target_title . grid ( row = 0 , column = 0 , columnspan = 2 , sticky = W ) self . list_bindings . grid ( row = 1 , column = 0 , sticky = NSEW ) scroll_target_y . grid ( row = 1 , column = 1 , sticky = NS ) scroll_target_x . grid ( row = 2 , column = 0 , sticky = EW ) self . radio_keys_builtin . grid ( row = 0 , column = 0 , sticky = W + NS ) self . radio_keys_custom . grid ( row = 1 , column = 0 , sticky = W + NS ) self . opt_menu_keys_builtin . grid ( row = 0 , column = 1 , sticky = NSEW ) self . opt_menu_keys_custom . grid ( row = 1 , column = 1 , sticky = NSEW ) self . new_custom_keys . grid ( row = 0 , column = 2 , sticky = NSEW , padx = 5 , pady = 5 ) self . button_delete_custom_keys . pack ( side = LEFT , fill = X , expand = True , padx = 2 ) button_save_custom_keys . pack ( side = LEFT , fill = X , expand = True , padx = 2 ) frames [ 0 ] . pack ( side = TOP , fill = BOTH , expand = True ) frames [ 1 ] . pack ( side = TOP , fill = X , expand = True , pady = 2 ) return frame
Return frame of widgets for Keys tab.
Return frame of widgets for Keys tab .
"""Return frame of widgets for Keys tab.

        Configuration attributes:
            builtin_keys: Menu variable for built-in keybindings.
            custom_keys: Menu variable for custom keybindings.
            are_keys_builtin: Selector for built-in or custom keybindings.
            keybinding: Action/key bindings.
        """ ##widget creation #body frame #body section frames #frame_custom #frame_key_sets ##widget packing #body #frame_custom #frame target #frame_key_sets
self