package miaou-core

  1. Overview
  2. Docs
Miaou core/widgets (no drivers, no SDL)

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.5.2.tar.gz
md5=60a3b9f181f24572a06a9492532bfdda
sha512=fcc35a275066be2900e6201782faf47503076fa4640f08cf78067835a6f447b74613009e55b2ac799adb7ca46f1bffa261fc5971753f2cc3c6bef327511c7ef6

doc/miaou-core.interfaces/Miaou_interfaces/Key_event/index.html

Module Miaou_interfaces.Key_eventSource

Unified key event result type for all widgets and pages.

This eliminates the inconsistency where:

  • Focus_ring returned `Handled | `Bubble
  • Button returned bool
  • Checkbox returned just t

All key handlers now return t * result where result indicates whether the key was consumed.

Sourcetype result =
  1. | Handled
    (*

    Key was consumed by this handler

    *)
  2. | Bubble
    (*

    Key was not handled, should propagate to parent

    *)
Sourceval to_bool : result -> bool

to_bool Handled is true, to_bool Bubble is false.

Sourceval of_bool : bool -> result

of_bool true is Handled, of_bool false is Bubble.

Sourceval handled : result

Alias for Handled.

Sourceval bubble : result

Alias for Bubble.

Sourceval to_poly : result -> [ `Handled | `Bubble ]

Convert to polymorphic variant for backward compat with Focus_ring.

Sourceval of_poly : [ `Handled | `Bubble ] -> result

Convert from polymorphic variant.