<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BETextInput/shiftKeyStateChanged(fromState:toState:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(pl)BETextInput(im)shiftKeyStateChangedFromState:toState:"
  },
  "title" : "shiftKeyStateChanged(fromState:toState:)"
}
-->

# shiftKeyStateChanged(fromState:toState:)

Indicates a transition in the state of the Shift key.

```
func shiftKeyStateChanged(fromState oldState: BEKeyModifierFlags, toState newState: BEKeyModifierFlags)
```

## Parameters

`oldState`

The previous state of the Shift key.

`newState`

The new state of the Shift key.

## Discussion

The system invokes this method when a person presses or releases the Shift key, or toggles the Caps Lock key.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)