Saving a LibreOffice Document in the Background

Here is an untested idea:

Create a KM Macro with a Periodic Trigger (looks like that is what you have)
Macro Actions:

  1. IF/THEN LibreOffice is frontmost, THEN:
    • Pause Until IDLE function is > a short period like 1-2 seconds.
    • Select Menu "Save"
  2. ELSE:
    • Type Keystroke "⌘S" to LibreOffice in the background
      (an option in the Gear popup menu)
  • image

Again, I have NOT tested this, but it looks good to me.
Test using a LibreOffice test file that can be lost.

Let us know if this works for you.