---
title: "shiftKeyStateChanged(fromState:toState:)"
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: "browserenginekit/betextinput/shiftkeystatechanged(fromstate:tostate:)"
---

# shiftKeyStateChanged(fromState:toState:)

Indicates a transition in the state of the Shift key.

## Declaration

```swift
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.

## Mentioned in

Integrating custom browser text views with UIKit

## Discussion

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