[Solved] Mapping Mouse Buttons


hmmm .. okay.. this is where im stumped

I added the three lines into the file

keycode 110 = Pointer_Button1 NoSymbol Pointer_Button1 <--- A Button for mouse button 1
keycode 117 = Pointer_Button2 NoSymbol Pointer_Button2 <--- X Button for mouse button 2
keycode 115 = Pointer_Button3 NoSymbol Pointer_Button3 <--- B Button for mouse button 3

And i use the accesibility option to toggle the keys on or off


On the desktop is works stunningly, but as soon as I start up VBA (or any emulator) A,X and B are non functional (eventhough mouse emulation is off and they do not operate as mouse buttons on the desktop

It seems (based on my experience that the three lines appearing in the pndXmodmap file, even if mouse emulation is not switched on, cause confusion with the emulators

In addition, removing the lines, does not cure the problem, unless one does a full reboot.

So ... is there an easier way to do this - Att he moment if I want the keys active I add the three lines, turn on mouse emulation on, and then reboot - If I want them off I remove the three lines, turn mouse emulation off and reboot

Even just being able to "reload" the pndXmodmap file would be helpful

Thanks


Any easier way?
 
http://boards.openpandora.org/index.php?/topic/290-mapping-the-mouse-buttons-to-axb/page__view__findpost__p__5138
 
ricki said:
http://boards.openpandora.org/index.php?/topic/290-mapping-the-mouse-buttons-to-axb/page__view__findpost__p__5138

Thanks ricki ... ill reply on the thread on the link
 
Last edited by a moderator:
Happy Days - Got it all to work, and learnt a load about linux - BONUS! :)

I now have two icons on the desktop (one to set the AB keys to left and right mouse / and one to restore the AB functions back so that the emulators all work) All this is done without rebooting - :)

Credit to ricki (xmodmap command) and urjman (thread and xkbset file)

Steps

1) Download the file xkbset from http://urjaman.dyndns.info/xkbset and save in your home directory (in your username is ABC then save in ABC [/home/ABC] ..EDIT - Ensure this can execute ie (chmod 777 xkbset)

2) Open the file browser and make two copies of .pndXmodmap (named .pndXmodmapb and .pndXmodmapnb) - If you cannot see .pndXmodmap go to view on the file menu and tick view hidden files

3) Open up .pndXmodmapb using file browser (just double-click - opens up in mousepad I think?)

Add the following two lines at the end

keycode 110 = Pointer_Button1 NoSymbol Pointer_Button1
keycode 115 = Pointer_Button3 NoSymbol Pointer_Button3

Save

4) Open up .pndXmodmapnb using file browser (just double-click - opens up in mousepad I think?)

Add the following two lines at the end

keycode 110 = Home NoSymbol Home
keycode 115 = End NoSymbol End

Save

5) Now open up a terminal window (System - terminal)

type cat > abmouse
#!/bin/sh
./xkbset m
./xkbset exp =m
xmodmap .pndXmodmapb
[Ctrl-d] <--- Dont type this actual press Ctrl-d

6) in the terminal window, type
chmod 777 abmouse

7) in the terminal window type (Remember - replace ABC with your username) - This creates the symbolic link
sudo ln -s /home/ABC/abmouse /home/ABC/Desktop

(you will be asked for the password, enter it)

8) Now open up a terminal window (System - terminal)

type cat > normouse
#!/bin/sh
./xkbset m
./xkbset exp =m
xmodmap .pndXmodmapnb
[Ctrl-d] <--- Dont type this actual press Ctrl-d

9) in the terminal window, type
chmod 777 normouse

10) in the terminal window type (Remember - replace ABC with your username) - This creates the symbolic link
sudo ln -s /home/ABC/normouse /home/ABC/Desktop

(you will be asked for the password, enter it)


and thats it !!!!

Your system will always start with normal AB functionality, but the two icons (symbolic links) allow you to switch function "on-the-fly"


Wicked! I find it 100000000000000000000% better with AB as mouse buttons, but as with all things its a personal preference!

(Lastly forgive my code/method/commands - any suggestions welcome - I am after all a n00b and proud of it!)

Next step is to PND it
 
Thanks for updating this thread as well, it is handy info.

EDIT: see post 8.......no doubt Lomaxx......it annoyed me as well also ;) My laziness was poor forum etiquette; I apologize to all, even those who didn't see the excessively long quote unnecessarily included.
 
TheDarkSpectrum48K said:
Next step is to PND it
Oh, yes, please.
I went through all the typing to get this to work, then my system crashed and needed reflashing.
I'm too pissed to type it all again, knowing I could lose it at a moment's notice.
I don't want to have to stop mucking about with my Pandora just because I don't want to lose my settings.

So, yes, a PND would be great!
 
Last edited by a moderator:
@xopher: Next time you reply to a thread, please only quote if it is necessary. It's quite annoying to scroll down that much to skip such a long text. There are two reply-buttons: One is directly below the post which automatically inserts the quote. It still can be deleted in the edit-box. Or you simply use the reply-button which is located a little lower. That doesn't quote anything.

You still could edit your thread and delete the quote, but i mainly wanted to mention all this to prevent this from happening frequently (also by other users).

Have fun.

Thanks for the documentation TDS48K.
 
Tried following the directions from above.
When I get to step 5 all is good until the line:

./xkbset m

This gives a permission error.

Any advice appreciated to this linux newbie.
Thanks,
j.
 
j.pickens said:
Tried following the directions from above.
When I get to step 5 all is good until the line:

./xkbset m

This gives a permission error.

Any advice appreciated to this linux newbie.
Thanks,
j.

hi there ... After downloading xkbset you need to give it permission to execute

chmod 777 xkbset

regards
 
Last edited by a moderator:
I tired the method, it never asks for a password after the 2nd part for normouse. I got the 2 icons on desktop, but they are not executable, just documents. Under settings-accessibilty-mouse emulation if I tick it, or if it is already ticked, I remove tick then tick it, it works, but after some minutes it stops. Then back to settings-accessibilty-mouse emulation untick-tick, it starts again. Can you suggest what's wrong? Also how do I remove the 2 icons from the desktop if I don't want to use it anymore? Thanks
 
Back
Top