Lock keyboard shortcut to specific application only?

Hi,
when creating keystroke translator, is it possible to tell Bome to only use these shortcuts on specific application like a DAW, and don’t execute outside of it ?

Specifically on ableton, i’m forced to translate some default (& not editable) shortcuts. For example, default shortcut ‘CTRL+E’ is used to slice a clip and i’ve changed that ‘S’

Thanks

Hi,

See this post which is a similar request.

We cannot change shortcuts but the referenced post will take MIDI In, focus to the correct outgoing application, then send a keystroke 10ms later. It the example, I’m using PC0 as an incoming MIDI trigger and sending Right Arrow to notepad. You will need to change translator 0.0 to send Cnrl-E instead and to focus Ableton Live instead of Notepad.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

okay thank you, do I need a FOCUS translator for each shortcut i’m changing?

You only need to focus if you are currently not if focus. There is an incoming trigger you can use to determine when a given application comes in focus or out of focus. You can set a global variable the then test for the global variable to determine whether you want to focus or not. For me it is just easier to include the focus translator than evaluate a variable and then determine whether focus is needed or not.

For example if you set gf=1 when focused and gf=0 if not focused you could add rules like this.

if gf==1 then skip next rule
Peform "focus"

Then a translator like this for setting the global variable when the application is focused.

Incoming: On Application focus Activated ‘appname.exe’
Rules:
gf=1

And another translator like this when the focus is removed:
Incoming: On Application focus Deactivated ‘appname.exe’
Rules:
gf=0

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

I just tested this and it works only with a major issue to what the intended purpose is :wink: :

Currently it forces ableton open which is not what I want.

Usually, i’ll have my project (DAW) open all day long + bome running in the background. Whenever I have emails/quick sms/ or any kind of typing to do outside of ableton, I would like the translators to NOT get triggered.
Otherwsise, my letter ‘S’ gets translated to CTRL-E and it messes up whatever i’m doing.

Of course I could have a different shortcut (something less used) but it defeats the purpose of having my custom shortcut similar to other DAWS/video software i’m using.

I can always toggle the ‘GO’ button on/off in bome with a mouse click but that is rather annoying. Maby I could have a quick keyboard shortcut for toggle on/off Bome??

Are you on Windows or Mac.

If Windows, you might want to consider AutoHotKey
If Mac, you might look at Keyboard Maestro

In either case, sending a keystroke to a given application usually means the application needs to be open and focused and not in the background.

I believe with AutoHotKey you can:

  1. Open the App and give it focus.
  2. Send the keystroke
  3. Minimize the App

You can also ignore the ‘s’ keystroke if the app is not open or even just pass the s on to whatever other application is focused.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

i’m on windows!

I’ll check your recommandation, i’ve seen autohotkey’s name surface a couple of times!

Ideally though, I would of done everything in bome. If there’s no way in Bome to prevent the shortcut from opening the app (correct?), is there a way instead to have a simple keyboard shortcut for the GO button at the top right window of bome?

So you only want to send the keystroke when Ableton Live is the focused application? If it is not the focused application, you want to send a different keystroke? Are you triggering the keystroke with MIDI?

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

So you only want to send the keystroke when Ableton Live is the focused application.

Yes exactly

If it is not the focused application, you want to send a different keystroke?.

Not even! I just want my translation to happen when in ableton. Otherwise, my "s " key can stay the same for other apps normal typing.
Usually other DAWS allow for custom shortcuts, not ableton when it comes to their default keyboard shortcut. Thus the need for some translation (keystroke to keystroke)

Are you triggering the keystroke with MIDI?.

In the same project, I do have some other preset that have midi triggers (some are midi to midi, others midi to keystroke) but they are not problematic as I don’t touch my midi device while typing emails. Again, they are only needed when ableton is in focus.

I’m pretty sure this can be done with an AutoHotKey script.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Here is a script that should do what you want. I wrote it in AutoHotKey V1. It converts ‘s’ into Ctrl-E if Ableton Live is focused but send the native s if outside of Ableton Live. I’m not sure if you wanted the the other way around.

/*
Title: Key Convert to Control E
Description: Converts "s" to Control E but only when in Ableton Live
AutoHotKey_L Version: 1.1.09.00
Written by: Steven J. Caldwell
Last Update: 2024-03-13
Other Notes:
*/

;Start Code below this line
#NoEnv
if A_OSVersion in WIN_NT4,WIN_95,WIN_98,WIN_ME ; if not xp or 2000 quit
{
	MsgBox This script requires Windows 2000/XP or later.
	ExitApp
}
if %A_IsUnicode% 
{
	MsgBox % A_IsUnicode ? "Unicode not supported for this script" : "ANSI"
	ExitApp
}
;SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SendMode Event ; 
SetKeyDelay, 10
SetTitleMatchMode , 2 ; Look for partial matches
DetectHiddenWindows, On
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
App := "Ableton Live"
$s::
{
if WinActive(App)
	{
		send ^e
	}
else
	{
		send s
	}
Return
}


Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz