Display all configured key bindings.
9650
def list_keys(pymux, variables):
    
    # Create help string.
    result = []

    for k, custom_binding in pymux.key_bindings_manager.custom_bindings.items():
        needs_prefix, key = k

        result.append('bind-key %3s %-10s %s %s' % (
            ('-n' if needs_prefix else ''), key, custom_binding.command,
            ' '.join(map(wrap_argument, custom_binding.arguments))))

    # Display help in pane.
    result = '\n'.join(sorted(result))
    pymux.get_client_state().layout_manager.display_popup('list-keys', result)
530630
def configure_keys(self):
        """"""
        self.active_functions = set()
        self.key2func = {}
        for funcname, key in self.key_map.items():
            self.key2func[key] = getattr(self, funcname)
1157393
def pressed_keys(self):
        """"""
        # make a list of all the keys that are detected
        pressed = []

        # set all pins pins to be inputs w/pullups
        for pin in self.row_pins+self.col_pins:
            pin.direction = Direction.INPUT
            pin.pull = Pull.UP

        for row in range(len(self.row_pins)):
            # set one row low at a time
            self.row_pins[row].direction = Direction.OUTPUT
            self.row_pins[row].value = False
            # check the column pins, which ones are pulled down
            for col in range(len(self.col_pins)):
                if not self.col_pins[col].value:
                    pressed.append(self.keys[row][col])
            # reset the pin to be an input
            self.row_pins[row].direction = Direction.INPUT
            self.row_pins[row].pull = Pull.UP
        return pressed
104777
def load_config(self):
        "

        self.settings.general.triggerOnChangedValue(self.settings.general, 'use-trayicon')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'prompt-on-quit')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'prompt-on-close-tab')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'window-tabbar')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'mouse-display')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'display-n')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'window-ontop')
        if not FullscreenManager(self.settings, self.window).is_fullscreen():
            self.settings.general.triggerOnChangedValue(self.settings.general, 'window-height')
            self.settings.general.triggerOnChangedValue(self.settings.general, 'window-width')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'use-scrollbar')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'history-size')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'infinite-history')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'use-vte-titles')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'set-window-title')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'abbreviate-tab-names')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'max-tab-name-length')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'quick-open-enable')
        self.settings.general.triggerOnChangedValue(
            self.settings.general, 'quick-open-command-line'
        )
        self.settings.style.triggerOnChangedValue(self.settings.style, 'cursor-shape')
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'style')
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'palette')
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'palette-name')
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'allow-bold')
        self.settings.styleBackground.triggerOnChangedValue(
            self.settings.styleBackground, 'transparency'
        )
        self.settings.general.triggerOnChangedValue(self.settings.general, 'use-default-font')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'compat-backspace')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'compat-delete')
1086276
public function renderKeys()
	{
		echo CHtml::openTag('div',array(
			'class'=>'keys',
			'style'=>'display:none',
			'title'=>Yii::app()->getRequest()->getUrl(),
		));
		foreach($this->dataProvider->getKeys() as $key)
			echo "<span>".CHtml::encode($key)."</span>";
		echo "</div>\n";
	}
175623
function addBindings() {
		function clickHandler(e) {
			// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
			// See: http://jacklmoore.com/notes/click-events/
			if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
				e.preventDefault();
				launch(this);
			}
		}

		if ($box) {
			if (!init) {
				init = true;

				// Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
				$next.click(function () {
					publicMethod.next();
				});
				$prev.click(function () {
					publicMethod.prev();
				});
				$close.click(function () {
					publicMethod.close();
				});
				$overlay.click(function () {
					if (settings.overlayClose) {
						publicMethod.close();
					}
				});
				
				// Key Bindings
				$(document).bind('keydown.' + prefix, function (e) {
					var key = e.keyCode;
					if (open && settings.escKey && key === 27) {
						e.preventDefault();
						publicMethod.close();
					}
					if (open && settings.arrowKey && $related[1] && !e.altKey) {
						if (key === 37) {
							e.preventDefault();
							$prev.click();
						} else if (key === 39) {
							e.preventDefault();
							$next.click();
						}
					}
				});

				if ($.isFunction($.fn.on)) {
					// For jQuery 1.7+
					$(document).on('click.'+prefix, '.'+boxElement, clickHandler);
				} else {
					// For jQuery 1.3.x -> 1.6.x
					// This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
					// This is not here for jQuery 1.9, it's here for legacy users.
					$('.'+boxElement).live('click.'+prefix, clickHandler);
				}
			}
			return true;
		}
		return false;
	}
466849
def print_key_bindings *args
          f  = get_current_field
          #labels = [@key_label, f.key_label]
          #labels = [@key_label]
          #labels << f.key_label if f.key_label
          labels = []
          labels << (f.key_label || {}) #if f.key_label
          labels << @key_label
          arr = []
          if get_current_field.help_text 
            arr << get_current_field.help_text 
          end
          labels.each_with_index { |h, i|  
            case i
            when 0
              arr << "  ===  Current widget bindings ==="
            when 1
              arr << "  === Form bindings ==="
            end

            h.each_pair { |name, val| 
              if name.is_a? Integer
                name = keycode_tos name
              elsif name.is_a? String
                name = keycode_tos(name.getbyte(0))
              elsif name.is_a? Array
                s = []
                name.each { |e|
                  s << keycode_tos(e.getbyte(0))
                }
                name = s
              else
                #$log.debug "XXX: KEY #{name} #{name.class} "
              end
              arr << " %-30s %s" % [name ,val]
              $log.debug "KEY: #{name} : #{val} "
            }
          }
          textdialog arr, :title => "Key Bindings"
        end
335398
def tabbar_toggled(self, settings, key, user_data):
        
        if settings.get_boolean(key):
            for n in self.guake.notebook_manager.iter_notebooks():
                n.set_property("show-tabs", True)
        else:
            for n in self.guake.notebook_manager.iter_notebooks():
                n.set_property("show-tabs", False)
233442
def show(config):
    """"""
    with open(config, 'r'):
        main.show(yaml.load(open(config)))
487469
def show_config():
    '''
    
    '''
    ret = {}
    cmd = 'cpan -J'
    out = __salt__['cmd.run'](cmd).splitlines()
    for line in out:
        if '=>' not in line:
            # TODO: Some options take up multiple lines, so this doesn't always work
            continue
        comps = line.split('=>')
        key = comps[0].replace("'", '').strip()
        val = comps[1].replace("',", '').replace("'", '').strip()
        ret[key] = val
    return ret
520197
def cmd_config_show(option, show_keys):
    

    habucfg = loadcfg()

    if not show_keys:
        for key in habucfg.keys():
            if 'KEY' in key:
                habucfg[key] = '*************'

    print(json.dumps(habucfg, indent=4, sort_keys=True, default=str))
868721
private void bindShortcuts(Map<Object, Object> shortcuts) {
        for (Object commandName : shortcuts.keySet()) {
            bindShortcuts(commandName.toString(), shortcuts.get(commandName).toString());
        }
    }
860466
def displayNewKey(key):
    """"""

    if key.keyring:
        gpg.keyring = key.keyring
    if key.secring:
        gpg.secring = key.secring

    # Using '--fingerprint' twice will display subkey fingerprints too:
    gpg.options = ['--fingerprint', '--fingerprint']
    keylist = gpg.list_keys(secret=True)

    # `result` is a `gnupg._parsers.ListKeys`, which is list-like, so iterate
    # over all the keys and display their info:
    for gpgkey in keylist:
        for k, v in gpgkey.items():
            log.info("%s: %s" % (k.capitalize(), v))

    return keylist
960690
def get_settings(all,key):
    """"""
    with Database("settings") as s:
        if all:
            for k, v in zip(list(s.keys()), list(s.values())):
                print("{} = {}".format(k, v))
        elif key:
            print("{} = {}".format(key, s[key]))
        else:
            print("Don't know what you want? Try --all")
1231411
def list_bindings
      # freeing space for paging, now trying out 'v' as selector. 2014-04-14 - 18:57 
      @obj.bind_key($row_selector || 'v'.ord, 'toggle selection') { toggle_row_selection }
      
      # the mode may be set to single after the constructor, so this would have taken effect.
      if @obj.selection_mode == :multiple
      # freeing ctrl_space for back paging, now trying out 'V' as selector. 2014-04-14 - 18:57 
        @obj.bind_key($range_selector || 'V'.ord, 'range select') { range_select }
        @obj.bind_key(?+, 'ask_select') { ask_select } 
        @obj.bind_key(?-, 'ask_unselect') { ask_unselect } 
        @obj.bind_key(?a, 'select_all') {select_all}
        @obj.bind_key(?*, 'invert_selection') { invert_selection }
        @obj.bind_key(?u, 'clear_selection') { clear_selection }
        @obj.bind_key([?g,?n], 'goto next selection'){ goto_next_selection } # mapping double keys like vim
        @obj.bind_key([?g,?p], 'goto prev selection'){ goto_prev_selection } # mapping double keys like vim
      end
      @_header_adjustment ||= 0 #  incase caller does not use
      #@obj._events << :LIST_SELECTION_EVENT unless @obj._events.include? :LIST_SELECTION_EVENT
    end
1296785
def list_bindings
      # what about users wanting 32 and ENTER to also go to next row automatically
      # should make that optional, TODO
      bind_key($row_selector || 32, 'toggle selection') { toggle_row_selection }
      # 2013-03-24 - 14:46 added condition so single select does not get these
      if @selection_mode == :multiple
        bind_key(0, 'range select') { add_to_selection }
        bind_key(?+, :ask_select) # --> calls select_values
        bind_key(?-, :ask_unselect) # please implement FIXME TODO
        bind_key(?a, :select_all)
        bind_key(?*, :invert_selection)
        bind_key(?u, :clear_selection)
      end
      @_header_adjustment ||= 0 #  incase caller does not use
      @_events << :LIST_SELECTION_EVENT unless @_events.include? :LIST_SELECTION_EVENT
    end
1120018
def show_toolbars(self):
        """"""
        value = not self.toolbars_visible
        CONF.set('main', 'toolbars_visible', value)
        if value:
            self.save_visible_toolbars()
        else:
            self.get_visible_toolbars()

        for toolbar in self.visible_toolbars:
            toolbar.toggleViewAction().setChecked(value)
            toolbar.setVisible(value)

        self.toolbars_visible = value
        self._update_show_toolbars_action()