Progressing along with my digitizing work mentioned here, I thought of an improvement to my method.
In short: using a form, I modify a project variable which is then autofilled on new features.
I would like to use a keyboard shortcut to increase or decrease that variable by 1 - same as the bt_up and bt_down buttons on said form.
Using a keyboard shortcut would significantly speed up altering the variable and thus digitizing.
Shortcuts on the form itself won't do, because they are only active when the form has the active scope, whereas, during digitizing, the qgis edit window has the active scope. activating the form first defeats the keyboard shortcut aim.
For this, it seems I need to add a project-level action, to link that later to a keyboard shortcut. a layer level action does not seem to offer that possibility.
I have yet not found where/how to add such a custom project action.
Any suggestions/pointers?
The action is simple increasing the variable by 1:
p_project = QgsProject.instance()
v_var = QgsExpressionContextUtils.projectScope( p_project).variable('DEF_Height')
QgsExpressionContextUtils.setProjectVariable( p_project, 'DEF_Height', str(int( v_var) + 1))
iface.mainWindow().keyPressed
signal instead.