package miaou-core

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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.