Prowl.Paper is deliberately agnostic about how input arrives. Rather than hooking into a specific windowing system, it exposes a small set of setter methods that you call once per frame with the current input state from your host (Raylib, OpenTK, SDL, Unity, etc.). This page explains every method you need to call, what each one does, how to query input state from inside your own logic, and includes a complete working example using Raylib.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl.Paper/llms.txt
Use this file to discover all available pages before exploring further.
Required calls every frame
All input methods live on thePaper instance. Call them before paper.BeginFrame(...), so that the input state is current when the frame begins processing events.
Pointer position
Pointer button state
- When
isMoveistrue, thex/yvalues update the pointer position and thebtnandisDownvalues are ignored. - When
isMoveisfalse,btnandisDownrecord a button press or release at position(x, y).
Paper tracks both current and previous button state internally. Calling
SetPointerState with isDown = true on one frame and isDown = false on the next is all that is needed for press/release detection — you do not need to manually manage transitions.Mouse wheel
Text input characters
\r) are automatically converted to newlines (\n). Characters are delivered to the focused element via OnTextInput callbacks. Call this once per character produced by your host’s character-press event.
Key state
PaperKey enum mirrors standard keyboard key names, so most mappings from framework-specific enums are trivial.
Clipboard integration
Paper does not assume a clipboard implementation. Instead, it uses theIClipboardHandler interface:
Ctrl+C, Ctrl+V, Ctrl+X in text fields) are silently skipped and a warning is printed to the console.
Input query methods
In addition to the per-frame setters, Paper exposes query methods for reading input state from inside your own logic (outside of event callbacks). These are useful for building custom controls or deciding whether to pass input to a game simulation.Keyboard queries
Pointer queries
Focus and capture flags
Auto-repeat settings
Paper implements keyboard auto-repeat independently of the host OS, giving you precise control over repeat timing.IsKeyPressed transition, so OnKeyPressed callbacks receive IsRepeat = true during repeated events, and you can distinguish initial presses from repeats inside your handlers.
OS cursor visibility
Paper can signal your host application to show or hide the system cursor. Subscribe to theOnCursorVisibilitySet event during initialization to act on these signals:
paper.SetCursorVisibility(bool) directly from your own code at any time.
Complete Raylib integration example
The following is the full input integration from the official Raylib sample, demonstrating every required call in context.PaperKey reference
Paper’s PaperKey enum covers the full standard keyboard layout:
Alphanumeric & Function
A–Z, Num0–Num9, F1–F12, Space, Tab, Enter, Escape, BackspaceNavigation
Left, Right, Up, Down, Home, End, PageUp, PageDown, Insert, DeleteModifiers
LeftShift, RightShift, LeftControl, RightControl, LeftAlt, RightAlt, LeftSuper, RightSuperNumpad
Keypad0–Keypad9, KeypadDecimal, KeypadPlus, KeypadMinus, KeypadMultiply, KeypadDivide, KeypadEnter, KeypadEquals