Skip to content

Configuring the plugin

Wojciech Trybus edited this page May 12, 2023 · 1 revision

Tweaking the global parameters

Shortcut-Composer comes with a settings dialog available from krita topbar: Tools > Scripts > Configure Shortcut Composer. The dialog allows to change the following aspects of actions:

  • Common settings
    • Short vs long press time - Time in seconds distinguishing short key presses from long ones.
    • FPS limit - Maximum rate of Mouse Tracker and Pie Menu refresh.
  • Cursor trackers
    • Tracker sensitivity scale - Sensitivity multiplier of all Mouse Trackers.
    • Tracker deadzone - Amount of pixels a mouse needs to moved for Mouse Trackers to start work.
  • Pie menus display
    • Pie global scale - Global scale factor for base of every pie menu.
    • Pie icon global scale - Global scale factor for icons of every pie menu.
    • Pie deadzone global scale - Global scale factor for the deadzone area of every pie menu.
    • Pie animation time - Time (in seconds) for fade-in animation when showing the pie menu.

Modifying actions and creating custom ones

While the settings dialog allows to tweak the values common for plugin actions, it does not allow to modify the behaviour of the actions or create new ones.

To achieve that it is required to modify actions implementation:

  • in krita's topbar, open Settings > Manage Resources > Open Resource Folder
  • navigate to ./pykrita/shortcut_composer/ directory.
  • action definitions are located in actions.action file.
  • actions implementation is located in actions.py file.
  1. Define an action in actions.action file by duplicating one of the existing definitions and using an unique name for it.
  2. Implement an action in actions.py file. Once again, duplicate one of the existing implementations. It is best to pick the one that feels closest to desired action. Fill its arguments, making sure the name is exactly the same as defined earlier.