vPedal OSX API

Disclaimer:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

BY DOWNLOADING ANY OF THE FILES FROM THIS PAGE YOU ARE AGEE TO THE CONDITIONS CONTAINED IN THIS DISLAIMER .

WebPlaycontrol

dock1

The WebPlayControl is the OSX version of the Windows / PC app that can be used to play media in Apple Safari. A modified version of Omni vPedal2015 OSX WebControl needs to be active in the dock. Plus javascript in a sample html file vPedal2015 OSX API.

You will need to download both of these files above

Javascript was chosen as it is more universal than any other scripting language.

The vPedal JavaScript must be able to communicate with the active browser. Hence, on various events of the Footpedal, the events are passed the active window.

Naturally it would be quite silly to rely on the K key to be a FootDown event. Therefore WebPlayControl has been programmed to specifically require a reasonably impossible combination of keys that could not possibly interfere with either OSX or the Active Browser.

Therefore we rely on the alt, ctrl, and the shift key to be held at the same time Virtually. So the following code is the listener, and executes various code on combinations of inbound key events sent from the  docked WebPlayControl.

ALT+CTRL+SHIFT + across the keyboard Q – W – E – R –  T – Y – U – I where U is vPedal connect and I is vPedal disconnected. It uses a slightly different set of keystrokes than the windows version. The windows version uses numbers instead of the letters used in the OSX version.

if (e.altKey==true && e.ctrlKey==true && e.shiftKey) {
if (e.keyCode==81){ExecuteCommand(“1”);};
if (e.keyCode==87){ExecuteCommand(“10”);};
if (e.keyCode==69){ExecuteCommand(“2”);};
if (e.keyCode==82){ExecuteCommand(“20”);};
if (e.keyCode==84){ExecuteCommand(“3”);};
if (e.keyCode==89){ExecuteCommand(“30”);};
if (e.keyCode==85){ExecuteCommand(“4”);};
if (e.keyCode==73){ExecuteCommand(“40”);};


This version of the vPedal framework will allow integration of vPedal control into your Mac OS X application.

 

“Updated Version  2021   –  Big Sur  > not tested as yet on a  Apple Chipset”

Also included is a simple test application showing how the framework can be used.

 Omni_Test_10.6_FW.zip

Old version  Omni_10.6_framework.zip

 

written by Gary Fielke

TriX Software

gary@trixsoftware.com

Go Back