# Double tap gesture on huawei m-pencil 3

**URL:** <https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496>\
**Category:** Input Device Support\
**Tags:** android\
**Created:** [April 4, 2026, 10:55am UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496 "2026-04-04T10:55:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![noalero](https://krita-artists.org/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@noalero](https://krita-artists.org/u/noalero)\
**Post date:** [April 4, 2026, 10:55am UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496/1 "2026-04-04T10:55:49Z")

</div>

Type of device\* : Android tablet  
Brand and version of the device: Huawei Matepad 12X 2024 - M-pencil 3  
System\*\* : HarmonyOS 4.2.0 (Android 12)

\* graphics tablet/display tablet/2-in-1 laptop/Android tablet  
\*\* Windows/Linux/Mac/Android, + version (you’ll find it in `Help -> Show system information for bug reports`)

* * *

Description of the issue (you can include screenshots):  
The Huawei M-pencil 3 has a gesture where if you double tap the body of the pen an action is performed. Trying to set a shortcut for this gesture, Krita seems to detect the action (the dialog to set the shortcut stops just after doing the gesture) but the shortcut remains unchanged.

Looking around i found this thread:

> [@My stylus's side button is not recognised by Krita](https://krita-artists.org/t/my-styluss-side-button-is-not-recognised-by-krita/176767):
>
> Type of device\* : Android tablet & Active Bluetooth stylus Brand and version of the device: OnePlus Pad 2 Pro (or OnePlus Pad 3, they are the same) with OnePlus Stylo System\*\* : ColorOS 16 based on Android 16.0 \* graphics tablet/display tablet/2-in-1 laptop/Android tablet \*\* Windows/Linux/Mac/Android, + version (you’ll find it in Help -\> Show system information for bug reports) Description of the issue (you can include screenshots): I bought this OnePlus tablet several days ago. The side…

Trying to find what key code this gesture triggers, i did an adb log performing the gesture while on Krita. This is what shows up:

`04-04 12:41:52.170 8782 8782 V InputMethodManager: dispatchInputEvent`  
`04-04 12:41:52.176 8782 8782 W krita : Unhandled key code 718 !`  
`04-04 12:41:52.177 8782 8782 V InputMethodManager: dispatchInputEvent`  
`04-04 12:41:52.183 8782 8782 W krita : Unhandled key code 718 !`  
`04-04 12:41:52.183 8782 8782 V InputMethodManager: dispatchInputEvent`  
`04-04 12:41:52.185 8782 8782 W krita : Unhandled key code 718 !`  
`04-04 12:41:52.186 8782 8782 V InputMethodManager: dispatchInputEvent`  
`04-04 12:41:52.191 8782 8782 W krita : Unhandled key code 718 !`

Would it be possible to capture the key code for this gesture to use it in Krita?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Drawpile](https://krita-artists.org/user_avatar/krita-artists.org/drawpile/32/140367_2.png) [@Drawpile](https://krita-artists.org/u/Drawpile)\
**Post date:** [April 4, 2026, 11:33am UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496/2 "2026-04-04T11:33:19Z")

</div>

Yeah that’s an invalid key code both in Android and in Qt, but I can patch in handling for it. Is there any particular key it should map to? Otherwise I’d probably use F25, since Android only has F1 to F24 that’s still free.

Edit: and is there other gestures as well? Might as well do them all at once if there’s multiple.

---

<div class="post-metadata">

**Author:** ![noalero](https://krita-artists.org/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@noalero](https://krita-artists.org/u/noalero)\
**Post date:** [April 4, 2026, 12:04pm UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496/3 "2026-04-04T12:04:11Z")

</div>

No particular key that i know of, the gesture it’s only used on Huawei apps as far as i know.

The M-Pencil 3 only has the double tap gesture. There is newer M-Pencil model with more gestures (squeeze and a physical button), but i don’t have it.

---

<div class="post-metadata">

**Author:** ![Drawpile](https://krita-artists.org/user_avatar/krita-artists.org/drawpile/32/140367_2.png) [@Drawpile](https://krita-artists.org/u/Drawpile)\
**Post date:** [April 4, 2026, 1:24pm UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496/4 "2026-04-04T13:24:19Z")

</div>

Alright, I have it ready [https://invent.kde.org/szaman/qtbase/-/merge\_requests/17](https://invent.kde.org/szaman/qtbase/-/merge_requests/17)

Can you confirm whether that works through Drawpile? The latest builds with the feature included are here: [https://github.com/drawpile/Drawpile/releases/tag/continuous](https://github.com/drawpile/Drawpile/releases/tag/continuous)

Scroll down to where it says “Assets” and get the “Android APK 64 Bit”. Then in the program, use Edit → Preferences → Shortcuts, go into the Action shortcuts and try to assign an action to your gesture. It should show up as F25 and then doing it in the program should activate that action.

---

<div class="post-metadata">

**Author:** ![noalero](https://krita-artists.org/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@noalero](https://krita-artists.org/u/noalero)\
**Post date:** [April 4, 2026, 1:53pm UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496/5 "2026-04-04T13:53:36Z")

</div>

Just tried it with the shortcut to change to the eraser. It works perfectly.  
The only weird thing is that it seems to register twice? It shows up as F25, F25:

 ![Screenshot_20260404_154116_net.drawpile](https://krita-artists.org/uploads/default/original/3X/b/f/bff874d8bc9e32f2379971b82c17eae02a463f00.jpeg)

Is this normal or could it be problematic? In the adb log i shared on the first post, the key code shows up 4 times only doing the gesture once.

---

<div class="post-metadata">

**Author:** ![Drawpile](https://krita-artists.org/user_avatar/krita-artists.org/drawpile/32/140367_2.png) [@Drawpile](https://krita-artists.org/u/Drawpile)\
**Post date:** [April 4, 2026, 2:00pm UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496/6 "2026-04-04T14:00:22Z")

</div>

Thanks! It should be fine if that’s how the input comes through, yeah. It’s pressing the “key” twice and so the program binds the double-press to the shortcut. The reason you see it four times in the log is probably because it does two presses and two releases, so that’s four warnings about unknown key codes.

---

<div class="post-metadata">

**Author:** ![noalero](https://krita-artists.org/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@noalero](https://krita-artists.org/u/noalero)\
**Post date:** [April 4, 2026, 2:26pm UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496/7 "2026-04-04T14:26:34Z")

</div>

Oh, nice! Thanks a lot for the quick replies!

Is this version of drawpile expected to have some bugs? Maybe it will be better to report this elsewhere but, trying this out, the brush preview that shows under the tip of the pen disappears when:  
1.You have a window open (like preferences).  
2. Go back to the home menu.  
3. Come back to drawpile.  
It keeps drawing normally but the brush preview under the tip of the pen doesn’t show up until you change the brush to another one.

---

<div class="post-metadata">

**Author:** ![Drawpile](https://krita-artists.org/user_avatar/krita-artists.org/drawpile/32/140367_2.png) [@Drawpile](https://krita-artists.org/u/Drawpile)\
**Post date:** [April 4, 2026, 3:21pm UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496/8 "2026-04-04T15:21:09Z")

</div>

Probably better to report issues in direct messages or through Drawpile’s channels, but thanks regardless! I’ll take a look if I can make that happen, there’s definitely some cases where the brush outline disappears that I haven’t been able to make happen consistently enough to track them down, but maybe this way will be.

---

<div class="post-metadata">

**Author:** ![system](https://krita-artists.org/uploads/default/original/1X/e446d8b3077ddf6dfb5b2cd65199c20095b47dcf.png) [@system](https://krita-artists.org/u/system)\
**Post date:** [April 8, 2026, 3:22pm UTC](https://krita-artists.org/t/double-tap-gesture-on-huawei-m-pencil-3/178496/9 "2026-04-08T15:22:07Z")

</div>

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.
