touchscreen gestures

Asked by boutch55555 on 2009-10-31

Using a touchscreen, when I start the gesture (touch the screen + ctrl), it first makes a line from where my mouse pointer was, to the point where I intended to start the gesture.
Woult it be possible to add an option to drop the first mouse position ?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
gestikk Edit question
Assignee:
No assignee Edit question
Solved by:
Jonas H
Solved:
2009-11-02
Last query:
2009-11-02
Last reply:
2009-11-02
Jonas H (jonash) said : #1

I don't get what exactly is your problem. You press [Ctrl] and then move the mouse pointer - why don't you first move it and then press [Ctrl]?

boutch55555 (boutch55555) said : #2

Because when using a touchscreen, you will mostly touch to click. Apart from drag&drop and gestures, you will almost never move the pointer as you would with a regular mouse. It only jumps from a point to another.

Take this example : I have setup gestikk so that a Ctrl+horizontal swipe will do a window switching command (Alt+Tab). From this picture : http://www.greenhughes.com/files/nbr2.png, I click (touch) on the terminal icon. My gesture would be a line between the Graphics tab on the left to the Passwords icon on the right. But since my mouse pointer is still on the terminal icon, I first need to click (touch) the Graphics tab, then press Ctrl then click (touch) at the exact same place to start the gesture.

I have found a workaround : by changing the the starting value of the range (4 instead of 1) in line 199 of start_main.py-, it does the desired effect. On the osd, it would still show a line from the terminal icon to the graphics tab to the password icon, but since the first value is dropped, the gesture gets correctly recognized.

Jonas H (jonash) said : #3

Okay, I get it - the best way to solve this problem would be to throw away the first move of every gesture. I'll see if I still understand that old code and can make a patch for you :-)

Stay tuned.

Best Jonas H (jonash) said : #4

Don't do that range stuff, you might lose relevant gesture information doing that. Instead, add after line 206 in start_main.py:

gesture.pop(0)

So that the code looks like that:

gesture = remove_duplicates(gesture)
gesture.pop(0) # <- that's the new line
self.gesture_positions = []

Hope this helps.

boutch55555 (boutch55555) said : #5

Yeah! It works! I still get the osd wrong, but dont plan using it anyway... thanks for the quick help ;-) A touchscreen checkbox in the config pane would still be nice.. But as far as i'm concerned, it's resolved.

boutch55555 (boutch55555) said : #6

Thanks dauerbaustelle, that solved my question.