MacOS – How to create a pasting macro

automatorcopy/pastekeybindingskeyboardmacos

I'm a big fan of the ANSI keyboard layout, but since I'm located in Denmark, the layout is missing the three letters 'Æ', 'Ø' and 'Å'.

I want to create three keyboard shortcuts that triggers a paste of one of these three letters into whatever text writing in.

From my research, it has to be a paste event that triggers the writing of one of the letters. Since the OS has registered an ANSI layout, it can't type 'Æ', 'Ø' and 'Å'.

I've made it 'sorta' work with Keyboard Maestro, but my trial has ended, and I've made AppleScripts in Automator, that rarely triggers. (Some issue Accessibility).

I've looked around a lot, and can't seem to find a solid and free/cheap solution. Can somebody help me out?

Thanks in advance!

Edit

The AppleScript I've tried to use with Automator.

on run {input, parameters)
    tell application "System Events"
        keystroke "Æ"
    end tell
end run

This requires me to enable it under System Preferences > Keyboard > Services and afterwards enable an application where it want to use it
at System Preferences > Security & Privacy > Accessibility

After that's done, the script is really slow, and will often not register a tricker.

My keyboard:
My ANSI WhiteFox keyboard

Best Answer

I manage to find a solution from @Tetsujin's comment. Using the keyboard configurator for the WhiteFox keyboard, I created a layer of A, O and '. I then use a fn key together with alt/opt (+ shift for CAPS) to write Æ, Ø and Å.

Keyboard layout of solution