Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

358.14. kwin-effect-kdos-keys-1.0.0

KDOS key card for KWin — every global shortcut on one searchable card, on Meta+F1 and Meta+/

Version 1.0.0, release 1
Source tree src/desktop/kwin-effect-kdos-keys/
Phase 50_desktop (Desktop), 69 of 92 in build order
Licence MIT
Homepage https://github.com/kunaldawn/kdos
Build time 0.1 SBU
Installed size 55.6 KiB in 7 files
Recipe src/desktop/kwin-effect-kdos-keys/kpkgbuild

About

kwin-effect-kdos-keys is the key card: a full-screen, searchable card of every global keyboard shortcut the session holds, grouped into Windows, Desktops, Launch, KDOS, Accessibility and System. Meta+F1 and Meta+/ open it, the same keys close it, and Esc clears the search and then closes it. Tab, Down and Up walk from the search field through the rows, each spoken to a screen reader as its action and keys, and a search announces how many shortcuts it leaves. Plasma itself has no overview of its shortcuts outside System Settings; the card is that overview.

It is a KWin effect written in QML, a KWin/Effect package installed to /usr/share/kwin/effects/kdos_keys/. Each time it opens it asks kglobalacceld, over D-Bus, for every component and each component’s shortcuts with their current keys, so a chord changed on System Settings’ Shortcuts page is on the card the next time it opens, with no restart and no file in between.

Which group a shortcut is listed under is groups.conf, a table of component and action patterns read top to bottom. keycard-gen.c compiles it at build time into the groups.js the card reads; the table, not the card, is what to edit when a group is wrong.

Why it is in KDOS

The comment above the 4 ports from kdos-kwin-motion to kwin-script-kdos-window-memory in script/phases/50_desktop/packages.txt:

KWin's KDOS pieces: the CRT motion effects, the key card on Meta+F1, run-or-raise for the terminal programs and the window position memory.

Sources

None: the port builds from its own directory, /kdos/src/desktop/kwin-effect-kdos-keys.

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, kpackage, kwin, kglobalacceld, kirigami, libplasma.

Required by (1): kde-plasma.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/50_desktop/phase.env && kpkg install kwin-effect-kdos-keys'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /kdos/src/desktop/kwin-effect-kdos-keys.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/kwin-effect-kdos-keys
SRC=$SRC_ROOT/kwin-effect-kdos-keys-1.0.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

cmake -S "$PORT_SRC" -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D BUILD_TESTING=OFF \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/kwin-effect-kdos-keys, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf kwin-effect-kdos-keys-1.0.0-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/kwin-effect-kdos-keys, and runs the triggers its paths call for.

Other files in the port directory, read by build.sh: CMakeLists.txt, groups.conf, keycard-gen.c, package/, tests/.

Contents

Installed directories: /usr/share/kwin/effects/kdos_keys.

Notes

The effect’s own key is Meta+F1, which KWin also binds to “Switch to Desktop 1” beside Ctrl+F1. The shipped /usr/share/kdos/xdg/kglobalshortcutsrc takes Meta+F1 off desktop 1 and gives the card’s action Meta+/ as its second key; a ShortcutHandler registers one key, and one action with two keys is one row on the Shortcuts page. Without the shipped entry (a person’s own file holding its own value), Meta+F1 stays desktop 1’s and the card has no key until one is bound.

The build stops when the card’s own shortcut is placed only by a fallback rule of groups.conf. testing/selftest.sh runs the same check, kdos-keycard-gen --check, over the shipped kglobalshortcutsrc, every kglobalaccel desktop entry and every desktop entry with X-KDE-Shortcuts under src/ and fs/, and every KWin ShortcutHandler and registerShortcut() under src/, so a chord KDOS ships always has a group chosen for it. The table is also installed as /usr/share/kdos/keycard-groups.conf, so kdos help --keys can group the chords it prints the way the card does.

kglobalacceld goes on reporting a KWin script’s keys after the script is unloaded, so a script KDOS ships turned off, Krohnkite, would put keys on the card that do nothing. keys.js names each such script with the prefix of its actions, the card asks KWin’s isScriptLoaded() about each as it opens, and leaves out the rows of one that is off; the Krohnkite rows appear after kdos tiling on.

Key names are Qt’s own: keynames.js holds the text QKeySequence::toString(PortableText) gives each named key of Qt 6, so a chord reads on the card as it reads on the Shortcuts page. A Qt release that renames a key needs the table updated to match. kglobalacceld sends only the first key of a multi-key sequence over D-Bus, so a sequence such as Meta+K, Meta+L shows as Meta+K.

A QML effect is loaded whatever the renderer, unlike a JavaScript one, so the card also opens under software rendering. It is drawn with Kirigami and Plasma components in the colours of the current colour scheme, and every row carries an accessible name of its action and keys.