Skip to content

Integrate Samsung's Air Actions

This commit adds support for the stylus gestures supported by Samsung S-Pen-compatible devices - the Air Actions. Air Actions is a middleware supported in Galaxy Tab S6, Note 9 (partially) and Note 10, that translates S-Pen gestures into keyboard events. (More information from the developer documentation: https://developer.samsung.com/codelab/air-actions/overview)

There are two parts:

  1. an extensions for assigning the actions, configured from the Settings -> Configure Krita dialog
  2. Android packaging changes to enable interfacing with the Air Actions middleware

Test Plan

On compatible Android device

Before you start testing, you need to allow Air Actions for Krita - go to Android Settings -> Advanced features -> S Pen, select Krita in App actions, enable with the On/Off toggle

  1. test that the gestures work correctly with default configuration The popup palette action (Toggle popup palette with S-Pen) is a special 'fake' action hooking input manager action to a KisAction that can be run through the extension, as such it needs deeper testing
    a. the popup palette is shown/hidden at the right moment
    b. the popup palette appears under the cursor

  2. test the settings dialog (Settings -> Configure Krita -> S-Pen Actions)
    a. the settings are applied correctly
    b. the settings persist between restarts
    c. all actions are present (both when configured with no document open and with a document open)

On desktop Krita The extension is currently not limited to Android. It can thus be tested on the desktop version of Krita. Instead of stylus gestures, use following keyboard shortcuts

@ - click
\# - double click
F7 - swipe up
F8 - swipe down
F9 - swipe left
F10 - swipe right
F11 - circle clockwise
F12 - circle counter-clockwise 

On non-compatible Android device

  1. the APK can be installed
  2. the APK does not crash

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Anna Medonosová

Merge request reports