Lib/idlelib/configdialog.py
def create_new_key_set(self, new_key_set_name):
        """Create a new custom key set with the given name.

        Create the new key set based on the previously active set
        with the current changes applied.  Once it is saved, then
        activate the new key set.
        """
        if self.are_keys_builtin.get():
            prev_key_set_name = self.builtin_keys.get()
        else:
            prev_key_set_name = self.custom_keys.get()
        prev_keys = idleConf.GetCoreKeys(prev_key_set_name)
        new_keys = {}
        for event in prev_keys:  # Add key set to changed items.
            event_name = event[2:-2]  # Trim off the angle brackets.
            binding = ' '.join(prev_keys[event])
            new_keys[event_name] = binding
        # Handle any unsaved changes to prev key set.
        if prev_key_set_name in changes['keys']:
            key_set_changes = changes['keys'][prev_key_set_name]
            for event in key_set_changes:
                new_keys[event] = key_set_changes[event]
        # Save the new key set.
        self.save_new_key_set(new_key_set_name, new_keys)
        # Change GUI over to the new key set.
        custom_key_list = idleConf.GetSectionList('user', 'keys')
        custom_key_list.sort()
        self.opt_menu_keys_custom.SetMenu(custom_key_list, new_key_set_name)
        self.are_keys_builtin.set(0)
        self.set_keys_type()
Create a new custom key set with the given name.

        Create the new key set based on the previously active set
        with the current changes applied.  Once it is saved, then
        activate the new key set.
        
Create a new custom key set with the given name.
Create the new key set based on the previously active set
with the current changes applied.  Once it is saved, then
activate the new key set.
Create a new custom key set with the given name . Create the new key set based on the previously active set with the current changes applied . Once it is saved then activate the new key set .
def create_new_key_set(self, new_key_set_name):
        if self.are_keys_builtin.get():
            prev_key_set_name = self.builtin_keys.get()
        else:
            prev_key_set_name = self.custom_keys.get()
        prev_keys = idleConf.GetCoreKeys(prev_key_set_name)
        new_keys = {}
        for event in prev_keys:  
            event_name = event[2:-2]  
            binding = ' '.join(prev_keys[event])
            new_keys[event_name] = binding
        if prev_key_set_name in changes['keys']:
            key_set_changes = changes['keys'][prev_key_set_name]
            for event in key_set_changes:
                new_keys[event] = key_set_changes[event]
        self.save_new_key_set(new_key_set_name, new_keys)
        custom_key_list = idleConf.GetSectionList('user', 'keys')
        custom_key_list.sort()
        self.opt_menu_keys_custom.SetMenu(custom_key_list, new_key_set_name)
        self.are_keys_builtin.set(0)
        self.set_keys_type()
def create_new_key_set ( self , new_key_set_name ) : if self . are_keys_builtin . get ( ) : prev_key_set_name = self . builtin_keys . get ( ) else : prev_key_set_name = self . custom_keys . get ( ) prev_keys = idleConf . GetCoreKeys ( prev_key_set_name ) new_keys = { } for event in prev_keys : event_name = event [ 2 : - 2 ] binding = ' ' . join ( prev_keys [ event ] ) new_keys [ event_name ] = binding if prev_key_set_name in changes [ 'keys' ] : key_set_changes = changes [ 'keys' ] [ prev_key_set_name ] for event in key_set_changes : new_keys [ event ] = key_set_changes [ event ] self . save_new_key_set ( new_key_set_name , new_keys ) custom_key_list = idleConf . GetSectionList ( 'user' , 'keys' ) custom_key_list . sort ( ) self . opt_menu_keys_custom . SetMenu ( custom_key_list , new_key_set_name ) self . are_keys_builtin . set ( 0 ) self . set_keys_type ( )
Create a new custom key set with the given name.
Create a new custom key set with the given name .
"""Create a new custom key set with the given name.

        Create the new key set based on the previously active set
        with the current changes applied.  Once it is saved, then
        activate the new key set.
        """ # Add key set to changed items. # Trim off the angle brackets. # Handle any unsaved changes to prev key set. # Save the new key set. # Change GUI over to the new key set.
self
new_key_set_name