wow i actually figured it out myself
but dont ask me for exact step by step id go mad trying to explain this...
iam using combination of KeyRemap4MacBook with AppleScript
its a silly workaround, iam not really controlling VLC ***IN BACKGROUND*** i do have to switch from text editor to vlc and back but it takes 1/50th of second thanks to applescript...
1) vlc is playing audio file in background while iam transcribing text into text editor in foreground
2) KeyRemap4MacBook is setup in such way that if i press a key F7, F8, F9 KeyRemap4MacBook triggers an AppleScript command that momentarily switches to VLC, issues a keyboard shortcut for one of these:
VERY SHORT BACKWARDS JUMP (set to left arrow in vlc)
PAUSE/PLAY (set to spacebar in vlc)
VERY SHORT FORWARD JUMP (set to right arrow in vlc)
than switches immediatelly back to last app - in my case the text editor
the two aplication windows quiclky flash back and forth but it only takes 1/50th of second and because i use F7, F8, F9 i dont loose cursor focus or selection in the text editor (since function keys do not enter any ASCI characters or anything)
below is sample script (private.xml) for KeyRemap4MacBook but you have to figure it out yourself (see above for shortcuts i have setup in VLC for each function)
as you can see below when iam inside VLC i use left arrow, right arrow, spacebar directly to jump back and forth in file
and when iam outside VLC (VLC in background) i use F7, F8, F9 to trigger those same VLC shortcuts for me using AppleScript
<?xml version="1.0"?>
<root>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_JXA_keystroke_back</name>
<url type="shell">
osascript -e '
tell application "VLC2.2.1-64"
activate
end tell
tell application "System Events"
tell process "VLC"
key code 123
key code 48 using command down
end tell
end tell
'
</url>
</vkopenurldef>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_JXA_keystroke_forward</name>
<url type="shell">
osascript -e '
tell application "VLC2.2.1-64"
activate
end tell
tell application "System Events"
tell process "VLC"
key code 124
key code 48 using command down
end tell
end tell
'
</url>
</vkopenurldef>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_JXA_keystroke_space</name>
<url type="shell">
osascript -e '
tell application "VLC2.2.1-64"
activate
end tell
tell application "System Events"
tell process "VLC"
keystroke space
key code 48 using command down
end tell
end tell
'
</url>
</vkopenurldef>
<appdef>
<appname>vlc</appname>
<equal>org.videolan.vlc</equal>
</appdef>
<item>
<name>Slow Fast inside VLC</name>
<identifier>Slow Fast inside VLC</identifier>
<only>vlc</only>
<autogen>__KeyToKey__ KeyCode::F9, KeyCode::CURSOR_RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::F8, KeyCode::SPACE</autogen>
<autogen>__KeyToKey__ KeyCode::F7, KeyCode::CURSOR_LEFT</autogen>
</item>
<item>
<name>Slow Fast outside VLC</name>
<identifier>Slow Fast outside VLC</identifier>
<not>vlc</not>
<autogen>__KeyToKey__ KeyCode::F9, KeyCode::VK_OPEN_URL_JXA_keystroke_forward</autogen>
<autogen>__KeyToKey__ KeyCode::F8, KeyCode::VK_OPEN_URL_JXA_keystroke_space</autogen>
<autogen>__KeyToKey__ KeyCode::F7, KeyCode::VK_OPEN_URL_JXA_keystroke_back</autogen>
</item>
</root>
i also have similarily setup keyboard shortcuts for fine speed UP and DOWN to slow down speach when transcribing... using same principal as above...
VLC become a transcribing / learning / audio courses WORKHORSE even on OSX without global shortcuts
hope it will show you in the right direction, please dont ask for elaboration... this must be enough... it took me 2 hours to figure out from scratch using google so its not that complicated...