Bulding xfce4-mixer with keyboard support

I am trying to set up ./audio/xfce4-mixer with --enable-keybind. I don't see a way to do this. According to the README in /usr/ports/audio/xfce4-mixer/work/xfce4-mixer-4.11.0,

Code:
Keyboard Shortcuts
------------------

The panel plugin optionally supports global keyboard shortcuts for raising and
lowering the volume, as well as muting the selected track if compiled against
libkeybinder. The plugin will then handle the XF86AudioRaiseVolume,
XF86AudioLowerVolume, and XF86AudioMute keyboard symbols.
.

I have built libkeybinder, and pkg info shows

Code:
keybinder-0.3.1  Library for registering keyboard shortcuts

I have done a make distclean, which evidently removes all of the preceding port build, and rerun make. The master Makefile in the port directory shows
Code:
OPTIONS_DEFINE= KEYBIND NLS
. however config.log in /usr/ports/audio/xfce4-mixer/work/xfce4-mixer-4.11.0 shows
Code:
  $ ./configure --disable-keybinder --enable-nls --prefix=/usr/local --localstat
edir=/var --mandir=/usr/local/man --infodir=/usr/local/info/ --build=amd64-portbld-freebsd10.2
What am I doing wrong? What can I do to get keybinder enabled?
 
Well, a week has gone by, with no response to this. My reading is that "you're on your own, pal."

I have gone into the compilation far enough to get a build with hot key support included, which compiled and linked OK. However, it does not seem to function. While going further (running the object under gdb, etc.) is well within my capabilities), I haven't devoted any real time to this. My objective is to get hot key control of audio volume similar to what is available on Sun Solaris using a Sun keyboard, which has hot keys specific to audio volume control. There are probably other ways to do this, that don't require invocation of a GUI and some serious post-build work to get the chosen hot keys to map properly for other keyboards.
 
It's like other forums, no response does not mean there's no interest (I'm interested), just that maybe nobody knows the answer. It's worth posting the question to the freebsd-xfce mailing list.
 
Oldrancher Did you enable the KEYBIND option in the port ( make config)? If I do this config.log shows
Code:
$ ./configure [b]--enable-keybinder[/b] --enable-nls --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/ --build=amd64-portbld-freebsd10.2
 
Tobik: yes. I had to go into the port source directory, run a make clean rerun ./configure, remove the stage files for the compile, and rerun make from the first directory to get it to compile. Checked config.log and captured the make output in a file, and saw that the keybinder code was compiled and linked in.

Next step is to run ctags on the source directory and on /usr/ports/keybinder directory. I can't find documentation on libkeybind functions, so will have to read the code and find some good places to set debugger breakpoints.

Some work with xev and xmodmap got the hotkey codes assigned.

This was my first foray into a FreeBSD port build specifics, and I think I know how to get the port to build with --enable-keybinder by default, but haven't tried it yet.

Right now, my FreeBSD system is down because of a hardware firewall failure that just happened. Bleh! Have to reconfigure a programmed backup for the correct IP's.
 
Oldrancher, I wonder why you need to run configure script. If you want support of multimedia keys try the following commands:

Code:
pkg delete xfce4-mixer
make clean ; make rmconfig
make config # select KEYBIND option
make install clean

Xfce4-mixer supports only 3 volume controls keys (other Xfce's applications support more multimedia shortcuts):
  • XF86AudioRaiseVolume
  • XF86AudioLowerVolume
  • XF86AudioMute
You need to know the keycode of each keys, simply run xev | grep keycode create .Xmodmap (it's just a plain text). For example mine looks like this:

Code:
! Multimedia keys map

keycode 160 = XF86AudioMute
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume

.Xmodmap is read by .xinitrc (that provides by x11-wm/xfce4-session) when you session starts. Otherwise you need to add xmodmap command.

One option /enable-keyboard-shortcuts needs to be changed:

xfconf-query -c xfce4-mixer -p /enable-keyboard-shortcuts -n -t bool -s true
 
olivierd@, thanks for the comments, particularly on how to trick the port's Makefile to configure as I need it.
For test, I've used xev and xmodmap to find the keyboard keycodes for the hotkeys and
get them to emit
XF86AudioLowerVolume
XF86AudioRaiseVolume
and used xev to assure that they were kicking the right codes.
I'll follow your suggestions for permanently modifying the assignments on xorg startup.
 
Back
Top