Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: Guy on April 30, 2011, 03:02:55 AM

Title: Suggestion for 3.7rc1 - 2 button mice
Post by: Guy on April 30, 2011, 03:02:55 AM
You can paste with the mouse by clicking the middle mouse button.

If you have a two button mouse, you can run xvesa setup, to set it up so you can paste by clicking both buttons at the same time.

However, if Xorg is installed, xvesa setup won't run.

There are ways to get around this, but new users may find them difficult.


I suggest:

Preferred option
Have Tiny Core set up so you can paste with all mice by clicking the two buttons at the same time.

If someone can think of a reason why that is not a good idea, here is an alternate option.
Include a script, which runs independent of xvesa, and modifies .xsession in the same way as xvesa, so it can be run easily by new users even if Xorg is installed.
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: vinnie on April 30, 2011, 08:02:59 AM
with my netbook I use very often right+left click to emulate the middle button and I think it is useful set in default if it is not already in flwm
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: tinypoodle on April 30, 2011, 09:13:30 AM
Most unfortunately not with all touchpads left and right button could be pressed concurrently   >:(
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: vinnie on April 30, 2011, 10:18:47 AM
my touchapd has two buttons attached, my luck is that it is flexible :D
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: curaga on May 01, 2011, 10:43:43 AM
With the 2-button mode on, I believe the proper middle button is ignored, as well as the wheel.
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: Guy on May 01, 2011, 10:55:47 AM
Quote
With the 2-button mode on, I believe the proper middle button is ignored, as well as the wheel.

It could be set up so clicking the 2 outside buttons has the same action as clicking the middle button, without disabling the middle button or the wheel.
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: curaga on May 01, 2011, 11:05:18 AM
Right, but I don't think either Xvesa or Xorg supports such a config.
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: Guy on May 01, 2011, 11:36:54 AM
Quote
Right, but I don't think either Xvesa or Xorg supports such a config.

I don't know how difficult it would be to modify xvesa to support this. But if it could be done, it would make it easier for new users with a 2 button mouse.
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: Guy on May 20, 2011, 07:19:13 AM
Solved

To change to 2 button mouse, use this command

Quote
sed -i 's/-shadow -mouse/-shadow -2button -mouse/' ~/.xsession

To change to back to a 3 button mouse, use this command

Quote
sed -i 's/-shadow -2button -mouse/-shadow -mouse/' ~/.xsession
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: maro on May 20, 2011, 06:04:12 PM
Well, intrigued by all this "chatter" with the various assumptions (e.g. from reply #4: "With the 2-button mode on, I believe the proper middle button is ignored, as well as the wheel"), wishes (e.g. from reply #5: "It could be set up so clicking the 2 outside buttons has the same action as clicking the middle button, without disabling the middle button or the wheel") and so called "solutions" (e.g. from reply #8) I went ahead and did a little test myself: What happens to the functionality of a 3-button mouse (e.g. one with a wheel) when the '-2button' option is used in '~/.xsession'?

My finding so far is that it "Enable(s) emulation of a middle mouse button by chording" (quoted from a man page), but did not lead to the disablement of the 3rd button function. This stands in contrast to the assumption from reply #4, nevertheless it appear to fulfill the hopeful wish from reply #5. This finding makes sense insofar as there is another '-3button' option, which disables said emulation and appears to be the default setting. I even went as far as looking it up in the source code and that appears to confirm my assumption.

Therefore I'd like to suggest to consider changing the default in '/etc/skel/.xsession' to always include '-2button'. Of course this should be only done if more users (e.g. of the Core team) can confirm my findings.
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: Guy on May 20, 2011, 07:28:09 PM
I just did an experiment using a 3 button mouse while set up for a 2 button mouse.

I can paste with either the middle button, or the two outside buttons.

I agree. The default should be set to a 2 button mouse.
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: curaga on May 21, 2011, 03:52:51 AM
Does wheel scrolling also work with that option?

Left+right mouse button would conflict with Opera's mouse gestures (back/forward by default), but I guess I'd be in the minority with that. If the wheel scrolling works too, I would be ok with changing the default.
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: Guy on May 21, 2011, 06:26:32 AM
curaga

Would you mind testing it and see what you think?

To change to 2 button mouse, use this command

Quote
sed -i 's/-shadow -mouse/-shadow -2button -mouse/' ~/.xsession

To change to back to a 3 button mouse, use this command

Quote
sed -i 's/-shadow -2button -mouse/-shadow -mouse/' ~/.xsession
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: curaga on May 21, 2011, 06:36:13 AM
I don't have such a mouse right now :) Stuck on a laptop (touchpad).
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: Guy on May 21, 2011, 09:55:06 AM
Any others who use a 3 button mouse who can test this?
Title: Re: Suggestion for 3.7rc1 - 2 button mice
Post by: roberts on May 21, 2011, 10:16:57 AM
Works fine here. Tested on a Microsoft PS/2 style. Wheel still scrolls and functions as before. Same with a Logitech USB Optical. Adding the 2button clause does not interfere with either of these devices. Very good find. Very good suggestion.