Contributing to AutoKey for Wayland
Contributions to this project are more than welcome. The preferred method for contributing something to the project is through GitHub’s Pull Request process. Especially in current times, when we’re all being inundated with AI slop, it’s wise to introduce yourself and discuss your ideas with me before submitting something. Open a draft PR or an Issue, describing what you have in mind. It will help things flow smoothly and, if I can give you any guidance I think might help, I will.
Licensing
AutoKey for Wayland uses the General Public License v3.0. Your contributions should conform to that license.
Program Architecture
There are two entry points into AutoKey, autokey-gtk and autokey-qt. The user selects
which of these to run based on their preferred environment. The source for each of these is in
lib/autokey/gtkapp.py and lib/autokey/qtapp.py respectively. Each of these implements
AutokeyApplication using the appropriate UI components, in lib/autokey/gtkui and
lib/autokey/qtui.
Those apps pass execution to lib/autokey/autokey_app.py. It sets up the IoMediator, ScriptRunner, and PhraseRunner services. The IoMediator examines the run-time
environment and selects the appropriate system integration components for X11 or Wayland
respectively. With Wayland, much of the desktop integration is accomplished by interacting with
the desktop itself, i.e., GNOME/Mutter or KDE/Kwin. Keyboard and mouse integration is done through the kernel’s input event interface and evdev. A list of some of the AutoKey for Wayland modules involved follows. This list is probably not complete but it should get you started.
X11-specific Components
lib/autokey/interface.pylib/autokey/iomediator/\*lib/autokey/scripting/clipboard_gtk.pylib/autokey/scripting/clipboard_qt.py
Wayland-specific Components
lib/autokey/scripting/clipboard_wayland.pylib/autokey/uinput_interface.pylib/autokey/wayland_checks.py
Wayland/GNOME-specific components
lib/autokey/gnome_interface.pylib/autokey/scripting/window_gnome.py
Wayland/KDE-specific components
lib/autokey/kde_interface.pylib/autokey/scripting/window_kde.py