Set up some handy extra keys:
@param settings Minecraft's original GameSettings object
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);
    }
757959
public function setSettings($settings = [])
    {
        $original = $this->settings;
        $this->mergeSettings($settings, $this->settings);
        if ($this->settings != $original) {
            // @todo - Log Curl equivalent during test mode (adds overhead and risk so only do it during test)
            // if (!isset($this->settings['handler']) && class_exists(
            //         '\Namshi\Cuzzle\Middleware\CurlFormatterMiddleware'
            //     )) {
            //     $this->logger      = new Logger('guzzle.to.curl'); //initialize the logger
            //     $this->testHandler = new TestHandler(); //test logger handler
            //     $this->logger->pushHandler($this->testHandler);
            //
            //     $this->handler = HandlerStack::create();
            //     $this->handler->after('cookies', new \Namshi\Cuzzle\Middleware\CurlFormatterMiddleware($this->logger));
            //     $this->settings['handler'] = $this->handler;
            // }
            $this->client = new Client($this->settings);
        }
    }
816500
function migrateEnsureHotKeys(settings: Settings): Settings {
  settings.hotKeyRegistry = {
    ...hotkeys.newDefaultRegistry(),
    ...settings.hotKeyRegistry,
  };
  return settings;
}
1191740
def put_settings(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.put_settings(index=self._name, **kwargs)
686636
private void loadSettings(HieroSettings settings) {
		paddingTop = settings.getPaddingTop();
		paddingLeft = settings.getPaddingLeft();
		paddingBottom = settings.getPaddingBottom();
		paddingRight = settings.getPaddingRight();
		paddingAdvanceX = settings.getPaddingAdvanceX();
		paddingAdvanceY = settings.getPaddingAdvanceY();
		glyphPageWidth = settings.getGlyphPageWidth();
		glyphPageHeight = settings.getGlyphPageHeight();
		effects.addAll(settings.getEffects());
	}
1273655
def init_match_settings(self):
        
        self.mode_type_combobox.addItems(game_mode_types)
        self.map_type_combobox.addItems(map_types)
509906
public void setKeys(java.util.Collection<String> keys) {
        if (keys == null) {
            this.keys = null;
            return;
        }

        this.keys = new java.util.ArrayList<String>(keys);
    }
808251
@Override
    public void initialize(Settings settings) {
        this.settings = settings;
        final String key = getAnalyzerEnabledSettingKey();
        try {
            this.setEnabled(settings.getBoolean(key, true));
        } catch (InvalidSettingException ex) {
            final String msg = String.format("Invalid setting for property '%s'", key);
            LOGGER.warn(msg);
            LOGGER.debug(msg, ex);
        }
    }
1367961
def settings(*keys)
        return @settings.dup if keys.empty?
        entries = @settings.reject {|k, v| !keys.include?(k)}
        keys.size == 1 ? entries.values.first : entries
      end
557312
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, OBJECT_ID_KEY);
        keyArea.addKeyField(SYSTEM_ID, Constants.ASCENDING);
        keyArea.addKeyField(OBJECT_ID, Constants.ASCENDING);
    }
410475
def set_settings(self, releases=None, default_release=None):
        """"""
        super(ReplicaSets, self).set_settings(releases, default_release)
        Servers().set_settings(releases, default_release)
870077
private void applySettings() {
		buttonContainer.reset();
		WButton exampleButton = new WButton(tfButtonLabel.getText());

		exampleButton.setRenderAsLink(cbRenderAsLink.isSelected());

		exampleButton.setText(tfButtonLabel.getText());

		if (cbSetImage.isSelected()) {
			exampleButton.setImage("/image/pencil.png");
			exampleButton.setImagePosition((ImagePosition) ddImagePosition.getSelected());
		}

		exampleButton.setDisabled(cbDisabled.isSelected());

		if (tfAccesskey.getText() != null && tfAccesskey.getText().length() > 0) {
			exampleButton.setAccessKey(tfAccesskey.getText().toCharArray()[0]);
		}

		buttonContainer.add(exampleButton);
	}
310417
def _set_setting(self, settings):
        """"""
        for key, value in settings.items():
            _validate_setting(key, value)

        try:
            self._settings_request(method="patch", json_data=settings)

            self.update(settings_json=settings)
        except SkybellException as exc:
            _LOGGER.warning("Exception changing settings: %s", settings)
            _LOGGER.warning(exc)
952109
@SuppressWarnings("unchecked")
    public void setSettings(Object presets) {

        if (presets == null) {
            m_settingPresets = null;
        } else if (!(presets instanceof Map)) {
            throw new IllegalArgumentException(
                "cms:container -- value of 'settings' attribute  should be a map, but is "
                    + ClassUtils.getCanonicalName(presets));
        } else {
            m_settingPresets = new HashMap<>((Map<String, String>)presets);
        }
    }
831407
def saveSettings( self, settings ):
        
        dataSet = self.dataSet()
        if ( not dataSet ):
            return False
        
        projexui.saveDataSet( settings, 
                              self.uniqueName(),
                              dataSet )
        
        return True
1357317
function(settings) {
        for (var k in settings) {
            if (settings.hasOwnProperty(k)) {
                this.param(k, settings[k]);
            }
        }
        return this;
    }
1029240
private function setSettings($settings)
    {
        if ($settings) {
            foreach ($this->settings as $key => &$value) {
                if (!empty($settings->{$key}) && $settings->{$key}) {
                    $value = $settings->{$key};
                }
            }
        }
    }