Fill the Registry with the hard coded key bindings.
776614
def _load_builtins(self):
        
        pymux = self.pymux
        kb = KeyBindings()

        # Create filters.
        has_prefix = HasPrefix(pymux)
        waits_for_confirmation = WaitsForConfirmation(pymux)
        prompt_or_command_focus = has_focus(COMMAND) | has_focus(PROMPT)
        display_pane_numbers = Condition(lambda: pymux.display_pane_numbers)
        in_scroll_buffer_not_searching = InScrollBufferNotSearching(pymux)

        @kb.add(Keys.Any, filter=has_prefix)
        def _(event):
            " Ignore unknown Ctrl-B prefixed key sequences. "
            pymux.get_client_state().has_prefix = False

        @kb.add('c-c', filter=prompt_or_command_focus & ~has_prefix)
        @kb.add('c-g', filter=prompt_or_command_focus & ~has_prefix)
#        @kb.add('backspace', filter=has_focus(COMMAND) & ~has_prefix &
#                              Condition(lambda: cli.buffers[COMMAND].text == ''))
        def _(event):
            " Leave command mode. "
            pymux.leave_command_mode(append_to_history=False)

        @kb.add('y', filter=waits_for_confirmation)
        @kb.add('Y', filter=waits_for_confirmation)
        def _(event):
            """
            Confirm command.
            """
            client_state = pymux.get_client_state()

            command = client_state.confirm_command
            client_state.confirm_command = None
            client_state.confirm_text = None

            pymux.handle_command(command)

        @kb.add('n', filter=waits_for_confirmation)
        @kb.add('N', filter=waits_for_confirmation)
        @kb.add('c-c' , filter=waits_for_confirmation)
        def _(event):
            """
            Cancel command.
            """
            client_state = pymux.get_client_state()
            client_state.confirm_command = None
            client_state.confirm_text = None

        @kb.add('c-c', filter=in_scroll_buffer_not_searching)
        @kb.add('enter', filter=in_scroll_buffer_not_searching)
        @kb.add('q', filter=in_scroll_buffer_not_searching)
        def _(event):
            " Exit scroll buffer. "
            pane = pymux.arrangement.get_active_pane()
            pane.exit_scroll_buffer()

        @kb.add(' ', filter=in_scroll_buffer_not_searching)
        def _(event):
            " Enter selection mode when pressing space in copy mode. "
            event.current_buffer.start_selection(selection_type=SelectionType.CHARACTERS)

        @kb.add('enter', filter=in_scroll_buffer_not_searching & has_selection)
        def _(event):
            " Copy selection when pressing Enter. "
            clipboard_data = event.current_buffer.copy_selection()
            event.app.clipboard.set_data(clipboard_data)

        @kb.add('v', filter=in_scroll_buffer_not_searching & has_selection)
        def _(event):
            " Toggle between selection types. "
            types = [SelectionType.LINES, SelectionType.BLOCK, SelectionType.CHARACTERS]
            selection_state = event.current_buffer.selection_state

            try:
                index = types.index(selection_state.type)
            except ValueError:  # Not in list.
                index = 0

            selection_state.type = types[(index + 1) % len(types)]

        @Condition
        def popup_displayed():
            return self.pymux.get_client_state().display_popup

        @kb.add('q', filter=popup_displayed, eager=True)
        def _(event):
            " Quit pop-up dialog. "
            self.pymux.get_client_state().display_popup = False

        @kb.add(Keys.Any, eager=True, filter=display_pane_numbers)
        def _(event):
            " When the pane numbers are shown. Any key press should hide them. "
            pymux.display_pane_numbers = False

        @Condition
        def clock_displayed():
            " "
            pane = pymux.arrangement.get_active_pane()
            return pane.clock_mode

        @kb.add(Keys.Any, eager=True, filter=clock_displayed)
        def _(event):
            " When the clock is displayed. Any key press should hide it. "
            pane = pymux.arrangement.get_active_pane()
            pane.clock_mode = False

        return kb
26279
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, MESSAGE_INFO_ID_KEY);
        keyArea.addKeyField(MESSAGE_INFO_ID, Constants.ASCENDING);
        keyArea.addKeyField(MESSAGE_TYPE_ID, Constants.ASCENDING);
        keyArea.addKeyField(PROCESS_TYPE_ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, DESCRIPTION_KEY);
        keyArea.addKeyField(DESCRIPTION, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, CODE_KEY);
        keyArea.addKeyField(CODE, Constants.ASCENDING);
    }
57458
public function resetRegistry()
    {
        $aRegKeys = \OxidEsales\Eshop\Core\Registry::getKeys();

        $aSkippedClasses = array();

        foreach ($aRegKeys as $sKey) {
            if (!in_array($sKey, $aSkippedClasses)) {
                $oInstance = null;
                if (!isset($this->registryCache[$sKey])) {
                    try {
                        $oNewInstance = oxNew($sKey);
                        $this->registryCache[$sKey] = $oNewInstance;
                    } catch (\OxidEsales\Eshop\Core\Exception\SystemComponentException $oException) {
                        \OxidEsales\Eshop\Core\Registry::set($sKey, null);
                        continue;
                    }
                }
                $oInstance = clone $this->registryCache[$sKey];
                \OxidEsales\Eshop\Core\Registry::set($sKey, $oInstance);
            }
        }
    }
752906
function Registry(opt_options) {
  if (!(this instanceof Registry)) {
    return new Registry(opt_options);
  }
  opt_options = opt_options || {};

  this.breakOnError = opt_options.breakOnError || false;
  this.depth = opt_options.depth || 10;

  // regex to match "$schema.*"
  this._match = /"\$id:[a-z0-9_-]*"/ig;
  // regex to escape strings for usage as regex
  this._escape = /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;

  this.schemas = {};
}
348748
def populate_keys_tree(self):
        
        for group in HOTKEYS:
            parent = self.store.append(None, [None, group['label'], None, None])
            for item in group['keys']:
                if item['key'] == "show-hide" or item['key'] == "show-focus":
                    accel = self.settings.keybindingsGlobal.get_string(item['key'])
                else:
                    accel = self.settings.keybindingsLocal.get_string(item['key'])
                gsettings_path = item['key']
                keycode, mask = Gtk.accelerator_parse(accel)
                keylabel = Gtk.accelerator_get_label(keycode, mask)
                self.store.append(parent, [gsettings_path, item['label'], keylabel, accel])
        self.get_widget('treeview-keys').expand_all()
877583
protected void registerBindingConfigurationEntries(Iterable<BindingConfigurationEntry> bindings) {

        for (BindingConfigurationEntry nextBinding : bindings) {
        	try {
        		registerBindingConfigurationEntry(nextBinding);
        	} catch (IllegalStateException e) {
        		// Ignore this - it can happen when introspecting class mappings
        	}
        }
    }
1147688
private void fixKeyManagers() {
        // If the key manager factory is null, do not continue
        if (null == keyManagerFactory || null == keyManagerFactory.getKeyManagers()) {
            return;
        }
        KeyManager[] defaultKeyManagers = keyManagerFactory.getKeyManagers();
        KeyManager[] newKeyManagers = new KeyManager[defaultKeyManagers.length];

        KeyManager mgr = null;
        for (int i = 0; i < defaultKeyManagers.length; i++) {
            mgr = defaultKeyManagers[i];
            // If we're looking at an X509 Key manager, then wrap it in our
            // alias-selective manager
            if (mgr instanceof X509KeyManager) {
                mgr = new AliasSensitiveX509KeyManager(this, (X509KeyManager) mgr);
            }
            newKeyManagers[i] = mgr;
        }

        keyManagers = newKeyManagers;
    }
897078
private static void bindAllGuiceProperties(ConfigurationPropertyRegistry registry, AtomicReference<Injector> injector)
	{
		for (Field field : GuiceProperties.class.getFields())
		{
			if (Modifier.isStatic(field.getModifiers()) && Modifier.isPublic(field.getModifiers()))
			{
				try
				{
					// We are just assuming these properties have a string type
					final String propertyName = String.valueOf(field.get(null));

					registry.register(GuiceProperties.class, injector, propertyName, String.class, field);
				}
				catch (Exception e)
				{
					throw new IllegalArgumentException("Error trying to process GuiceProperties." + field.getName(), e);
				}
			}
		}
	}
432727
private void setUpExtraKeys(GameSettings settings)
    {
        // Create extra key bindings here and pass them to the KeyManager.
        ArrayList<InternalKey> extraKeys = new ArrayList<InternalKey>();
        // Create a key binding to toggle between player and Malmo control:
        extraKeys.add(new InternalKey("key.toggleMalmo", 28, "key.categories.malmo")	// 28 is the keycode for enter.
        {
            @Override
            public void onPressed()
            {
                InputType it = (inputType != InputType.AI) ? InputType.AI : InputType.HUMAN;
                System.out.println("Toggling control between human and AI - now " + it);
                setInputType(it);
                super.onPressed();
            }
        });

        extraKeys.add(new InternalKey("key.handyTestHook", 22, "key.categories.malmo")
        {
            @Override
            public void onPressed()
            {
                // Use this if you want to test some code with a handy key press
                try
                {
                    CraftingHelper.dumpRecipes("recipe_dump.txt");
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
        });
        this.keyManager = new KeyManager(settings, extraKeys);
    }
1122239
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.SECONDARY_KEY, USER_NAME_KEY);
        keyArea.addKeyField(USER_NAME, Constants.ASCENDING);
    }
1106489
def _GetKeyFromRegistry(self):
    """"""
    if not self._registry:
      return

    try:
      self._registry_key = self._registry.GetKeyByPath(self._key_path)
    except RuntimeError:
      pass

    if not self._registry_key:
      return

    for sub_registry_key in self._registry_key.GetSubkeys():
      self.AddSubkey(sub_registry_key)

    if self._key_path == 'HKEY_LOCAL_MACHINE\\System':
      sub_registry_key = VirtualWinRegistryKey(
          'CurrentControlSet', registry=self._registry)
      self.AddSubkey(sub_registry_key)

    self._registry = None
625814
def OpenKey(key, sub_key):
  """"""
  regopenkeyex = advapi32["RegOpenKeyExW"]
  regopenkeyex.restype = ctypes.c_long
  regopenkeyex.argtypes = [
      ctypes.c_void_p, ctypes.c_wchar_p, ctypes.c_ulong, ctypes.c_ulong,
      ctypes.POINTER(ctypes.c_void_p)
  ]

  new_key = KeyHandle()
  # Don't use KEY_WOW64_64KEY (0x100) since it breaks on Windows 2000
  rc = regopenkeyex(
      key.handle, sub_key, 0, KEY_READ,
      ctypes.cast(
          ctypes.byref(new_key.handle), ctypes.POINTER(ctypes.c_void_p)))
  if rc != ERROR_SUCCESS:
    raise ctypes.WinError(2)

  return new_key
306884
@Override
  public void fillAssignedKeys(Set<String> keys)
  {
    keys.add(_column.getColumn().name());
  }
393656
private void loadKeystore() {
		String keypath = this.getProperty(KEY_PATH_PROPERTY_KEY);
		String keyEntryName = this.getProperty(ENTRY_NAME_PROPERTY_KEY);
		String keyStorePassword = this
				.getProperty(KEYSTORE_PASSWORD_PROPERTY_KEY);

		loadKeystore(keypath, keyStorePassword, keyEntryName);

	}
732295
def _get_matches(self, key_presses):
        
        keys = tuple(k.key for k in key_presses)
        cli = self._cli_ref()

        # Try match, with mode flag
        return [b for b in self._registry.get_bindings_for_keys(keys) if b.filter(cli)]
1146212
def _create_more_application():
    
    from prompt_toolkit.shortcuts import create_prompt_application
    registry = Registry()

    @registry.add_binding(' ')
    @registry.add_binding('y')
    @registry.add_binding('Y')
    @registry.add_binding(Keys.ControlJ)
    @registry.add_binding(Keys.ControlI)  # Tab.
    def _(event):
        event.cli.set_return_value(True)

    @registry.add_binding('n')
    @registry.add_binding('N')
    @registry.add_binding('q')
    @registry.add_binding('Q')
    @registry.add_binding(Keys.ControlC)
    def _(event):
        event.cli.set_return_value(False)

    return create_prompt_application(
        '--MORE--', key_bindings_registry=registry, erase_when_done=True)
745415
def construct(cls, name, *args, **kwargs):
        
        return cls.REGISTRY[name](*args, **kwargs)