Anki Forums

Windows Surface Pen/Stylus Support

I have a card setup similar to this one: (I’m using the same underlying JS library)
My preferred input method is a surface pro 4 with pen, but there seems to be a variety of issues.

I found this old post:
I’m wondering what the bug referenced is?

I’ve tried the following:

Anki 2.1.26, 2.1.26 alternative, 2.1.22 and 2.1.22 alternative
The pen only draws a short stroke. (See the gif, yellow means the pen is clicked)
Opening “more” with the pen and then dismissing with the pen just moves the context menu. A third click dismisses it.

Anki 2.1.15 alternative
This is the closest thing to working. The pen works as expected for drawing in the card, but using it to advance the card often ends up clicking the edit button instead. (clicking Good with the pen clicks Edit)
The “More” button’s context menu dismisses correctly.
Clicking the bottom panel outside of one of the buttons seems to click one of the Edit/Good/Easy buttons
I can only add 1 gif per post, I’ll try posting it as a response
In all cases, mouse and touch input work as expected.

Enabling the “Let me use my pen as a mouse in some desktop apps” from the “Pen & Windows Ink” settings allows slightly longer strokes to be drawn, but it closes the stroke again and isn’t stable.

Installing the wintab dll driver also had no noticeable affect.

I’m assuming the toolkit referenced in the old support issue is QT?

I found a bug with a fix related to switching between WinTab and Windows Ink
sorry for the broken links, I am only allowed to post 2 per post
bugreports. qt .io/browse/QTBUG-83218
codereview. qt-project .org/c/qt/qtbase/+/295623
And a WIP change for some form of support for windows tablets events
codereview. qt-project .org/c/qt/qtbase/+/208038/1

Is there a known bug I can track / see if I can help with? I haven’t gotten an anki dev environment setup yet, but if I do is there something I should try?

Anki 2.1.15 behavior

You could try the latest beta which uses a newer Qt version, to see if it helps.

This is still not working on the latest anki versions. The surface pen causes a double click in most of anki (except in the card preview screen as far as I can tell). I noticed in another similar post you said this was a problem with anki’s toolkit and that it may or may not be patched. I’m guessing the toolkit is maintained by someone else? Is there somewhere I can submit a bug report for the relevant bit of the toolkit? Thank you in advance.

I suggest you wait a few months for Anki to update to a newer toolkit that is due out then, and if it’s still a problem at that point, maybe it is worth reporting.