LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 09-26-2009, 02:21 AM   #1
senjak
LQ Newbie
 
Registered: Sep 2008
Location: New Hope, MN
Distribution: debian
Posts: 8
Thanked: 0
Question swap button 2 and button 3 in xterm and terminal only?


[Log in to get rid of this advertisement]
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
linuxubuntu senjak is offline  
Tag This Post , ,
Reply With Quote
Old 09-26-2009, 07:48 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware 13.0, -current
Posts: 3,887
Blog Entries: 1
Thanked: 27
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.
linuxslackware slakmagik is offline     Reply With Quote
Old 09-27-2009, 12:34 AM   #3
senjak
LQ Newbie
 
Registered: Sep 2008
Location: New Hope, MN
Distribution: debian
Posts: 8
Thanked: 0

Original Poster
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
linuxubuntu senjak is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 05:25 PM
Mutlipe text/button form, one submit button bappreacher Programming 8 06-27-2006 09:07 AM
make thumb button/third button double-click taboom Linux - Hardware 0 03-20-2006 03:39 PM
Vector 5.1 SOHO. Start button/K button, Sound card suseforge VectorLinux 0 01-30-2006 01:14 PM
Xterm: how to use right mouse button for scrollbar beforewisdom Linux - Software 0 06-22-2003 08:57 AM


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

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration