1. In the rick-roll script, we import another script called linux-functions.qk; assign the rick roll URL to a variable, open the Brave browser, Wait 1 second, type the URL, press Enter, then press F11 to go full screen, wait 3.5 seconds, and finally press f to full screen the YouTube player itself.
No one saw what open_gnome_app() and fast_type() do; what they are doing is understandable by the function names themselves. .!
2. In linux-functions.qk, we import another file called core-functions.qk; as well as define what open_gnome_app() does.
Basically, it presses the Super key, types the name argument it received, and presses Enter. That is the lowest-level logic of what that function does.
3. In core-functions.qk, we have the fast_type() function.
We store whatever pace (the typing delay between 2 characters) in a variable named a and whether the fast mode is enabled or not in a variable named b.
Then, we set the pace to 0 milliseconds and enable the fast mode, then type whatever we did, and restore the pace and fast mode to whatever it was before.
This architecture allows users to develop their own standard libraries and import them into their main keystroke script, significantly simplifying and decluttering it.
This kind of flexibility is not even there in the official DuckyScript 3.0 😉