enter arbitrary mode
977935
def set_mode_apm(self, mode, custom_mode = 0, custom_sub_mode = 0):
        ''''''
        if isinstance(mode, str):
            mode_map = self.mode_mapping()
            if mode_map is None or mode not in mode_map:
                print("Unknown mode '%s'" % mode)
                return
            mode = mode_map[mode]
        # set mode by integer mode number for ArduPilot
        self.mav.set_mode_send(self.target_system,
                               mavlink.MAV_MODE_FLAG_CUSTOM_MODE_ENABLED,
                               mode)
371797
def keypress(self, event):
        """"""
        try:
            self.choice.set(self.shortcuts[event.keysym])
        except KeyError:
            # key not found (probably a bug, since we intend to catch
            # only events from shortcut keys, but ignore it anyway)
            pass
586514
def press_enter(multiple=False, silent=False):
    """"""

    def f():
        try:
            while True:
                if silent:
                    yield input()
                else:
                    sys.stderr.write("<press enter> ")
                    sys.stderr.flush()
                    yield input()
                if not multiple:
                    break
        except (EOFError, KeyboardInterrupt):
            # User Ctrl+D or Ctrl+C'd
            if not silent:
                # Prevents the user's terminal getting clobbered
                sys.stderr.write("\n")
                sys.stderr.flush()
            return

    return f
1011451
function enter(aria) {
        aria = aria || {};
        focusedControl.fire('click', { target: focusedElement, aria: aria });
      }
260163
def set_mode (filename, flags):
    """"""
    try:
        mode = os.lstat(filename).st_mode
    except OSError:
        # ignore
        return
    if not (mode & flags):
        try:
            os.chmod(filename, flags | mode)
        except OSError as msg:
            log_error("could not set mode flags for `%s': %s" % (filename, msg))
1034632
def keyPressEvent(self, ev):
        """"""
        if ev.key() in (Qt.Key_Enter, Qt.Key_Return):
            self._startOrStopEditing()
        elif ev.key() == Qt.Key_Escape:
            self._cancelEditing()
        else:
            Kittens.widgets.ClickableTreeWidget.keyPressEvent(self, ev)
425882
def reset_mode(self):
        """"""
        self.command(0x18, b"\x01", timeout=0.1)
        self.transport.write(Chipset.ACK)
        time.sleep(0.010)
1318641
async def input(dev: Device, input, output):
    """"""
    inputs = await dev.get_inputs()
    if input:
        click.echo("Activating %s" % input)
        try:
            input = next((x for x in inputs if x.title == input))
        except StopIteration:
            click.echo("Unable to find input %s" % input)
            return
        zone = None
        if output:
            zone = await dev.get_zone(output)
            if zone.uri not in input.outputs:
                click.echo("Input %s not valid for zone %s" % (input.title, output))
                return

        await input.activate(zone)
    else:
        click.echo("Inputs:")
        for input in inputs:
            act = False
            if input.active:
                act = True
            click.echo("  * " + click.style(str(input), bold=act))
            for out in input.outputs:
                click.echo("    - %s" % out)
680493
def _on_enter(self, *args):
        """"""
        self.config(foreground=self._hover_color, cursor=self._cursor)
380320
def _enter_handler(self, event):
        """"""
        iid = self.current_iid
        if iid is None or iid == self.active:
            return
        self.update_state(iid, "hover")
515266
def setCurrentMode(self, mode):
        
        if type(mode) == int:
            mode = self.LoggingMap.get(mode, ('standard', ''))[0]
            
        if mode == self._currentMode:
            return
            
        self._currentMode = mode
        color = self.color(mode)
        if not color.isValid():
            return
            
        format = QtGui.QTextCharFormat()
        format.setForeground(color)
        self.setCurrentCharFormat(format)
1258366
def mode(dev, target):
    
    click.echo("Current mode: %s" % dev.mode_readable)
    if target:
        click.echo("Setting mode: %s" % target)
        dev.mode = target
438644
def _set_mode(self):
        
        if self.mode is not None:
            logger.debug("changing permission bits of %s to %s", self.path, oct(self.mode))
            os.chmod(self.path, self.mode)
996447
def Enter(cls):
        '''     
        '''
        
        element = cls._element()        
        action = ActionChains(Web.driver)
        action.send_keys_to_element(element, Keys.ENTER)
        action.perform()
200685
def cmd_mode(self, args):
        ''''''
        mode_mapping = self.master.mode_mapping()
        if mode_mapping is None:
            print('No mode mapping available')
            return
        if len(args) != 1:
            print('Available modes: ', mode_mapping.keys())
            return
        if args[0].isdigit():
            modenum = int(args[0])
        else:
            mode = args[0].upper()
            if mode not in mode_mapping:
                print('Unknown mode %s: ' % mode)
                return
            modenum = mode_mapping[mode]
        self.master.set_mode(modenum)
75503
def setPadMode(self, mode):
		""""""
		_baseDes.setPadMode(self, mode)
		for key in (self.__key1, self.__key2, self.__key3):
			key.setPadMode(mode)
1278296
def mode(name, num, minimum=0, maximum=0, ref=None):
    '''
    
    '''
    return calc(
        name=name,
        num=num,
        oper='mode',
        minimum=minimum,
        maximum=maximum,
        ref=ref
    )