trishume / linux-track

Automatically exported from code.google.com/p/linux-track
MIT License
0 stars 0 forks source link

mickey mouse tracking suggestions. #72

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
i have a trackir device and i have been using the mouse tracking of linux-track 
(mickey) in 'Absolute' mode and it works pretty well.

i am not sure if this project is still being developed anymore but i have a few 
suggestions to make it more usable:

-additional keyboard hotkey setup for left/right mouse buttons.

-hotkey setup for instant recenter.

-after 'Absolute' mode is calibrated with the calibration button it might be 
nice if you could further tweak it with a sensitivity slider.

-mickey could sort of auto-recenter when you move the mouse to the edge of the 
screen, if that makes any sense.

(this would not be as needed if there was a hotkey for instantly re-centering 
but i will try to explain anyways)
eg: if the mouse is at the right edge of the screen but you have moved your 
head even further to the right and then you move your head to the left the 
cursor would immediately move left and the tracking would be re-centered a bit 
to the right.
if i remember correctly, this is how the windows software for the original 
track ir worked.

Original issue reported on code.google.com by standard...@gmail.com on 1 Sep 2014 at 7:21

GoogleCodeExporter commented 9 years ago
Hi,
this project is still active, however given the circumstances (almost four 
years old twins and a two months old baby will take a fair bite of ones free 
time), the pace is not that fast these days...

Thank you for your suggestions, I really appreciate you taking time helping me 
to improve the software...

- Hotkey setup for mouse buttons should be fairly easy...

- Hotkey for instant recenter should be easy too (the recenter is done the way 
it is now to allow paraplegics and others with similar condition to use it)...

- Could you please elaborate a little bit more on the sensitivity slider 
adjustment in the absolute mode?

- The edge of the screen auto-recenter is interesting idea, but I'll have to 
think about it a little bit at first; my concern is this: what if there will be 
some interference for a moment, well outside of the normal head movement range 
and I'll adjust to it, then when the interference disappears and you'll find 
yourself pointing to the other side of the screen. There should be some 
safeguard against such a situation; maybe hitting the instant recenter might 
revert the setup to the state it was after the calibration (especially in 
absolute mode it would be stupid if you'd be left with part of the screen not 
reachable).

I can't guarantee much, but if things go well, after the weekend I might have 
at least some of these features implemented; anyway, I'll keep you posted on 
the progress...

Kind regards,

Michal

Original comment by f.jo...@email.cz on 2 Sep 2014 at 5:03

GoogleCodeExporter commented 9 years ago
hello,

i will try to explain what i mean about a sensitivity slider in absolute mode:

i assume (i could be way off) that the calibration process creates four x/y 
co-ordinates that sort of make up a tracking rectangle.  this tracking 
rectangle maps to your actual monitors rectangle such that when your gaze is 
within the tracking rectangle the mouse pointer will appear on your monitor in 
a relative position to it.

i believe calibrating with less head movement creates a smaller tracking 
rectangle and calibrating with more head movement creates a larger tracking 
rectangle.

in a sense, a smaller tracking rectangle means you have to move your head less 
to move the mouse pointer the same distance across the screen and thus you 
could say that a smaller tracking rectangle is more sensitive to head movement 
than a larger one.

so i guess a sensitivity slider would adjust the size of the tracking rectangle 
while keeping the centre of the rectangle intact.

you could even have a sensitivity slider for both the x-axis and y-axis which 
would adjust the width and height of the tracking rectangle respectively.

concerning edge screen auto-recenter, you bring up concerns and complications i 
had not considered and am not sure how to deal with exactly.
if you have access to an old trackir or a smartnav and the windows drivers for 
it i would suggest you check out how it's edge re-centring works.  otherwise i 
wouldn't worry about it as i can't even predict how useful such a feature would 
be.

Original comment by standard...@gmail.com on 3 Sep 2014 at 6:59

GoogleCodeExporter commented 9 years ago
Hi,

I'm sorry for the late response; I just wanted to let you know, that I'm 
working on it...

I had to rework the hotkeys handling to become Qt5 compatible and I did a few 
other changes, that should make things much easier and now you can also select 
much wider variety of hotkeys...

I'll let you know as soon as I have something workable...

Kind regards,

Michal

Original comment by f.jo...@email.cz on 15 Sep 2014 at 7:46

GoogleCodeExporter commented 9 years ago
Hello,
finally here are the new packages:

www.linuxtrack.eu/test/linuxtrack-0.99.mickeyupdate-64.zip
www.linuxtrack.eu/test/linuxtrack-0.99.mickeyupdate-32.zip

Please let me know what you think...
Kind regards,

Michal

Original comment by f.jo...@email.cz on 26 Sep 2014 at 3:04

GoogleCodeExporter commented 9 years ago
Michal,

wow, thanks.  this is great.

quick recenter hotkey is super useful whenever you shift in your chair or get 
up and sit back down in a slightly different location.

i also notice that, at least on the trackir 5 device i have, the start/stop 
hotkey now puts the device into some sort of sleep mode or something 
(the camera turns off and the LED lights turn from green to red) which is 
probably good although the red LED's on my device are kind of bright.

i think the default smoothness setting you had before was good but being able 
to adjust the smoothness with a slider is even better.

some more feedback:

1) minor bug i think:
if you select a hotkey and press 'ok',
then you go to change that hotkey but you press 'ok' without selecting a hotkey 
first it says:
"couldn't register new hotkey!"
and clears the hotkey from that function but the hotkey name remains listed in 
the menu which i suppose is misleading.
also, when you exit and restart mickey after doing the above the first hotkey 
you selected works again which means you can't really remove hotkeys.

2) pressing down on the the left mouse button hotkey performs a mouse click.
it would be more similar to an actual mouse if pressing down on the hotkey 
preformed a mouse down and releasing the hotkey preformed a mouse up.
the simple click is probably fine for most cases though.

3) the right mouse button hotkey does not appear to work for me in all 
situations.  i can't be sure but possibly it is emulating the middle mouse 
button instead? 
there is no middle button on my physical mouse so i can't properly test..

in the interim, i did find a way to get mouse button hotkeys to work by editing 
some config files and stuff:
http://linuxaleph.blogspot.ca/2008/11/mapping-middle-click-to-keyboard-key.html

4) i guess you changed how off screen tracking works?
if you, for example, move your head to the right, past the point where the 
cursor reaches the right side of the screen, then move your head back left, the 
cursor travels back left at a fraction (related to how far right off the screen 
you looked) of the normal speed until it reaches the centre of the screen at 
which point it returns to normal speed.
this behaviour is kind of neat but, personally, i do not think i prefer it.  
maybe a toggle checkbox?

Original comment by standard...@gmail.com on 28 Sep 2014 at 2:41

GoogleCodeExporter commented 9 years ago
Hello,

thank you very much for your feedback, I really appreciate it.

As far as the TrackIR5 status LEDs are concerned, you can set their brightness 
in the ltr_gui - on the first pane there is a slider for that...

For the rest:
1) I'll take a look at it...

2) If you have key autorepeat off, the function should be key down = button 
down, key up = button up... Usually autorepeat messes that up and unfortunately 
I haven't found any reasonable way around that (except ro turning it off)...

3) There is something wrong with the right mouse button - X seem to mess it up 
somehow (but not the left or middle); I'm currently trying to find out what is 
happening there...

4) I changet that as I understood that when you try to move the cursor beyond 
the screen boundaries, you want it to move as soon as you start moving back. 
Temporarily changing the "sensitivity/speed" was the only reasonable solution I 
could think of.
(the rationale was that there will be only minor "excursions", so the change 
shouldn't be too noticeable)... If needed there is no problem reverting to the 
old behavior...

Kind regards,

Michal

Original comment by f.jo...@email.cz on 29 Sep 2014 at 8:26

GoogleCodeExporter commented 9 years ago
good day,

totally missed the LED brightness slider, thanx.

you are right, i had auto-repeat keys on.  turning it off makes the left mouse 
button hotkey work as expected.

concerning off screen tracking:
i find that, for example, if you turn your head to look out a window or 
something it does create a major 'excursion' outside the screen and, for me at 
least, these happen quite often.

with the old behaviour, i think just pressing the quick recenter hotkey deals 
with most problems of looking off screen.

Original comment by standard...@gmail.com on 29 Sep 2014 at 6:31

GoogleCodeExporter commented 9 years ago
Looking out of the window was not one of the scenarios I tested - thank you for 
pointing that out...

In the meantime, when the cursor passes center of the screen, the 
speed/sensitivity returns back to normal...

As for the right mouse button, it seems that Qt is doing something weird there, 
so I'm working on another approach to make it work right with the respect to 
the right mouse button.

If things go well, I should be able to put new version toghether in the next 
few days - I'll keep you posted.

Kind regards,

Michal

Original comment by f.jo...@email.cz on 30 Sep 2014 at 5:24

GoogleCodeExporter commented 9 years ago
Hello,
I'm sorry it took me so long, but I finally managed to put together a new 
version...

As for the right mouse button emulation not always working, I'm afraid I can't 
make it work reliably. The thing is, that a hotkey is grabbed, and you press 
it, the application that has the focus currently receives several messages from 
X11; the right click message is somewhere in between them. The thing is, that 
some applications are probably confused with that and the messages coming after 
the RMB click make the menu go away. So far I was not able to figure out a 
reliable way of handling this problem. Some applications read directly scan 
codes from the keyboard, but I wouldn't want to do that as it might allow micky 
to be used as a key logger, which is not possible with the current 
implementation...

Here are the files:
www.linuxtrack.eu/test/linuxtrack-0.99.mickeyupdate1-64.zip
www.linuxtrack.eu/test/linuxtrack-0.99.mickeyupdate1-32.zip

Kind regards,

Michal

Original comment by f.jo...@email.cz on 10 Oct 2014 at 1:46

GoogleCodeExporter commented 9 years ago
Hey,

i tried hotkey setting and clearing and that seems to work fine now.

its cool about the mouse button emulation.  
this is still very useful.  i have not used a physical mouse in weeks.  thanx.

Original comment by standard...@gmail.com on 11 Oct 2014 at 3:37