Old Issue - New request


milinks

Member
Joined
Mar 22, 2011
Messages
170
Hi, I've been running through a few issues regarding the fantastic Dosbox-Ex-Ura by Commander Beef, main problem being how to allow a custom dosbox config to override the dfault config, but the reason i am here, is trying to map the left and right shoulder buttons to the mouse buttons whilst playing Dosbox. I've read every topic in relation to this, and tried the workarounds and the advice, which seems to base itself on this theory:-

Okay, this is workaroundable without any kernel changes, but it's not 100% pretty (I'm only reporting in a "this is how it works for me"). Somebody dropped some info on the mousekeys feature on this or the another remapping thread, so this is the feature we're going to abuse. I wanted shoulders (L&R) as mouse buttons, so adjust accordingly. .pndXmodmap needs these lines (for mapping L = left mouse click, R = right mouse click, adjust keycodes if you want to use other keys, look up the keycode with eg. xev):

keycode 62 = Pointer_Button1 NoSymbol Pointer_Button1
keycode 105 = Pointer_Button3 NoSymbol Pointer_Button3
It'd be nice if you insert these to the appropriate numerical positions (or modify already existing lines with those keycode numbers, if you already have them mapped to something).
And note that these wont work out of the box, they're used only if the mousekeys feature is enabled (normally used for normal keyboard numpad = mouse). After "applying" the changes to the .pndXmodmap (reboot or logout+login might work...), you can fast test your mapping by opening the XFCE Accessibility settings and enabling mouse keys. There is still a little problem as in by default there is a timeout after which the feature (if unused) will be disabled, and the default enable trigger is something related to NumLock (i dont recall exactly). Since the pandora has no numlock key, and we dont want to waste a key, we need a way to disable the timeout. If it timeouts you can "workaround" by going to the Accessibility settings and flipping the checkbox on->off->on, but there exists a little utility called xkbset that can disable the timeout, but it isnt in Ångström repos (quite forgotten tool...). With all the stuff I had installed on my SD card system compiling it was a single call to make, so the compiled binary is http://urjaman.dyndns.info/xkbset <- there, it doesnt seem to need any special libraries, so I would guess it works on a standard OS.
Drop that to /usr/bin and make it executable. Then write a script like this (name and location is upto you):
#!/bin/sh
xkbset m
xkbset exp =m
Then add that script to the XFCE autostarted stuff (Session and Startup->Application Autostart), and you should have always enabled mousekeys feature.

Firstly, most links to xkbset i've found are dead, i've got xkbset.gz downloaded, and then  in the advice above it says make it executable, how do i do that? when i've unarchived the file i cant find it at all, it doesnt seem to be visible on my console. When it says write a script, including:

#!/bin/sh
xkbset m
xkbset exp =m

i apologise in advance but how do i do that? Please go gentle with me due to my stupidity :(
 
Last edited by a moderator:
Can you link the file you downloaded so we can see it ourselves?

Firstly, if it's a .gz file then it ought to be a plain gzipped file, not an archive of any sort, so gunzipping it should just generate a file with the same name, just lacking the .gz suffix, in this case just 'xkbset'.

To set it executable, use 'chmod a+x xkbset' to add the eXecutable flag for all users.
 
To run a program stored in the current directory add a period and slash before it, e.g. ./xkbset
 
Yep, though the instructions tell you to put the file in your path, so you wouldn't need the dotslash. Good tip if you want to try it out before installing it though.
 
Back
Top