Mapping the Mouse Buttons to A,X,B


thedarkspectrum48k

Still Fresh
Joined
Aug 29, 2010
Messages
15
Okay I have remapped my mouse buttons (and posted at gp32x ... not sure where to post .. but hoping here is ok?)


I added the three lines into the file pndXmodmap


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?
 
It should be possible to reload the .Xmodmap per command "xmodmap .Xmodmap" or in our case "xmodmap pndXmodmap". edit: Run this command in the folder where the pndXmodmap-file exists.
 
Last edited by a moderator:
It should be possible to reload the .Xmodmap per command "xmodmap .Xmodmap" or in our case "xmodmap pndXmodmap". edit: Run this command in the folder where the pndXmodmap-file exists.

excellent i will try this and then pnd the stuff up (my goal anyway)
 
Let me(us) know if this works, I don't have a Pandora, can't test myself.
 
Let me(us) know if this works, I don't have a Pandora, can't test myself.

Hi Ricki


sorry it has taken me so long to reply ... however have now tested.


* The pandora boots with normal mousebuttons to the right nub (not on ABXY) .. with mouse accesibility turned on by default


* Emulators are all working perfectly ABXY


* I then run your command "xmodmap .pndXmodmapb" (.pndXmodmapb is a copy of the file with the button mappings)


* It all works perfectly on the OS (mouse buttons are mapped to ABXY) / Emulators are rendered useless


* I then run your command "xmodmap .pndXmodmap" (.pndXmodmap is the original file)


* However this does not restore ABXY to the "normal" settings. its almost like becuase there where no new mappings, it leaves them as they are?


Do you or anyone know the commands I would issue to set them back to "button mode". I will then put this in the modmap file


Thanks for your help, and patience


dingoo
 
Last edited by a moderator:
Happy Days - Got it all to work, and learnt a load about linux - BONUS! :lol:


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 - :lol:


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]


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
 
Last edited by a moderator:
Thanks for your detailed description! I wanted to map the mouse buttons to abxy as well, now I don't have to fiddle with this, you already did ;) glad I could help a little.


//edit: imho it's worth an entry in the 'tipps, tricks, tweaks'-thread
 
Last edited by a moderator:
Happy Days - Got it all to work, and learnt a load about linux - BONUS! :lol:


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 - :lol:


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]


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
Will be trying this when I get home, as my right nub is touchy,


Cheers
 
I keep getting the message "./xkbset: command not found" on step 5.


ideas?
 
OK, I got the xkbset part to run. I checked its properties, and allowed it to be executable.


Now the problem seems to be the "cat > abmouse" and "cat > nomouse". the terminal just hangs when I entered the commands; I had to do a CTRL^C. Strange, because it didn't do that last time. Anyhow, it still doesn't work. I can get the A & B buttons to do some thing kind of like HOME and END, but not the mouse buttons.
 
Hey guys I just PND'ed this so grab it from the repo if you need it.

Many thanks to yourself & of course the darkspectrum48k. This works a treat and it makes a huge difference to the usability of the Pandora in a normal desktop environment. The pnd is great as I was not looking forward to having to do this every time I flashed the latest hot fix. :D


My suggestion for an improvement would be to have one icon which toggles the functionality of the right nub & ABXY buttons so in button mode Y would be double click, X would be middle click? and the nub would be Home, End, Page up, Page down.


Well worth a post in software news IMHO. Also well worth including as part of the next hot fix.
 
Last edited by a moderator:
I just downloaded the pnd, I can click the icons as much as I want, nothing happens.
 
Hi.


First: THANK YOU for this app!


Second: Is there a way to config that it will work automatically after any login?
 
Hi, I tried to do the trick (I added the abmouse to the session and startup menu) but it doesn't work. I'm probably TOO noob for this.
 
Did you tried the "pnd_run /path/to/the/pnd" in a terminal first, to ensure it works ?
 
Did you tried the "pnd_run /path/to/the/pnd" in a terminal first, to ensure it works ?

You need -1 after pnd_run, I seem to have made the pnd default to normal mouse not ab mouse.


"pnd_run -1 /media/PANDORA1/pandora/menu/abmouse" is what I use in my startup
 
It works! That "-1" makes the difference. THANKS.
 
Last edited by a moderator:
Back
Top