Returns ``True`` if the button belongs to an inline keyboard.
495131
def _is_inline(button):
        
        return isinstance(button, (
            types.KeyboardButtonCallback,
            types.KeyboardButtonSwitchInline,
            types.KeyboardButtonUrl
        ))
244490
function checkKeyframesSelector(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (l = checkIdent(i)) {
    // Valid selectors are only `from` and `to`.
    const selector = joinValues2(i, l);
    if (selector !== 'from' && selector !== 'to') return 0;

    i += l;
    tokens[start].keyframesSelectorType = 1;
  } else if (l = checkPercentage(i)) {
    i += l;
    tokens[start].keyframesSelectorType = 2;
  } else if (l = checkInterpolation(i)) {
    i += l;
    tokens[start].keyframesSelectorType = 3;
  } else {
    return 0;
  }

  return i - start;
}
1108090
function (event) {
            // event.cancelBubble = true;
            if (this._subTplModuleCtrl) {
                if (event.isSpecialKey) {
                    this.sendKey(event);
                }
            }
            if (event.keyCode != event.KC_TAB) {
                event.preventDefault(); // Removing due to PTR:05164409
            }
            return false;
        }
466631
private boolean shouldNeutralButtonBeShown() {
        SharedPreferences sharedPreferences =
                PreferenceManager.getDefaultSharedPreferences(getActivity());
        String key = getString(R.string.show_neutral_button_preference_key);
        boolean defaultValue =
                getResources().getBoolean(R.bool.show_neutral_button_preference_default_value);
        return sharedPreferences.getBoolean(key, defaultValue);
    }
612443
def allow(self):
        """"""
        with self.selenium.context(self.selenium.CONTEXT_CHROME):
            self.find_primary_button().click()
1022071
function Flyout_checkKeyboardFit() {
                    // Special Flyout positioning rules to determine if the Flyout needs to adjust its
                    // position because of the IHM. If the Flyout needs to adjust for the IHM, it will reposition
                    // itself to be pinned to either the top or bottom edge of the visual viewport.
                    // - Too Tall, above top, or below bottom.

                    var keyboardMovedUs = false;
                    var viewportHeight = _Overlay._Overlay._keyboardInfo._visibleDocHeight;
                    var adjustedMarginBoxHeight = this._currentPosition.contentHeight + this._currentPosition.verticalMarginBorderPadding;
                    if (adjustedMarginBoxHeight > viewportHeight) {
                        // The Flyout is now too tall to fit in the viewport, pin to top and adjust height.
                        keyboardMovedUs = true;
                        this._currentPosition.top = _Constants.pinToBottomEdge;
                        this._currentPosition.contentHeight = viewportHeight - this._currentPosition.verticalMarginBorderPadding;
                        this._currentPosition.doesScroll = true;
                    } else if (this._currentPosition.top >= 0 &&
                        this._currentPosition.top + adjustedMarginBoxHeight > _Overlay._Overlay._keyboardInfo._visibleDocBottom) {
                        // Flyout clips the bottom of the viewport. Pin to bottom.
                        this._currentPosition.top = _Constants.pinToBottomEdge;
                        keyboardMovedUs = true;
                    } else if (this._currentPosition.top === _Constants.pinToBottomEdge) {
                        // We were already pinned to the bottom, so our position on screen will change
                        keyboardMovedUs = true;
                    }

                    // Signals use of basic fadein animation
                    this._keyboardMovedUs = keyboardMovedUs;
                }
1204703
def _keyboard_access(self, element):
        
        # pylint: disable=no-self-use

        if not element.has_attribute('tabindex'):
            tag = element.get_tag_name()
            if (tag == 'A') and (not element.has_attribute('href')):
                element.set_attribute('tabindex', '0')
            elif (
                (tag != 'A')
                and (tag != 'INPUT')
                and (tag != 'BUTTON')
                and (tag != 'SELECT')
                and (tag != 'TEXTAREA')
            ):
                element.set_attribute('tabindex', '0')
47935
public static boolean isKeyUsed(final Jedis jedis, final String key) {
        return !NONE.equalsIgnoreCase(jedis.type(key));
    }
741632
function(kb) {
			if (!kb) { return false; }
			if (this.keyCode !== kb.keyCode) { return false; }
			if (this.mod1 !== kb.mod1) { return false; }
			if (this.mod2 !== kb.mod2) { return false; }
			if (this.mod3 !== kb.mod3) { return false; }
			if (this.mod4 !== kb.mod4) { return false; }
			if (this.type !== kb.type) { return false; }
			return true;
		}
1030916
def bind_hotkey
      alert "bind_hotkey was called in button"
      if @form.nil? 
        if @underline
          bind(:FORM_ATTACHED){ bind_hotkey }
        end
        return
      end
      _value = @text || getvalue # hack for Togglebutton FIXME
      $log.debug " bind hot #{_value} #{@underline}"
      ch = _value[@underline,1].downcase()[0].ord ##  1.9  2009-10-05 18:55  TOTEST
      @mnemonic = _value[@underline,1]
      # meta key 
      mch = ?\M-a.getbyte(0) + (ch - ?a.getbyte(0))
      @form.bind_key(mch, "hotkey for button #{self.text}" ) { |_form, _butt| self.fire }
    end
402137
public boolean isToggleButtonChecked(int index)
	{
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "isToggleButtonChecked("+index+")");
		}
		
		return checker.isButtonChecked(ToggleButton.class, index);
	}
877148
def buttons_pressed(self):
        
        for b in self._buffer_cache:
            fcntl.ioctl(self._button_file(b), self.EVIOCGKEY, self._buffer_cache[b])

        pressed = []
        for k, v in self._buttons.items():
            buf = self._buffer_cache[v['name']]
            bit = v['value']

            if bool(buf[int(bit / 8)] & 1 << bit % 8):
                pressed.append(k)

        return pressed
219383
def _is_shortcut(self, event):
        
        modifier = (QtCore.Qt.MetaModifier if sys.platform == 'darwin' else
                    QtCore.Qt.ControlModifier)
        valid_modifier = int(event.modifiers() & modifier) == modifier
        valid_key = event.key() == self._trigger_key
        return valid_key and valid_modifier
837829
def isChar(ev):
    
    text = ev.text()
    if len(text) != 1:
        return False

    if ev.modifiers() not in (Qt.ShiftModifier, Qt.KeypadModifier, Qt.NoModifier):
        return False

    asciiCode = ord(text)
    if asciiCode <= 31 or asciiCode == 0x7f:  # control characters
        return False

    if text == ' ' and ev.modifiers() == Qt.ShiftModifier:
        return False  # Shift+Space is a shortcut, not a text

    return True
123315
private boolean onSuggestionsKey(View v, int keyCode, KeyEvent event) {
        // guard against possible race conditions (late arrival after dismiss)
        if (mSearchable == null) {
            return false;
        }
        if (mSuggestionsAdapter == null) {
            return false;
        }
        if (event.getAction() == KeyEvent.ACTION_DOWN && KeyEventCompat.hasNoModifiers(event)) {
            // First, check for enter or search (both of which we'll treat as a
            // "click")
            if (keyCode == KeyEvent.KEYCODE_ENTER || keyCode == KeyEvent.KEYCODE_SEARCH
                    || keyCode == KeyEvent.KEYCODE_TAB) {
                int position = mQueryTextView.getListSelection();
                return onItemClicked(position, KeyEvent.KEYCODE_UNKNOWN, null);
            }

            // Next, check for left/right moves, which we use to "return" the
            // user to the edit view
            if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
                // give "focus" to text editor, with cursor at the beginning if
                // left key, at end if right key
                // TODO: Reverse left/right for right-to-left languages, e.g.
                // Arabic
                int selPoint = (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) ? 0 : mQueryTextView
                        .length();
                mQueryTextView.setSelection(selPoint);
                mQueryTextView.setListSelection(0);
                mQueryTextView.clearListSelection();
                ensureImeVisible(mQueryTextView, true);

                return true;
            }

            // Next, check for an "up and out" move
            if (keyCode == KeyEvent.KEYCODE_DPAD_UP && 0 == mQueryTextView.getListSelection()) {
                // TODO: restoreUserQuery();
                // let ACTV complete the move
                return false;
            }

            // Next, check for an "action key"
            // TODO SearchableInfo.ActionKeyInfo actionKey = mSearchable.findActionKey(keyCode);
            // TODO if ((actionKey != null)
            // TODO         && ((actionKey.getSuggestActionMsg() != null) || (actionKey
            // TODO                 .getSuggestActionMsgColumn() != null))) {
            // TODO     // launch suggestion using action key column
            // TODO     int position = mQueryTextView.getListSelection();
            // TODO     if (position != ListView.INVALID_POSITION) {
            // TODO         Cursor c = mSuggestionsAdapter.getCursor();
            // TODO         if (c.moveToPosition(position)) {
            // TODO             final String actionMsg = getActionKeyMessage(c, actionKey);
            // TODO             if (actionMsg != null && (actionMsg.length() > 0)) {
            // TODO                 return onItemClicked(position, keyCode, actionMsg);
            // TODO             }
            // TODO         }
            // TODO     }
            // TODO }
        }
        return false;
    }
256763
def has_match_at_current_position(self, sub):
        
        return self.text.find(sub, self.cursor_position) == self.cursor_position
1140131
def check_ok_button(self):
        """"""
        login = self.login.text()
        password = self.password.text()
        url = self.url.text()
        if self.layers.count() >= 1 and login and password and url:
            self.ok_button.setEnabled(True)
        else:
            self.ok_button.setEnabled(False)