My RPi plotter project
is nearing completion (well phase one at least). The final thing to get working is the red push button on the top that is pressed to drop a MOB
(ideally a long press will drop a normal mark).
I'm running OpenPlotter to tie everything together. The red button is connected to a GPIO on the Pi. When the button is pressed OP can generate a system command.
I had several ideas on how to get the keypress in OCPN
Simulating an ARPA or ARPS target
Simulating a DSC
Simulating an AIS
But these all rely on generating obscure NMEA
sentences from Signal K keys some of which, the AIS
at least, is not implemented in the OP version of Signal K.
My plan is to use a command line tool to generate a simulated ctrl+space
I found the utility xdotool which seems to fit the bill
I was thinking to use an action to issue a command like
xdotool search --name "OpenCPN 4.6.1" key ctrl+space
which runs without error but doesn't do anything
Somebody else found that
xdotool search "OpenCPN 4.6.1" windowactivate --sync key --clearmodifiers
" works to turn on and off the light in opencpn"
So; anybody any ideas?
Thanks for your time.