LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-26-2009, 01:21 AM   #1
senjak
LQ Newbie
 
Registered: Sep 2008
Location: New Hope, MN
Distribution: debian
Posts: 9

Rep: Reputation: 0
Question swap button 2 and button 3 in xterm and terminal only?


Hello!

Long ago I remember actually seeing a thread somewhere that actually answered the question; however, I haven't had any luck finding the answer lately.

Looking for what file I need to modify, along with the lines necessary in order to swap buttons two and three in xterm and terminal only. I'm running a vary vanilla Ubuntu with the default gnome window manager.

Thanks for any help you can give.

Senjak
 
Old 09-26-2009, 06:48 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Not sure about the terminal - probably something with xkb - as far as xterm, you can do something like the following in ~/.xresources (or whatever your file is called):

Code:
XTerm*VT100.translations: #override\
               !Ctrl <Btn2Down>:popup-menu(vtMenu) \n\
          !Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \n\
!Lock Ctrl @Num_Lock <Btn2Down>:popup-menu(vtMenu) \n\
    ! @Num_Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \n\
         ~Ctrl ~Meta <Btn2Down>:ignore() \n\
                Meta <Btn2Down>:clear-saved-lines() \n\
           ~Ctrl ~Meta <Btn2Up>:insert-selection(SELECT, CUT_BUFFER0) \n\
               !Ctrl <Btn3Down>:popup-menu(fontMenu) \n\
          !Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \n\
!Lock Ctrl @Num_Lock <Btn3Down>:popup-menu(fontMenu) \n\
    ! @Num_Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \n\
         ~Ctrl ~Meta <Btn3Down>:start-extend() \n\
             ~Meta <Btn3Motion>:select-extend()
except switch Btn2 and Btn3. The xterm manual has the complete translation table and there might even be an easier way to directly switch the buttons. The easiest way would be with xmodmap, but that would do it for all apps. Not even going to ask why you want this.
 
Old 09-26-2009, 11:34 PM   #3
senjak
LQ Newbie
 
Registered: Sep 2008
Location: New Hope, MN
Distribution: debian
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks, that gives me a good place to start.

As to why,

Button 2 on my mouse is under the wheel. Getting it to click can be annoying.

Thanks for the assistance!

Senjak
 
  


Reply

Tags
button, xterm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with gnome's shut down button (red button) alaios Ubuntu 1 09-10-2008 04:25 PM
Mutlipe text/button form, one submit button bappreacher Programming 8 06-27-2006 08:07 AM
make thumb button/third button double-click taboom Linux - Hardware 0 03-20-2006 02:39 PM
Vector 5.1 SOHO. Start button/K button, Sound card suseforge VectorLinux 0 01-30-2006 12:14 PM
Xterm: how to use right mouse button for scrollbar beforewisdom Linux - Software 0 06-22-2003 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration