<!--
{
  "availability" : [
    "iOS: 2.0.0 - 3.2.0",
    "iPadOS: 2.0.0 - 3.2.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIKeyboardBoundsUserInfoKey",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@UIKeyboardBoundsUserInfoKey"
  },
  "title" : "UIKeyboardBoundsUserInfoKey"
}
-->

# UIKeyboardBoundsUserInfoKey

A user info key to retrieve the bounds of the keyboard.

```
extern NSString * const UIKeyboardBoundsUserInfoKey;
```

## Discussion

The value for this key is an <doc://com.apple.documentation/documentation/Foundation/NSValue> object containing a <doc://com.apple.documentation/documentation/CoreFoundation/CGRect> that identifies the bounds rectangle of the keyboard in the window coordinate space. This value is sufficient for obtaining the size of the keyboard. If you want to get the origin of the keyboard on the screen (before or after animation), use the values obtained from the user info dictionary through the [`UIKeyboardCenterBeginUserInfoKey`](/documentation/UIKit/UIKeyboardCenterBeginUserInfoKey) or [`UIKeyboardCenterEndUserInfoKey`](/documentation/UIKit/UIKeyboardCenterEndUserInfoKey) constants.

---

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)