Encoder to mouse position/down click/move l-R/up click

  • Q&A Forum
  • Encoder to mouse position/down click/move l-R/up click

I am new to MT and I am having some trouble getting encoders to make multiple mouse commands at a specific screen location.

I need mouse to move to a specific location on screen when the encoder is moved (same position on screen regardless of encoder direction), and then do a left down click-hold, move either left or right depending on encoder movement, and then left up click when the encoder stops moving.

My control device is an Arturia Beatstep, which allows the encoders to be either endless or absolute. I have been trying to make it work using them as endless, but if absolute would work better I could change that.

Any help would be great.

Marked as spam
Posted by (Q&A Forum: 1, Answers: 1)
October 3, 2017 9:10 pm
Private answer

Something like the attached should be pretty close.

There are several variables which are documented in “Init Global Variables” translator

Work Preset following translators

Mouse Move Start Position – Moves mouse to the defined start position

Mouse Move Click Down – Sets ga=1 (drag) after 50ms

Mouse Move – Controls the mouse position when in drag mode only. A lot of stuff is manged here. How much the controller has moved. How much to move the mouse based on scaled screen resolution

Start Drag Timer – Starts a 500ms (1/2 second timer)

Drag time – Determines if mouse has moved in the last 500ms an if stops moving kills the timer and and set ga back to zero

Drag Time – Release – Releases mouse button if g0-0 (non drag mode)

I can’t say it is perfect, but it should get you pretty close to where you want to go

To change starting position for drag, you will need to change the global variables gd (horizontal) and ge (vertical)



Independent Bome Programming Specialist

Bome Q&A moderator



Marked as spam
Posted by (Q&A Forum: 31, Answers: 2442)
October 4, 2017 7:54 pm

Hi Caleb, did this help?

( at October 6, 2017 8:35 pm)

Caleb, if this worked for you please mark as resolved otherwise, let me know how you are coming along.


( at October 9, 2017 11:36 pm)

HI Steve,
Sorry I have been unresponsive, but I have been out of commision with the flu. I will try it once I am feeling better and get back to you with the results. Thanks again for taking the time to help out.


( at October 11, 2017 4:18 pm)

OK, Caleb,
No hurry, get better first!

( at October 12, 2017 12:19 am)
Private answer

Hi Steve, thanks for the quick response.

What you describe is exactly what I am trying to do.

The down click could happen pretty much immediately after the cursor is placed into position. The mouse button would then stay down as long as the encoder is being moved.

Maybe there should be a slight delay before the “up click” kicks in, so that if there is any slight pause movement it still stays down and is only released when the movement is fully over.

I only need it to go left-right.

Anything that you can do to point me in the right direction with timers and global variables would be of great help. Thanks

Marked as spam
Posted by (Q&A Forum: 1, Answers: 1)
October 4, 2017 8:56 am
Private answer

Let me see if I understand it correctly.

When you touch the encoder initially (any movement) you go to a specific location on the screen, then left click down and move left or right from there depending of the encoder movement direction.
When the encoder stops moving, you want to release the left click.

Is this correct.

How long after first encoder movement do you want to wait until click down?

You will need to have a global variable that show what state you are in and change it with a timer.

So lets say if ga=0 then you move to your initial position on the screen.

Once it is there change ga to 1 and click down to put it into a “drag”state.

As long as it keeps moving within ??? ms, keep ga=1 . Set a timer to determine how long to wait until you set it back to 0, When ga goes to 0 then release the mouse click.

Is this describing the behavior that you are looking for? I assume you are only tracking left/right movement of the mouse. If you are using two encoders (one for up/down and another for left/right) it gets more complicated.

But the key is to use a timer to track mouse movement with a variable.

If this is what you are looking for, let me know and I’ll play around with it a bit for more help. If not, please clarify.


Marked as spam
Posted by (Q&A Forum: 31, Answers: 2442)
October 3, 2017 10:19 pm