Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another mouse emulation method. #168

Closed
MarekPasnikowski opened this issue Jan 28, 2017 · 18 comments
Closed

Another mouse emulation method. #168

MarekPasnikowski opened this issue Jan 28, 2017 · 18 comments
Milestone

Comments

@MarekPasnikowski
Copy link

It would be lovely to be have a different method to move the mouse with the touchpads and especially the gyro. Instead of doing it like the traditional touchpad approach, have the distance from midlle be speed of movement and the angle translate to direction of movement. This way one could control the cursor with the gyro. Right now it is impossible because the cursor is locked to the zero coordinates. I hope you get what I am trying to say.

@kozec
Copy link
Owner

kozec commented Jan 28, 2017

I think I do. Should it work in same way as currently does stick, when you set "Trackpad (Mouse)" on it?

@MarekPasnikowski
Copy link
Author

Oh yes. That's it. Only issue I have is that the default acceleration range is too little. For rapid rotation plenty of speed is needed at the edge. A small deadzone in the middle is also a good idea to let the finger rest on the pad or allow for some imprecision on gyro without moving the cursor.

kozec added a commit that referenced this issue Feb 1, 2017
…by tilting controller or using pad as stick. Ref #168
@kozec
Copy link
Owner

kozec commented Feb 1, 2017

So, there is no GUI yet, but if you are running from git, you can use custom action and set there something like

deadzone(8000, feedback(LEFT, XY(mouseabs(Rels.REL_X), mouseabs(Rels.REL_Y))))

for pad and

gyroabs(Rels.REL_Y, Rels.REL_X)

for gyroscope.

@kozec kozec modified the milestones: v0.3.6.7, v0.3.7 Feb 1, 2017
@MarekPasnikowski
Copy link
Author

Thank you. What is the maximum value for the deadzones?

@kozec
Copy link
Owner

kozec commented Feb 1, 2017

Thank you. What is the maximum value for the deadzones?

0 to 32767 for lower and 1 to 32768 for upper.

@MarekPasnikowski
Copy link
Author

Nice. By the way, what is the difference between "upper" and "lower" deadzone? Does the lower one correspond to negative axis value?

@MarekPasnikowski
Copy link
Author

I just pasted the pad line into the custom action field and got an error message "Unknown action 'mouseabs'".

@kozec
Copy link
Owner

kozec commented Feb 1, 2017

Did you skipped that bit about "running code from git" by any chance? :)

@MarekPasnikowski
Copy link
Author

I did. :)

@MarekPasnikowski
Copy link
Author

It was not obvious to me, as I do install from git; a newest release version. Anyway I pasted the line and now the right pad started giving the feedback, but there is still no movement of the cursor.

@kozec
Copy link
Owner

kozec commented Feb 1, 2017

I did. :)

That's OK, I skipped over deadzones question. It works like this:

deadzone
Only part between upper and lower deadzone is responsive.

@kozec
Copy link
Owner

kozec commented Feb 1, 2017

It was not obvious to me, as I do install from git; a newest release version. Anyway I pasted the line and now the right pad started giving the feedback, but there is still no movement of the cursor.

Two things to check. Try disabling and re-enabling emulation (stopping and starting scc-daemon) and try increasing sensitivity with sens(10, 10, ....rest of custom action... )

@MarekPasnikowski
Copy link
Author

Ah, I forgot that you can have two dead zones myself.
I tried copying the custom action from the stick (which does what I want) to the pad. Despite the action code being exactly the same, there is different result. So if I press top part of pad to simulate upward mouse movement, the cursor just trembles to the rhythm of my blood flow.

@MarekPasnikowski
Copy link
Author

OK, so I restarted the daemon and gyro started working (it has the second line pasted). The pad still sticks to the old behaviour.

@kozec
Copy link
Owner

kozec commented Feb 1, 2017

I tried copying the custom action from the stick (which does what I want) to the pad. Despite the action code being exactly the same, there is different result.

This will not work, because "mouse" acts differently for pad and for stick by dresign. I have yet to decide if it's bug or feature :)

OK, so I restarted the daemon and gyro started working (it has the second line pasted). The pad still sticks to the old behaviour.

That means something is broken :(

On my side, if I copy-paste first block from this comment above and just press OK, it works. If it doesn't on your side, could you save and post entire profile file somewhere? I'd like to check what went wrong.

@MarekPasnikowski
Copy link
Author

I double checked on my side and it turns out it was my mistake. I did something wrong while pasting and assumed it had the right thing pasted while it did not. I swapped the code too many times and lost track of it, apparently.
So yes - now it works and with sensitivity set to 5 it seems to have decent speed.
I realised one more thing for fine-tuning. My expectation is for the acceleration to have value of 0 at the end of lower dead zone and increase at constant rate until the upper dead zone is reached. Some others may prefer it to go differently.
Also, the gyro really needs a deadzone. While centering is possible, it requires constant attention. And if I put the controller on a table, it will end up in a non-zero position.

So thank you very much for the attention and quick reaction. The core of the issue is solved and the only thing left to do is some polishing of minor details.

@kozec
Copy link
Owner

kozec commented Feb 2, 2017

I realised one more thing for fine-tuning. My expectation is for the acceleration to have value of 0 at the end of lower dead zone and increase at constant rate until the upper dead zone is reached. Some others may prefer it to go differently.

That's actually pretty good idea. Now, when there is screenspace of entire deadzone tab available, I can add multiple modes and combobox to select them. I'll create another issue for that :)

@kozec
Copy link
Owner

kozec commented Feb 2, 2017

So, this can be found as "Mouse (Emulate Stick)" in both pad and gyro settings in git or in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants