Module Keyboard-BsReactNative

type subscription;

Keyboard module to control keyboard events.

Usage

The Keyboard module allows you to listen for native events and react to them, as well as make changes to the keyboard, like dismissing it.

You can read more on Keyboard API usage in official docs: https://facebook.github.io/react-native/docs/keyboard

Types

subscription
type subscription;
event
type event('a) = 'a
  constraint 'a =
    Js.t(
      {
        ..
        endCoordinates: {
          .
          "height": float,
          "screenX": float,
          "screenY": float,
          "width": float,
        },
      } as 'b,
    );
listener
type listener('a) = event('a) => unit
constraint 'a =
  Js.t(
    {
      ..
      endCoordinates: {
        .
        "height": float,
        "screenX": float,
        "screenY": float,
        "width": float,
      },
    } as 'b,
  );
keyboardEvent
type keyboardEvent =
| KeyboardWillShow
| KeyboardDidShow
| KeyboardWillHide
| KeyboardDidHide
| KeyboardWillChangeFrame
| KeyboardDidChangeFrame;

Methods

dismiss
dismiss: unit => unit = "";
addListener
let addListener:
  (
    keyboardEvent,
    listener({
      ..
      "endCoordinates": {
        .
        "height": float,
        "screenX": float,
        "screenY": float,
        "width": float,
      },
    })
  ) =>
  subscription;
removeListener
let removeListener:
  (
    keyboardEvent,
    listener({
      ..
      "endCoordinates": {
        .
        "height": float,
        "screenX": float,
        "screenY": float,
        "width": float,
      },
    })
  ) =>
  unit;
removeAllListeners
let removeAllListeners: keyboardEvent => unit;
type event('a) = 'a constraint 'a = Js.t({.. endCoordinates: Js.t({. height: float, screenX: float, screenY: float, width: float, }), } as b);
type listener('a) = event('a) => unit constraint 'a = Js.t({.. endCoordinates: Js.t({. height: float, screenX: float, screenY: float, width: float, }), } as b);
type keyboardEvent =
| KeyboardWillShow
| KeyboardDidShow
| KeyboardWillHide
| KeyboardDidHide
| KeyboardWillChangeFrame
| KeyboardDidChangeFrame
;
let dismiss: unit => unit;
let addListener: keyboardEvent => listener(Js.t({.. endCoordinates: Js.t({. height: float, screenX: float, screenY: float, width: float, }), })) => subscription;
let removeAllListeners: keyboardEvent => unit;
let removeListener: keyboardEvent => listener(Js.t({.. endCoordinates: Js.t({. height: float, screenX: float, screenY: float, width: float, }), })) => unit;
module Subscription: { ... };