Personally I do not think using a shortcut key per command is very practical, however (always a however) a g'mic command included in a script or plugin can use a shortcut. Get the g'mic command from the log file in ~/.config/gmic
Plugin attached with sample command. Unzip, put in your user profile plug-ins folder
Example: using a shortcut key:
https://i.imgur.com/yzoTXa9.mp4Obviously, the snag is, one plugin required for each hotkey.
edit: Should have picked up on "Ubuntu 20.04 (focal) and Gimp 2.10.20
The default for focal is Gimp 2.10.18 the lastest that you might get with a flatpak is 2.10.22. Are you using the 'buntu SNAP version ? Does it support python2 ?