bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swapping mouse buttons under X11


From: Reiner Steib
Subject: Re: Swapping mouse buttons under X11
Date: Sun, 10 Sep 2006 15:47:14 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

On Mon, Sep 04 2006, Christopher J. Madsen wrote:

> I got used to using Emacs on Microsoft Windows with w32-swap-mouse-buttons
> set to 't (which swaps mouse buttons 2 & 3).  I want to be able to get the
> same behavior on GNU/Linux & X11.

I wonder if you'd like to swap button 2 and 3 for the whole session
rather than only for Emacs.  I do this on my notebook (only two mouse
buttons) using xmodmap:

Xmodmap_mouse_132 ()
{
  local buttons
  buttons=`xmodmap -pp | sed -ne "s/.*There are \(.*\) pointer buttons.*/\1/p"`
  # useful e.g. for notebook with 2-button mouse:
  # let left button act as middle button and left+right as right button
  if [ "$buttons" -ge 4 ]; then
    xmodmap -e "pointer = 1 3 2 `seq 4 $buttons`"
  else
    xmodmap -e "pointer = 1 3 2"
  fi
}

Also note that in Emacs 22 (CVS) you can follow links with mouse-1
instead of mouse-2:

,----[ etc/NEWS in Emacs 22 ]
| *** You can now follow links by clicking Mouse-1 on the link.
| 
| Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2
| click to follow a link, whereas most other applications use a Mouse-1
| click for both purposes, depending on whether you click outside or
| inside a link.  Now the behavior of a Mouse-1 click has been changed
| to match this context-sentitive dual behavior.  (If you prefer the old
| behavior, set the user option `mouse-1-click-follows-link' to nil.)
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]