MCPcopy Index your code
hub / github.com/python/cpython / load_keys_list

Method load_keys_list

Lib/idlelib/configdialog.py:1463–1488  ·  view source on GitHub ↗

Reload the list of action/key binding pairs for the active key set. An action/key binding can be selected to change the key binding.

(self, keyset_name)

Source from the content-addressed store, hash-verified

1461 self.set_keys_type()
1462
1463 def load_keys_list(self, keyset_name):
1464 """Reload the list of action/key binding pairs for the active key set.
1465
1466 An action/key binding can be selected to change the key binding.
1467 """
1468 reselect = False
1469 if self.bindingslist.curselection():
1470 reselect = True
1471 list_index = self.bindingslist.index(ANCHOR)
1472 keyset = idleConf.GetKeySet(keyset_name)
1473 # 'set' is dict mapping virtual event to list of key events.
1474 bind_names = list(keyset)
1475 bind_names.sort()
1476 self.bindingslist.delete(0, END)
1477 for bind_name in bind_names:
1478 key = ' '.join(keyset[bind_name])
1479 bind_name = bind_name[2:-2] # Trim double angle brackets.
1480 if keyset_name in changes['keys']:
1481 # Handle any unsaved changes to this key set.
1482 if bind_name in changes['keys'][keyset_name]:
1483 key = changes['keys'][keyset_name][bind_name]
1484 self.bindingslist.insert(END, bind_name+' - '+key)
1485 if reselect:
1486 self.bindingslist.see(list_index)
1487 self.bindingslist.select_set(list_index)
1488 self.bindingslist.select_anchor(list_index)
1489
1490 @staticmethod
1491 def save_new_key_set(keyset_name, keyset):

Callers 4

load_key_cfgMethod · 0.95
test_load_keys_listMethod · 0.80

Calls 9

listClass · 0.85
curselectionMethod · 0.80
GetKeySetMethod · 0.80
indexMethod · 0.45
sortMethod · 0.45
deleteMethod · 0.45
joinMethod · 0.45
insertMethod · 0.45
seeMethod · 0.45

Tested by 1

test_load_keys_listMethod · 0.64