List available shortcuts
171352
def do_shortcuts(self, _: argparse.Namespace) -> None:
        """"""
        result = "\n".join('%s: %s' % (sc[0], sc[1]) for sc in sorted(self.shortcuts))
        self.poutput("Shortcuts for other commands:\n{}\n".format(result))
526519
def buffer_list(editor):
    
    def handler():
        wa = editor.window_arrangement
        for info in wa.list_open_buffers():
            char = '%' if info.is_active else ''
            eb = info.editor_buffer
            print(' %3i %-2s %-20s  line %i' % (
                  info.index, char, eb.location, (eb.buffer.document.cursor_position_row + 1)))
        six.moves.input('\nPress ENTER to continue...')
    run_in_terminal(handler)
324975
def usage():
    """"""

    global options
    l = len(options['long'])
    options['shortlist'] = [s for s in options['short'] if s is not ":"]

    print("python -m behave2cucumber [-h] [-d level|--debug=level]")
    for i in range(l):
        print("    -{0}|--{1:20} {2}".format(options['shortlist'][i], options['long'][i], options['descriptions'][i]))
518476
def _get_shortcut_string(shortcut):
    """"""
    if shortcut is None:
        return ''
    if isinstance(shortcut, (tuple, list)):
        return ', '.join([_get_shortcut_string(s) for s in shortcut])
    if isinstance(shortcut, string_types):
        if hasattr(QKeySequence, shortcut):
            shortcut = QKeySequence(getattr(QKeySequence, shortcut))
        else:
            return shortcut.lower()
    assert isinstance(shortcut, QKeySequence)
    s = shortcut.toString() or ''
    return str(s).lower()
774831
def get_toolbar_buttons(self):
        """"""
        buttons = []

        # Code to add the stop button
        if self.stop_button is None:
            self.stop_button = create_toolbutton(
                                   self,
                                   text=_("Stop"),
                                   icon=self.stop_icon,
                                   tip=_("Stop the current command"))
            self.disable_stop_button()
            # set click event handler
            self.stop_button.clicked.connect(self.stop_button_click_handler)
            if is_dark_interface():
                self.stop_button.setStyleSheet("QToolButton{padding: 3px;}")
        if self.stop_button is not None:
            buttons.append(self.stop_button)

        # Reset namespace button
        if self.reset_button is None:
            self.reset_button = create_toolbutton(
                                    self,
                                    text=_("Remove"),
                                    icon=ima.icon('editdelete'),
                                    tip=_("Remove all variables"),
                                    triggered=self.reset_namespace)
            if is_dark_interface():
                self.reset_button.setStyleSheet("QToolButton{padding: 3px;}")
        if self.reset_button is not None:
            buttons.append(self.reset_button)

        if self.options_button is None:
            options = self.get_options_menu()
            if options:
                self.options_button = create_toolbutton(self,
                        text=_('Options'), icon=ima.icon('tooloptions'))
                self.options_button.setPopupMode(QToolButton.InstantPopup)
                menu = QMenu(self)
                add_actions(menu, options)
                self.options_button.setMenu(menu)
        if self.options_button is not None:
            buttons.append(self.options_button)

        return buttons
1128380
function getShortcuts(platform) {
  // if it is mac platform
  if (platform && platform.indexOf('mac') !== -1) {
    return [{ name: 'Toggle Search Box', keys: ['⌘ ⇧ P', '⌃ ⇧ P'] }, { name: 'Toggle Action Logger position', keys: ['⌘ ⇧ J', '⌃ ⇧ J'] }, { name: 'Toggle Fullscreen Mode', keys: ['⌘ ⇧ F', '⌃ ⇧ F'] }, { name: 'Toggle Left Panel', keys: ['⌘ ⇧ L', '⌃ ⇧ L'] }, { name: 'Toggle Down Panel', keys: ['⌘ ⇧ D', '⌃ ⇧ D'] }, { name: 'Next Story', keys: ['⌘ ⇧ →', '⌃ ⇧ →'] }, { name: 'Previous Story', keys: ['⌘ ⇧ ←', '⌃ ⇧ ←'] }];
  }

  return [{ name: 'Toggle Search Box', keys: ['Ctrl + Shift + P'] }, { name: 'Toggle Action Logger position', keys: ['Ctrl + Shift + J'] }, { name: 'Toggle Fullscreen Mode', keys: ['Ctrl + Shift + F'] }, { name: 'Toggle Left Panel', keys: ['Ctrl + Shift + L'] }, { name: 'Toggle Down Panel', keys: ['Ctrl + Shift + D'] }, { name: 'Next Story', keys: ['Ctrl + Shift + →'] }, { name: 'Previous Story', keys: ['Ctrl + Shift + ←'] }];
}
772331
def list():
        """"""
        handle = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
        tzkey = winreg.OpenKey(handle, TZKEYNAME)
        result = [winreg.EnumKey(tzkey, i)
                  for i in range(winreg.QueryInfoKey(tzkey)[0])]
        tzkey.Close()
        handle.Close()
        return result
863527
def list_tools(self):
        
        tools = []
        exists, sections = self.sections()
        if exists:
            for section in sections:
                options = {'section': section,
                           'built': None,
                           'version': None,
                           'repo': None,
                           'branch': None,
                           'name': None,
                           'groups': None,
                           'image_name': None}
                for option in list(options.keys()):
                    exists, value = self.option(section, option)
                    if exists:
                        options[option] = value
                if 'core' not in options['groups'] and 'hidden' not in options['groups']:
                    tools.append(options)
        return tools
240797
def _get_qkeysequence(shortcut):
    """"""
    if shortcut is None:
        return []
    if isinstance(shortcut, (tuple, list)):
        return [_get_qkeysequence(s) for s in shortcut]
    assert isinstance(shortcut, string_types)
    if hasattr(QKeySequence, shortcut):
        return QKeySequence(getattr(QKeySequence, shortcut))
    sequence = QKeySequence.fromString(shortcut)
    assert not sequence.isEmpty()
    return sequence
1186389
def markers():
    ''' 
    '''
    print("Available markers: \n\n - " + "\n - ".join(list(MarkerType)))
    print()
    print("Shortcuts: \n\n" + "\n".join(" %r: %s" % item for item in _MARKER_SHORTCUTS.items()))
105177
function listShortcuts(blocks, filePath) {
    var parser = parsers.getForFile(filePath);

    if (!parser) {
        return Immutable.List();
    }

    return blocks
        .map(function(block) {
            return block.getShortcuts();
        })
        .filter(function(shortcuts) {
            return (
                shortcuts &&
                shortcuts.acceptParser(parser.getName())
            );
        });
}
979880
def listkeys(ctx):
    
    t = PrettyTable(["Available Key"])
    t.align = "l"
    for key in ctx.peerplays.wallet.getPublicKeys():
        t.add_row([key])
    click.echo(t)
1281862
def register_actions(self, shortcut_manager):
        
        shortcut_manager.add_callback_for_action("delete", self.trans_list_ctrl.remove_action_callback)
        shortcut_manager.add_callback_for_action("add", self.trans_list_ctrl.add_action_callback)
1114416
def shortcut_show(self, shortcut_id, **kwargs):
        ""
        api_path = "/api/v2/shortcuts/{shortcut_id}"
        api_path = api_path.format(shortcut_id=shortcut_id)
        return self.call(api_path, **kwargs)
138006
def _optlist(self):
    """"""
    res = ""
    for o in self.options:
        res += o.short
        if o.argName is not None:
          res += ":"
    return res
1344968
def get_menu_actions(self):
        """"""
        items = self.selectedItems()
        actions = self.get_actions_from_items(items)
        if actions:
            actions.append(None)
        actions += self.common_actions
        return actions
1084580
def shortcut_str(self, path, cmd):
        

        s = colored('| path = ', 'cyan') + colored(path, 'yellow') + '\n' \
            + colored('| cmd  = ', 'cyan') + \
            colored(cmd, 'green', attrs=['bold'])

        return s