Ranvier.Keyboard
0.1.0
See the version list below for details.
dotnet add package Ranvier.Keyboard --version 0.1.0
NuGet\Install-Package Ranvier.Keyboard -Version 0.1.0
<PackageReference Include="Ranvier.Keyboard" Version="0.1.0" />
<PackageVersion Include="Ranvier.Keyboard" Version="0.1.0" />
<PackageReference Include="Ranvier.Keyboard" />
paket add Ranvier.Keyboard --version 0.1.0
#r "nuget: Ranvier.Keyboard, 0.1.0"
#:package Ranvier.Keyboard@0.1.0
#addin nuget:?package=Ranvier.Keyboard&version=0.1.0
#tool nuget:?package=Ranvier.Keyboard&version=0.1.0
Ranvier.Keyboard
DOM-free, standards-typed keyboard model, Unicode UAX #29 grapheme utilities, and 30-bit packed KeyChord / KeyPress primitives for .NET (net10.0, net8.0, NativeAOT) and Fable (fickl).
What Ranvier.Keyboard Contains
All types live in namespace Ranvier.Keyboard:
- Physical keys (
IsoAndW3cKeys.fs):PhysicalKeyCode(all 116 W3CKeyboardEvent.codescan positions;[<Struct>]DU on.NETwith three-tierVector512/Vector256/Vector128SIMDofW3cCode/ofW3cCodeSpan/ofW3cCodeUtf8, and[<StringEnum>]underficklfor zero-cost JS string interop).PhysicalKeyCode.ofUsbHidUsage(USB HID Usage Page0x07scancode mapping) andPhysicalKeyCode.toIso9995(Iso9995Coordinate,IsoSection,IsoRow).
- Unicode, C0 controls & UAX #29 graphemes (
UnicodeAndControl.fs):C0Control(0x00..0x1F+0x7FDEL, caret notation^@..^?, Ctrl+ASCII mapping, and SIMDindexOfControlByte/indexOfControlChar).UnicodeChar(classify,tryBracketPartner,isVimWordRune,vimWordClassacrossLetterCase,BracketRole,QuoteStyle,UnicodeCharClass).Grapheme(nextClusterLength,prevClusterStart,stepForward,stepBackward,runeAt,toLower,toUpper,toggleCasewith SIMD ASCII fast paths).
- Dead keys, RFC 1345 digraphs & logical keys (
DeadKeysAndDigraphs.fs):ComposingAccent&DeadKey.compose(ISO/IEC 9995-3 NFC dead-key composition + stroked letters),Rfc1345Digraph.lookup(Vim<C-k>two-char mnemonics).LogicalKey(Character of Rune,GraphemeText,Whitespace,Navigation,Editing,Ui,FunctionKey 1..24,Modifier,Dead,Ime,LeaderVirtual,Unidentified) with SIMD W3CKeyboardEvent.keyparsing andKeyModifiers(Ctrl,Alt,Shift,Meta,AltGraph, 5-bittoBits/ofBits).
- 30-bit packed
KeyChord&KeyPress(KeyChord.fs):PackedKey,[<Struct>] KeyChord = { Packed: int; OverflowText: string }, and[<Struct>] KeyPress = { Chord: KeyChord; Physical: PhysicalKeyCode }.- O(1)
KeyChord.isPlainChar,tryPlainChar,tryPlainRune,tryPlainText,c0Control, active patterns (ClassifiedKey,PlainChar,PlainRune,PlainText,CtrlC0), and SIMD Vim-notationKeyChord.parse/KeyChord.parseArray("<leader>ff","<C-w>v","<C-S-x>","3dd").
When to Use Ranvier.Keyboard vs Ranvier.Keyboard.Dom / Fable.Ranvier.Keyboard.Dom
- Use
Ranvier.Keyboardalone (on.NETorfickl) when your project does not directly touchRanvier.Dom.KeyboardEvent— for example: modal editing engines, keymap registries,.fsxconfiguration scripts, SDL / USB HID native input loops, IPC protocols, CLI/TUI apps, or unit tests. It ships its F# sources forfickldirectly inside the.nupkgand carries no DOM package dependency. - Add
Ranvier.Keyboard.Domon native.NET/Ranvier.View.WebCorehosts, orFable.Ranvier.Keyboard.Domin browserficklapps, when you want to decodeRanvier.Dom.KeyboardEventinstances viaRanvier.Keyboard.Dom.KeyboardEvent.{toKeyChord, toKeyPress, physicalCode, logicalKey, modifiers, isEscape}.
| Product | Versions 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. |
-
net10.0
- Fable.Core (>= 5.3.0)
- FSharp.Core (>= 9.0.100)
-
net8.0
- Fable.Core (>= 5.3.0)
- FSharp.Core (>= 9.0.100)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Ranvier.Keyboard:
| Package | Downloads |
|---|---|
|
Ranvier.Keyboard.Dom
Native .NET DOM adapter bridging Ranvier.Dom.KeyboardEvent to Ranvier.Keyboard (PhysicalKeyCode, LogicalKey, KeyModifiers with lazy AltGraph guard, KeyChord, KeyPress, and isEscape). Use on native .NET / Ranvier.View.WebCore hosts; use Fable.Ranvier.Keyboard.Dom in browser fickl apps, or Ranvier.Keyboard alone when no DOM dependency is needed. |
|
|
Fable.Ranvier.Keyboard.Dom
Fable (fickl) browser DOM adapter bridging Ranvier.Dom.KeyboardEvent (from Fable.Ranvier.Dom) to Ranvier.Keyboard with zero-cost StringEnum physical key reads and lazy AltGraph modifier queries. Use in browser fickl apps; use Ranvier.Keyboard.Dom on native .NET / Ranvier.View.WebCore hosts, or Ranvier.Keyboard alone when no DOM dependency is needed. |
|
|
Ranvier.Terminal.Core
Native terminal rendering, layout and reactive controls for F# applications. |
|
|
Ranvier.Plume
The state of a text editor as a fold over a log of edits, on Ranvier: an immutable rope, change sets with position mapping, selections, transactions, facets, state fields, compartments, history, commands and keymaps. No DOM dependency. |
|
|
Ranvier.Plume.Traced
The state of a text editor as a fold over a log of edits, on Ranvier: an immutable rope, change sets with position mapping, selections, transactions, facets, state fields, compartments, history, commands and keymaps. No DOM dependency. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Pre-1.0 release. The API may change before 1.0.