Fable.Ranvier.Keyboard.Dom 0.2.0

dotnet add package Fable.Ranvier.Keyboard.Dom --version 0.2.0
                    
NuGet\Install-Package Fable.Ranvier.Keyboard.Dom -Version 0.2.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="Fable.Ranvier.Keyboard.Dom" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fable.Ranvier.Keyboard.Dom" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Fable.Ranvier.Keyboard.Dom" />
                    
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 Fable.Ranvier.Keyboard.Dom --version 0.2.0
                    
#r "nuget: Fable.Ranvier.Keyboard.Dom, 0.2.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 Fable.Ranvier.Keyboard.Dom@0.2.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=Fable.Ranvier.Keyboard.Dom&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Fable.Ranvier.Keyboard.Dom&version=0.2.0
                    
Install as a Cake Tool

Ranvier.Keyboard.Dom / Fable.Ranvier.Keyboard.Dom

Shared DOM KeyboardEvent adapter (namespace Ranvier.Keyboard.Dom, assembly Ranvier.Keyboard.Dom) bridging Ranvier.Dom.KeyboardEvent to Ranvier.Keyboard.

What This Adapter Contains

Ranvier.Keyboard.Dom.KeyboardEvent provides six zero-overhead functions over Ranvier.Dom.KeyboardEvent:

  • KeyboardEvent.physicalCode (ev: KeyboardEvent) : PhysicalKeyCode — under fickl, an inline zero-cost read of ev.code (normalizing ""/null to UnidentifiedCode and legacy "OSLeft"/"OSRight" to MetaLeft/MetaRight); on .NET, SIMD PhysicalKeyCode.ofW3cCode.
  • KeyboardEvent.modifiers (ev: KeyboardEvent) : KeyModifiers — reads ctrlKey, altKey, shiftKey, metaKey, and only calls ev.getModifierState "AltGraph" when altKey || ctrlKey, avoiding P/Invoke / GCHandle string pinning overhead on unmodified keystrokes in native WebCore hosts.
  • KeyboardEvent.logicalKey (ev: KeyboardEvent) : LogicalKey — parses ev.key into LogicalKey.
  • KeyboardEvent.toKeyChord (ev: KeyboardEvent) : KeyChord — normalizes ev into a 30-bit packed KeyChord (including Shift+ASCII and Windows Ctrl+Alt → AltGraph normalization).
  • KeyboardEvent.toKeyPress (ev: KeyboardEvent) : KeyPress — combines the normalized KeyChord with PhysicalKeyCode.
  • KeyboardEvent.isEscape (ev: KeyboardEvent) : bool — fast allocation-free check for an unmodified Escape / Esc key press.

Which Package to Reference

Scenario Package to Reference
Native .NET UI host (Ranvier.View.WebCore, server/native Ranvier.Dom) Ranvier.Keyboard.Dom (or Ranvier.Keyboard.Dom.Traced in traced builds)
Browser Fable (fickl) UI app (Fable.Ranvier.Dom, Ranvier.View.Dom) Fable.Ranvier.Keyboard.Dom (or Fable.Ranvier.Keyboard.Dom.Traced in traced builds)
Pure key engine, keymap parser, .fsx config, SDL/HID input, IPC, or headless tests (no Ranvier.Dom.KeyboardEvent) Ranvier.Keyboard alone (works on both .NET and fickl without any DOM dependency)

Both Ranvier.Keyboard.Dom and Fable.Ranvier.Keyboard.Dom compile to the same assembly name (Ranvier.Keyboard.Dom) and namespace (Ranvier.Keyboard.Dom), so shared view / component source files compile against either package without #if directives.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 44 11/19/2026
0.1.0 47 11/18/2026

Pre-1.0 release. The API may change before 1.0.