FS.GG.UI.KeyboardInput 0.9.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package FS.GG.UI.KeyboardInput --version 0.9.0
                    
NuGet\Install-Package FS.GG.UI.KeyboardInput -Version 0.9.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FS.GG.UI.KeyboardInput" Version="0.9.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FS.GG.UI.KeyboardInput" Version="0.9.0" />
                    
Directory.Packages.props
<PackageReference Include="FS.GG.UI.KeyboardInput" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FS.GG.UI.KeyboardInput --version 0.9.0
                    
#r "nuget: FS.GG.UI.KeyboardInput, 0.9.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FS.GG.UI.KeyboardInput@0.9.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FS.GG.UI.KeyboardInput&version=0.9.0
                    
Install as a Cake Addin
#tool nuget:?package=FS.GG.UI.KeyboardInput&version=0.9.0
                    
Install as a Cake Tool

FS.GG.UI.KeyboardInput

Package-owned keyboard input runtime, reducer, effect, diagnostics, and state display contracts for FS.GG.UI products.

FS.GG.UI.KeyboardInput is one of the FS.GG.UI distribution packages — an F# / Elmish UI and 2D scene-graph framework for .NET 10 desktop, rendered through Vulkan + SkiaSharp.

Install

dotnet add package FS.GG.UI.KeyboardInput

Or scaffold a full governed project that wires the FS.GG.UI packages together:

dotnet new install FS.GG.UI.Template
dotnet new fs-gg-ui -o MyApp

Usage

open FS.GG.UI.KeyboardInput

// Bind host keys to product commands.
let bindings =
    [ { Key = "ArrowUp"; Command = "move-up" }
      { Key = "Enter"; Command = "confirm" } ]

// Initialise the keyboard runtime model + startup effects.
let model, _initEffects = Keyboard.init bindings

// Normalise a raw host key event, then feed it to the reducer.
let viewerKey, isDown = ViewerKeyboard.normalizeEvent { RawKey = "ArrowUp"; Direction = KeyDown }
let keyId = ViewerKeyboard.toKeyId viewerKey
let model, effects = Keyboard.update (KeyboardMsg.KeyDown keyId) model

// React to resolved commands and surface diagnostics.
for effect in effects do
    match effect with
    | CommandResolved cmd -> printfn "command resolved: %s" cmd
    | ReportKeyboardDiagnostic d -> printfn "[%s] %s" d.Severity d.Message
    | _ -> ()

// Project a snapshot for HUD / state display rendering.
let display = Keyboard.stateDisplay model
printfn "pressed: %A active layout: %s" display.PressedKeys display.ActiveLayout

API at a glance

  • Keyboard.init — builds the initial KeyboardModel from a KeyboardBinding list and returns startup KeyboardEffects.
  • Keyboard.update — the Elmish reducer; applies a KeyboardMsg (key down/up, focus lost, layout/mode changes, sequence resolution) and returns the new model plus emitted effects.
  • Keyboard.stateDisplay — projects a KeyboardStateDisplay snapshot (pressed keys, active layout, mode stack, pending sequence, last command) for rendering.
  • ViewerKeyboard.normalize / normalizeEvent — turn a raw host key string or ViewerKeyEvent into a typed ViewerKey (plus direction flag).
  • ViewerKeyboard.toKeyId — converts a ViewerKey into the KeyId used by bindings and the reducer.
  • KeyboardEffect — the effects the runtime emits: CommandResolved, KeyStateChanged, LayoutChanged, ModeChanged, StateDisplayChanged, ReportKeyboardDiagnostic, RequestHostKeyCapture, and more.
  • KeyboardModel / KeyboardMsg — the runtime state record and the message set driving the reducer.
  • KeyboardDiagnostic — a structured diagnostic (Code, Severity, Message, optional Key) reported via effects.

Versioning

All FS.GG.UI.* libraries share one version and move together. In a generated project a single <FsGgUiVersion> in Directory.Packages.props pins every package — upgrading is one edit; see docs/UPGRADING.md. Pre-release versions use a -preview.N suffix.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on FS.GG.UI.KeyboardInput:

Package Downloads
FS.GG.UI.SkiaViewer

Skia viewer host workflow contracts for FS.GG.UI V3 products.

FS.GG.UI.Controls

Declarative Skia controls, rich rendering, chart controls, graph controls, DataGrid, and product-owned control runtime contracts.

FS.GG.UI.Controls.Elmish

Elmish command, subscription, and program adapters for Controls and KeyboardInput runtime effects.

FS.GG.UI

Optional BOM / metapackage for the FS.GG.UI framework. Reference this single package at one version to pin the entire coherent FS.GG.UI.* set to that version; any attempt to mix a member at a different version fails loudly at restore/build. Ships no assembly — dependencies only.

FS.GG.Game.Render

Pure Scene adapter and input policy for FS.GG.Game — projects FS.GG.Game.Core simulation primitives (Point/Rect/Cell and pathfinding routes) onto FS.GG.UI.Scene drawables at the render edge, and ships the default command→key keymap binding the Game.Core command vocabulary onto FS.GG.UI.KeyboardInput's keymap mechanism. Reaches UP to FS.GG.UI.*; no Skia, deterministic. Per ADR-0022 §2.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.15.0 122 7/20/2026
0.14.0 108 7/19/2026
0.13.0 137 7/18/2026
0.12.0 271 7/17/2026
0.11.0 376 7/16/2026
0.10.0 2,508 7/14/2026
0.9.2 833 7/13/2026
0.9.0 1,201 7/11/2026
0.8.0 274 7/11/2026
0.7.0 220 7/11/2026
0.6.0 199 7/10/2026
0.5.0 302 7/10/2026
0.4.0 341 7/9/2026
0.4.0-preview.1 85 7/9/2026
0.3.0-preview.1 94 7/7/2026
0.2.0-preview.1 81 7/6/2026
0.1.64-preview.1 101 7/5/2026
0.1.63-preview.1 104 7/4/2026
0.1.62-preview.1 83 7/4/2026
0.1.61-preview.1 81 7/2/2026
Loading failed