You are not logged in.

#1 2007-02-06 15:40:20

Izuil
Member
From: Sweden
Registered: 2006-10-07
Posts: 162

Exaile shortcuts/multimedia keys. How do I do?

How do I make multimedia keys work?
I know I have to download the source and build mmkeys but since I'm not pro I don't know how to do sad
If anybody helps me I'll change this post/topic to a How to.
As soon as I'm done smile

Offline

#2 2007-02-06 16:02:23

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Exaile shortcuts/multimedia keys. How do I do?

I'm not sure i follow you?
mmkeys is a library, included in exaile pkg. (/usr/share/exaile/mmkeys.so)
How did i find that out?

pacman -Qpl /var/cache/pacman/pkg/exaile-0.2.8-1.pkg.tar.gz

So if you've used mmkeys before, this time shouldn't be any diffrent.
(If you haven't, it is probably a setting in exaile gui)


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#3 2007-02-06 20:50:47

Izuil
Member
From: Sweden
Registered: 2006-10-07
Posts: 162

Re: Exaile shortcuts/multimedia keys. How do I do?

I have never used mmkeys before I'm pretty new to linux...
I can't seem to find it anywhere in the gui but you were right it was in: usr/share/exaile/mmkeys.so smile

EDIT: If you by mmkeys mean mmkeys.so then I've never used it but if you mean multimedia keys I have set it up and used them in amarok.

Last edited by Izuil (2007-02-06 20:52:17)

Offline

#4 2007-02-07 20:27:10

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Exaile shortcuts/multimedia keys. How do I do?

At first, i thought - why do they include global hotkey support (mmkeys), if there is no such utility to set hotkeys? But after some research, i found out how you can control exaile.
Apparently, if you fire up exaile, you can access it through command line, using switches, like this

exaile -a

which means "play".

So if you've got multimedia keys (or an ir remote+reciever hooked in) you have two (2) methods, and several options.

method 1;
run "xev" in a terminal. make sure the window you get with it is "active" or "focused" if you will.
press the keys you're interested in. in the terminal you will see it's keycode. a "play" button often have 162 as keycode, but you mileage may differ.
When you know all relevant keycodes, run gedit/kwrite/nano (whatever...) and map them like this.

keycode 162 = space
keycode 164 = s

if you like to map them to "space" and "s" which work great in for example totem/kaffeine. (you can even map to Shift_L+s if you want to)

or the generic

keycode 162 = XF86AudioPlay
keycode 174 = XF86AudioRaiseVolume

and map those shortcuts in totem/kaffeine as "alternative" shortcuts

save it as "/home/<yourusername>/xmodmap-keys.conf"
you will then to run this file with "xmodmap /home/<yourusername>/xmodmap-keys.conf" for example from gnome menu > system > configuration > sessions.

method 2;
this method applies to the option we have with exaile, where you need to run a command from a key on you keyboard.
install xbindkeys. run (as user, _not_ root) "xbindkeys --defaults > /home/<yourusername>/.xbindkeysrc".
now, run "xbindkeys -k". that will spit out something like this when you hit a multimedia key.

"NoCommand"
    m:0x0 + c:162
    NoSymbol

Now, NoSymbol means it's not mapped like ordinary keys. You can take the two upper lines and paste them in .xbindkeysrc (in your home directory), and substitute NoCommand with the command of you choice. like "exaile -a", that is "play":)
BTW, notice 162 number. Yeah, thats right. It's the same "play" key (keycode) as in my other examples.
If you chose to use methos nr 2, you have to run "xbindkeys" every time you log into gnome/xfce/kde. In gnome you can run it from gnome menu > system > configuration > sessions.

happy tweaking. If you wan't to know more, then just use "man xmodmap" and "man xbindkeys", and of course "exaile --help".


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#5 2007-02-07 22:11:31

Izuil
Member
From: Sweden
Registered: 2006-10-07
Posts: 162

Re: Exaile shortcuts/multimedia keys. How do I do?

Okey now all buttons except raise/lower volume and mute works... any idea?

Offline

#6 2007-02-07 23:15:22

Stalwart
Member
From: Latvia, Riga
Registered: 2005-10-18
Posts: 445
Website

Re: Exaile shortcuts/multimedia keys. How do I do?

{ 0, /*     Mute     */ XF86XK_AudioMute,       spawn,          { .cmd = "exec amixer set Headphone toggle" } }, \
        { 0, /*   Volume -   */ XF86XK_AudioLowerVolume,spawn,          { .cmd = "exec amixer set Headphone 4-%" } }, \
        { 0, /*   Volume +   */ XF86XK_AudioRaiseVolume,spawn,          { .cmd = "exec amixer set Headphone 4+%" } }, \

This is part of my dwm config


IRC: Stalwart @ FreeNode
Skype ID: thestalwart
WeeChat-devel nightly packages for i686

Offline

#7 2007-02-08 00:01:41

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Exaile shortcuts/multimedia keys. How do I do?

Okey now all buttons except raise/lower volume and mute works... any idea?

Yes, i have.

The fact is that, if you use method 1 and map those keys to XF86AudioRaiseVolume, XF86AudioLowerVolume, XF86AudioMute - the soundsystem might already be listening to such requests.
if not, then add those keys. Take a look on this excellent gentoo HOWTO (you got to love those gentoo guys...) http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#GNOME
This guide is very resourceful to anyone interested in what i've been explaining to you.


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

Board footer

Powered by FluxBB