---
name: "offKeyboardWillShow"
mode: "kit"
versionRequirements:
  - { name: "BaseKit", version: "3.6.6" }
platform:
  - "iOS"
  - "Android"
async: true
title: "offKeyboardWillShow - 移除监听：键盘弹出"
---

## offKeyboardWillShow

> [VERSION] BaseKit >= 3.6.6

> [PLATFORM] iOS, Android

> ⚡ **支持 Promise 调用** — 不传 success / fail / complete 回调时，该方法返回 Promise。

### 描述

键盘弹出

### 参数

`(listener: Function)`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `listener` | `(params: KeyboardBeanRes) => void` | 是 | - | 事件监听回调函数 |

### 引用对象

##### `interface` KeyboardBeanRes

| 属性 | 类型 | 必填 | 最低版本 | 描述 |
| --- | --- | --- | --- | --- |
| `height` | `number` | 是 | `3.6.1` | 键盘高度 |
| `keyBoardArea` | `KeyBoardArea` | 是 | `3.32.6` | 键盘弹出位置 |

##### `interface` KeyBoardArea

| 属性 | 类型 | 必填 | 最低版本 | 描述 |
| --- | --- | --- | --- | --- |
| `top` | `number` | 是 | `3.32.6` | 键盘弹出顶部位置 |
| `bottom` | `number` | 是 | `3.32.6` | 键盘弹出底部位置 |
| `left` | `number` | 是 | `3.32.6` | 键盘左边位置 |
| `right` | `number` | 是 | `3.32.6` | 键盘右边位置 |


### 示例代码

```tsx
const listener = function (res) { console.log(res) }
ty.onKeyboardWillShow(listener)
ty.offKeyboardWillShow(listener)
```
