Re: btnx: Send keyboard and mouse combination events with mouse buttons
I already posted this above, but it was embedded in a long message:
btnx SVN has a fix for a bug related to the earlier Hardy fix. Update even if you don't have problems (it will cause problems during command execution at least).
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Daou:
Thanks for the quick fix for the volume control. It works great. I can at least control my volume properly. I thought that I saw multiple clicks being sent.
As for the shell command to start banshee, it really doesn't work because banshee uses dbus. The problem with using the "su" command is that the DBUS_SESSION_BUS_ADDRESS environment variable is not passed along since the btnx daemon is running as root. If my shell script contains:
Code:
su -c "/usr/bin/banshee" user_name
and I run it from a terminal, then banshee starts up properly with dbus. If I invoke it through btnx where it is run as root so I don't have to enter a password, then banshee starts with a dbus error because the DBUS_SESSION_BUS_ADDRESS variable is not passed from my current session.
The other option is to change the command to
Code:
su -c "dbus-launch /usr/bin/banshee" user_name
Banshee excutes properly, but leaves around processes when I kill the program. Of course, I could get the PID of the two processes and kill them when banshee terminates, but that is not very clean.
Ideally I would like banshee to start with KEY_MEDIA, but that does not work for some reason. The next best solution is to run it as a command under my current user environment. As you discussed in the note on conversion to C++, that would require a significant rewrite to have the btnx daemon recognize the current user it runs under and provide the same environment. The problem was that just using the banshee command worked under Gutsy. Either something changed in Hardy or Banshee.
What are your thoughts? Perhaps you have better insight into a solution. My *NIX programming experience is over a decade old, and concepts like dbus are new to me.
The pause/play, next song, and previous song buttons don't work when I have them assigned to KEY_PLAYPAUSE, KEY_NEXTSONG, KEY_PREVIOUSSONG, repectively. I assume that you have those keycodes mapped to the XF86Free keys. Perhaps it is really an X issue more than a btnx. Once again it worked under Gutsy. Under Keyboard Shortcuts they are defined as the keycodes and not the XF86Free shortcuts. I tried disabling them, but it didn't work. Maybe there is a file I could modify to replace the hexcode with the proper shortcut.
Keep those trunks coming, and thanks for the shorter way to get those trunks.
Mark
Re: btnx: Send keyboard and mouse combination events with mouse buttons
I remapped the keybindings in Gnome using XF86AudioPlay, XF86AudioMedia, XF86AudioNext, XF86AudioPrev for the play/pause, Media, >>, and << buttons, respectively. Didn't work.
Just thought I would let you know.
Re: btnx: Send keyboard and mouse combination events with mouse buttons
All of my buttons now work with Banshee. I am not sure if a single one of these things fixed the problem or all of them, but the Media, Play/Pause, Song Forward, and Song Back buttons now work. To get it to work I did the following:
- Deactivated and activated the Multimedia Keys plugin in Banshee
- Mapped the XF86 actions to the keys in Keyboard Shortcuts
- Used xmodmap to map the keycodes to the XF86 actions
After restarting X and logging in, I could start Banshee with the Media key, play/pause selections, skip forward and back songs. I'm not sure why this works. Then again I don't understand how the key mappings and bindings work in Linux and X11. It seems convoluted and layered to me. In any case, I now have full use of my MediaPlay mouse.
:guitar:
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Daou:
There still may be some strangeness in the btnx trunk with Hardy and Banshee. I have to restart the btnx daemon, deactivate, and reactivate the multimedia extensions before they work. I cannot tell you whether it is definitely a btnx or Banshee problem. Sorry. :(
Mark
Re: btnx: Send keyboard and mouse combination events with mouse buttons
FYI,
I was unable to get btnx to work for me. I have a Logitech MX Revolution on a Dell XPS M1710 laptop (which of course also has a touchpad, plus an old wired USB mouse). btnx only recognized four of the buttons: wheel up/down and tilt left/right. All other buttons were unrecognized (although it did detect the second handler when I pressed the Search button, which is odd ...), and I'm sure I didn't have any conflicting xorg.conf settings or anything.
In the meantime I'm using the old-fashioned evdev approach (e.g., http://ubuntuforums.org/showthread.php?t=277388), which works with all of the buttons (although xmodmap didn't fix the reversed horizontal scroll for me--instead I had to specify HWHEELRelativeAxisButtons in the xorg.conf).
Re: btnx: Send keyboard and mouse combination events with mouse buttons
Hello. Installed btnx (0.4.6) lately on Ubuntu 7.10. Very nice piece of work!
At the moment I have only one problem: The wheel of my Logitech MX Revolution is loosing its configured state (configured in the revoco tab).
I think this is happening after screensaving the pc. Perhaps my laptop is falling to some suspend mode and the wheel is not reinitialized correctly after this? Is this a known bug or is there some solution for it?
If I restart btnx from btnx-config, the wheel is reconfigured again. Oh: And it's only the wheel, that is loosing its configuration.
Many thanks for btnx. It's even better then the SetPoint Software I used on Windows before, I think.
Re: btnx: Send keyboard and mouse combination events with mouse buttons
grischa, I think your answer lies with something Daou said in a previous post on a related subject:
Quote:
It's strange that some parts work and others don't. However, the revoco issue might be solved by making the mode permanent (I chose to use temporary revoco changes in btnx). I will probably change this in a later version.
It's probably a minor change in the code, so he might just take a few seconds and make those changes. Of course I can't speak for Daou, and I can't code, so I may be way off base here....
Re: btnx: Send keyboard and mouse combination events with mouse buttons
new issue:
everything works fine for the mouse
MS Intellimouse Explorer Wireless
i can program the buttons and that also works fine.
but when in FireFox when i click the small thumbutton (programmed to F5 refresh)
it also gives the menu as when you rightclick
i didnt program that tho and would like it to NOT do that. :)
any idea?
Re: btnx: Send keyboard and mouse combination events with mouse buttons
I Haven't been able to find a fix for this but i've managed to get btnx installed ok and I've checked the installs to make sure they're ok. the problem I'm having is that the btnx-config doesn't recognize my mouse at all :( I'm using a Logitech G5 my aim for using btnx was to get the left/right scroll working as well as my thumb button.
any idea's?