Custom Behavior, need help
Posted: Wed Aug 19, 2015 8:22 pm
Hello
I run into wall from my laziness.
What i'm after is, custom function/behavior, or not so custom, it's just me who doesn't know how to set it up properly.
One operation will be under 4th button of a mouse.
4th muse button = 4MB
targeted application (Lightroom) for which this behavior is needed = targetApp.
Is it possible to make this behavior, when im working in Lightrrom with brushes or spot removals, i need to press SPACE key (and keep it pressed) and drag image with Left Mouse Button (LMB).
So what im after is, press and hold 4th mouse button , do the dragging , release 4th button and cancel pressed space and release LMB.
And if i leave (roll mouse out of targetApp window, or if i press any mouse button outside of window of this application (loose focus)) Ligtroom app, this will trigger cancellation of aformentioned behavior.
I try to demonstrate in known language to me, unfortunately not applicable to such execution.
var 4MB = {SPACE}{LMB};
4mb.onPress = function():Void{
dragCanvasImage;
}
4mb.onRelease = function():Void{
KEY.Space.Release;
LMB.Release;
}
if(targetApp.Focus == "Lost Focus"){
// kill/Clear current state of 4MB, to the released state
KEY.Space.Release;
LMB.Release;
}
//code to detect app bounds and mouse position is larger than text inside if()
// so i used simpler notation
if(Mouse.position leave targetApp boundaries){
// kill/Clear current state of 4MB, to the released state
KEY.Space.Release;
LMB.Release;
}
Best Regards
Tom
I run into wall from my laziness.
What i'm after is, custom function/behavior, or not so custom, it's just me who doesn't know how to set it up properly.
One operation will be under 4th button of a mouse.
4th muse button = 4MB
targeted application (Lightroom) for which this behavior is needed = targetApp.
Is it possible to make this behavior, when im working in Lightrrom with brushes or spot removals, i need to press SPACE key (and keep it pressed) and drag image with Left Mouse Button (LMB).
So what im after is, press and hold 4th mouse button , do the dragging , release 4th button and cancel pressed space and release LMB.
And if i leave (roll mouse out of targetApp window, or if i press any mouse button outside of window of this application (loose focus)) Ligtroom app, this will trigger cancellation of aformentioned behavior.
I try to demonstrate in known language to me, unfortunately not applicable to such execution.
var 4MB = {SPACE}{LMB};
4mb.onPress = function():Void{
dragCanvasImage;
}
4mb.onRelease = function():Void{
KEY.Space.Release;
LMB.Release;
}
if(targetApp.Focus == "Lost Focus"){
// kill/Clear current state of 4MB, to the released state
KEY.Space.Release;
LMB.Release;
}
//code to detect app bounds and mouse position is larger than text inside if()
// so i used simpler notation
if(Mouse.position leave targetApp boundaries){
// kill/Clear current state of 4MB, to the released state
KEY.Space.Release;
LMB.Release;
}
Best Regards
Tom