Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 20-05-2017, 16:56   #1
Moo
Registered User

Join Date: Mar 2017
Posts: 804
MOB button - simulate key strokes

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 target
Simulating an AIS SART

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

Code:
xdotool search --name "OpenCPN 4.6.1" key ctrl+space
which runs without error but doesn't do anything

Somebody else found that

Code:
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.
Moo is offline   Reply With Quote
Old 20-05-2017, 17:46   #2
Moo
Registered User

Join Date: Mar 2017
Posts: 804
Re: MOB button - simulate key strokes

Further experimentation has shown that single key shortcuts work such as "M" which turns on the measure tool and "O" toggling chart outlines so the issue is something to do with combinations of keys.
Moo is offline   Reply With Quote
Reply

Tags
mob

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 strokes illegal??? gettinthere Auxiliary Equipment & Dinghy 30 09-01-2018 11:28
Opencpn Dokuwiki Migration -MOB- Help Needed!!! MOB rgleason OpenCPN 87 20-12-2016 11:12
For Sale: McMurdo Guardian MOB System TWO MOB watches and Receiver petedd Classifieds Archive 1 26-09-2015 17:31
F5 color scheme - adjusting the dimmer & MOB button dave777 OpenCPN 7 18-08-2013 02:19
Four Strokes of Luck - Motorbike-Powered Dinghy cat man do Auxiliary Equipment & Dinghy 5 11-03-2011 06:21

Advertise Here


All times are GMT -7. The time now is 21:30.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.