Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ export default defineConfig({
...getSidebarTranslatedLabel("FAQ"),
link: "/community/faq/",
},
{
...getSidebarTranslatedLabel("Stylus support"),
link: "/community/stylus-support/",
},
{
...getSidebarTranslatedLabel("Comparison"),
link: "/community/comparison/",
Expand Down
4 changes: 4 additions & 0 deletions docs/src/content/docs/community/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Try updating your browser to the latest version.

> [#270](https://github.com/LinwoodDev/Butterfly/issues/270)

See [Stylus support](/community/stylus-support) for current behavior and workarounds.

I'm using the input provided by the flutter framework.
This is the issue to track it: [flutter/flutter#42846](https://github.com/flutter/flutter/issues/42846).

Expand Down Expand Up @@ -58,6 +60,8 @@ Butterfly is available on iOS as preview. Click [here](https://butterfly.linwood

> [#238](https://github.com/LinwoodDev/Butterfly/issues/238)

See [Stylus support](/community/stylus-support) for current behavior, settings, and issue links.

I'm using the input provided by the flutter framework.
There are already issues to track it:
Windows: [flutter/flutter#65248](https://github.com/flutter/flutter/issues/65248) and [flutter/flutter#102836](https://github.com/flutter/flutter/issues/102836).
Expand Down
39 changes: 39 additions & 0 deletions docs/src/content/docs/community/stylus-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Stylus support
---

This page collects the current stylus and pen-input behavior in Butterfly.

## Supported platforms

- **Android / mobile:** Stylus input works best and is the main supported path today.
- **Desktop (Windows/Linux):** Stylus input is currently limited by Flutter input support.
- **Web:** Often a good fallback when desktop stylus behavior is inconsistent.

## Stylus-related settings

You can find stylus-related options in **Settings → Input → Pen**:

- **Pen-only input** (changed in 2.5): helps avoid accidental finger/touch drawing when using a stylus.
- **Pen-only toggle on stylus detection:** when a stylus is detected, a quick Pen-only toggle is activated; you can still disable it in **Settings → Input → Pen**.
- **Ignore pressure:** useful when pressure data is unreliable. This is set to help with cases where Firefox reports incorrect pressure on first input.
- **Input test:** lets you verify what pointer/stylus events your device is currently reporting.

## Pen shortcuts and pointer test

Butterfly supports pen/stylus shortcuts (button mappings can vary by device/OS). If shortcuts do not behave as expected, open **Input test** first and check button values:

- **Primary button** commonly appears as `10` (`2`)
- **Secondary button** commonly appears as `100` (`4`) or `100000` (`32`)

These values are bit mappings from pointer button flags.
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button values listed — 10, 100, and 100000 — appear to be binary representations of the pointer button bit flags (where 10 in binary = 2 decimal, 100 in binary = 4 decimal, and 100000 in binary = 32 decimal). The page states "These values are bit mappings from pointer button flags," but does not clarify the numeric base being used. Without explicitly noting that these are binary values (or using a 0b prefix notation), readers are likely to interpret 10, 100, and 100000 as decimal numbers, which would be incorrect and confusing. Consider adding a clarifying note that these outer values are written in binary.

Suggested change
These values are bit mappings from pointer button flags.
These values are bit mappings from pointer button flags, where the outer values (for example, `10`, `100`, `100000`) are written in binary and the values in parentheses are their decimal equivalents.

Copilot uses AI. Check for mistakes.

## Known framework limitations

Some stylus issues come from Flutter input handling rather than Butterfly directly.

- Android S-Pen tracking issue: [flutter/flutter#42846](https://github.com/flutter/flutter/issues/42846)
- Windows stylus issues: [flutter/flutter#65248](https://github.com/flutter/flutter/issues/65248), [flutter/flutter#102836](https://github.com/flutter/flutter/issues/102836)
- Linux stylus issue: [flutter/flutter#63209](https://github.com/flutter/flutter/issues/63209)

If your setup is affected, please still report it in Butterfly issues with your platform, device model, and app version.
1 change: 1 addition & 0 deletions docs/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"code_of_conduct": "Code of conduct",
"embedding": "Embedding",
"faq": "FAQ",
"stylus_support": "Stylus support",
"versions": "Versions",
"nightly": "Nightly",
"privacy_policy": "Privacy policy",
Expand Down