Check if modifiers pressed are only shifts
359887
def _only_shifts(self, modifiers):
        """"""
        if not modifiers or len(modifiers) > 2:
            return False
        if len(modifiers) == 2:
            return 'left shift' in modifiers and 'right shift' in modifiers
        if len(modifiers) == 1:
            return 'left shift' in modifiers or 'right shift' in modifiers
713856
function boolMatch(s, matchers) {
    var i, matcher, down = s.toLowerCase();
    matchers = [].concat(matchers);
    for (i = 0; i < matchers.length; i += 1) {
      matcher = matchers[i];
      if (!matcher) continue;
      if (matcher.test && matcher.test(s)) return true;
      if (matcher.toLowerCase() === down) return true;
    }
  }
279763
public void keyPress(String key, List<ModifierPressed> modifiers) {
    systemInputManager.keyPress(key, modifiers);
  }
1331517
def _maybe_apply_time_shift(da, time_offset=None, **DataAttrs):
        """"""
        if time_offset is not None:
            time = times.apply_time_offset(da[TIME_STR], **time_offset)
            da[TIME_STR] = time
        return da
1075884
protected void shiftDown(int shift) {

        int max = getMaximumVerticalScrollPosition();
        if ((m_currentValue + shift) < max) {
            setVerticalScrollPosition(m_currentValue + shift);
        } else {
            setVerticalScrollPosition(max);
        }
    }
1018609
def is_pressed(self, button):
        """"""
        if button not in set((SELECT, RIGHT, DOWN, UP, LEFT)):
            raise ValueError('Unknown button, must be SELECT, RIGHT, DOWN, UP, or LEFT.')
        return self._mcp.input(button) == GPIO.LOW
725251
def match_shifts_by=(match_shifts_by)
      validator = EnumAttributeValidator.new('String', ["START_AT", "END_AT", "INTERSECTION"])
      unless validator.valid?(match_shifts_by)
        fail ArgumentError, "invalid value for 'match_shifts_by', must be one of #{validator.allowable_values}."
      end
      @match_shifts_by = match_shifts_by
    end
111679
private static void checkModifiers(final int type, final int modifiers) {
        for (int modifier = ABSTRACT; modifier <= STRICTFP; modifier++) {
            if (Modifier.isPrivate(modifiers) && !MODIFIERS_MATRIX[PRIVATE][type]) {
                throwIllegalArgument(type, PRIVATE);
            }
            if (Modifier.isProtected(modifiers) && !MODIFIERS_MATRIX[PROTECTED][type]) {
                throwIllegalArgument(type, PROTECTED);
            }
            if (Modifier.isPublic(modifiers) && !MODIFIERS_MATRIX[PUBLIC][type]) {
                throwIllegalArgument(type, PUBLIC);
            }
            if (Modifier.isStatic(modifiers) && !MODIFIERS_MATRIX[STATIC][type]) {
                throwIllegalArgument(type, STATIC);
            }
            if (Modifier.isAbstract(modifiers) && !MODIFIERS_MATRIX[ABSTRACT][type]) {
                throwIllegalArgument(type, ABSTRACT);
            }
            if (Modifier.isFinal(modifiers) && !MODIFIERS_MATRIX[FINAL][type]) {
                throwIllegalArgument(type, FINAL);
            }
            if (Modifier.isNative(modifiers) && !MODIFIERS_MATRIX[NATIVE][type]) {
                throwIllegalArgument(type, NATIVE);
            }
            if (Modifier.isSynchronized(modifiers) && !MODIFIERS_MATRIX[SYNCHRONIZED][type]) {
                throwIllegalArgument(type, SYNCHRONIZED);
            }
            if (Modifier.isTransient(modifiers) && !MODIFIERS_MATRIX[TRANSIENT][type]) {
                throwIllegalArgument(type, TRANSIENT);
            }
            if (Modifier.isVolatile(modifiers) && !MODIFIERS_MATRIX[VOLATILE][type]) {
                throwIllegalArgument(type, VOLATILE);
            }
            if (Modifier.isStrict(modifiers) && !MODIFIERS_MATRIX[STRICTFP][type]) {
                throwIllegalArgument(type, STRICTFP);
            }
        }
    }
362567
def _on_key_press(self, widget, event):
        
        self.currently_pressed_keys.add(event.keyval)
        if event.keyval in [Gdk.KEY_Tab, Gdk.KEY_ISO_Left_Tab] and event.state & Gdk.ModifierType.CONTROL_MASK:
            self.toggle_sidebars()
198220
def on_key_press(self, symbol, modifiers):
        
        magnitude = 10
        if symbol == pyglet.window.key.W:
            self.toggle_wireframe()
        elif symbol == pyglet.window.key.Z:
            self.reset_view()
        elif symbol == pyglet.window.key.C:
            self.toggle_culling()
        elif symbol == pyglet.window.key.A:
            self.toggle_axis()
        elif symbol == pyglet.window.key.Q:
            self.on_close()
        elif symbol == pyglet.window.key.M:
            self.maximize()
        elif symbol == pyglet.window.key.F:
            self.toggle_fullscreen()

        if symbol in [
            pyglet.window.key.LEFT,
            pyglet.window.key.RIGHT,
            pyglet.window.key.DOWN,
            pyglet.window.key.UP,
        ]:
            self.view['ball'].down([0, 0])
            if symbol == pyglet.window.key.LEFT:
                self.view['ball'].drag([-magnitude, 0])
            elif symbol == pyglet.window.key.RIGHT:
                self.view['ball'].drag([magnitude, 0])
            elif symbol == pyglet.window.key.DOWN:
                self.view['ball'].drag([0, -magnitude])
            elif symbol == pyglet.window.key.UP:
                self.view['ball'].drag([0, magnitude])
            self.scene.camera.transform = self.view['ball'].pose
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;
		}
203363
function(matchRules, text, change) {
  const { startOffset, endOffset, focusText } = change.state;
  const focusedText = focusText.text;
  change.moveOffsetsTo(0);
  let length = 0;
  for (let i = 0, k = matchRules.length; i < k; i++) {
    const result = matchRules[i].exec(focusedText);
    if (result) {
      length = result[0].length;
      change.deleteForward(length);
      break;
    }
  }
  const startPos = Math.max(startOffset + text.length - length, 0);
  const endPos = Math.max(endOffset + text.length - length, 0);
  change.insertText(text).moveOffsetsTo(startPos, endPos).focus();

  return change;
}
3217
function isPlatformModifierKeyOnly(event) {
  return !event.altKey &&
    (olHas.MAC ? event.metaKey : event.ctrlKey) &&
    !event.shiftKey;
}
492905
def tabModificationStateChanged(self, tab):
		'''
		
		'''
		if tab == self.currentTab:
			changed = tab.editBox.document().isModified()
			if self.autoSaveActive(tab):
				changed = False
			self.actionSave.setEnabled(changed)
			self.setWindowModified(changed)
691753
function (modifierName, out) {
                var modifier = __modifiers[modifierName];
                if (modifier && modifier.init) {
                    modifier.init(out);
                }
            }
767839
public boolean checkModifier(int modifierBits) {
        // Add in the "pseudo-" modifier bit PACKAGE, if needed
        long fmod = ((modifierBits & ACCESS_BITS) == 0) ?
                        modifierBits | PACKAGE :
                        modifierBits;
        return ((oneOf == 0) || ((oneOf & fmod) != 0)) &&
                ((must & fmod) == must) &&
                ((cannot & fmod) == 0);
    }
1047186
boolean setModifies(Set<String> modifies) {
    lazyInitInfo();

    if (info.modifies != null) {
      return false;
    }

    info.modifies = ImmutableSet.copyOf(modifies);
    return true;
  }