<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gustavo Dutra &#187; mmkeys.so</title>
	<atom:link href="http://gustavodutra.com/tag/mmkeys-so/feed/" rel="self" type="application/rss+xml" />
	<link>http://gustavodutra.com</link>
	<description>Um pouco de tudo, nada de pouco</description>
	<lastBuildDate>Thu, 29 Jul 2010 22:57:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Solucionando problema com mmkeys.so no exaile do archlinux</title>
		<link>http://gustavodutra.com/post/327/solucionando-problema-com-mmkeys-so-no-exaile-do-archlinux/</link>
		<comments>http://gustavodutra.com/post/327/solucionando-problema-com-mmkeys-so-no-exaile-do-archlinux/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 00:23:52 +0000</pubDate>
		<dc:creator>Gustavo Dutra</dc:creator>
				<category><![CDATA[Nerd]]></category>
		<category><![CDATA[Software Livre]]></category>
		<category><![CDATA[arch linux]]></category>
		<category><![CDATA[archlinux]]></category>
		<category><![CDATA[dicas]]></category>
		<category><![CDATA[exaile]]></category>
		<category><![CDATA[hotkeys]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mmkeys.so]]></category>
		<category><![CDATA[xev]]></category>
		<category><![CDATA[xkeys]]></category>
		<category><![CDATA[xmodmap]]></category>

		<guid isPermaLink="false">http://gustavodutra.com/?p=327</guid>
		<description><![CDATA[As hotkeys, ou teclas de atalho, sempre são úteis para quando você está escutando uma música e alguém lhe pergunta algo, ou precisa ir no banheiro ou precisa passar a música porque a atual é ruim. O exaile sempre foi meu player preferido. Simpatizo muito com ele. Para as teclas de atalho sempre utilizei o [...]]]></description>
			<content:encoded><![CDATA[<p>As <strong>hotkeys</strong>, ou teclas de atalho, sempre são úteis para quando você está escutando uma música e alguém lhe pergunta algo, ou precisa ir no banheiro ou precisa passar a música porque a atual é ruim. O <em>exaile</em> sempre foi meu player preferido. Simpatizo muito com ele. Para as teclas de atalho sempre utilizei o plugin <strong>Xkeys</strong>.</p>
<p>Depois de atualizado o pacote exaile do <strong>ArchLinux</strong>, o plugin <strong>XKeys</strong> parou de funcionar e não aceitava mais minhas teclas de atalho do teclado para manipular áudio, como forward, backward, stop, play, etc.</p>
<p>Esse problema era antigo, ele acusava que era necessário a lib <strong>mmkeys.so</strong> e que não estava presente. Nunca tinha tempo pra verificar o problema, até que eu decidi ir atrás.</p>
<p><span id="more-327"></span></p>
<h2>Configurando as teclas</h2>
<p>O objetivo do post é solucionar o problema, mas para não ficar descontextualizado, vou mostrar como mapear as teclas. É fácil e biodegradável, não polui o meio ambiente.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">xev <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> keycode</pre></div></div>

<p>Vão vir linhas confusas a cada tecla pressionada. O importante é o número junto o &#8220;<strong>keycode</strong>&#8220;. Pegue o número da respectiva tecla e escreva em ~/.<strong>Xmodmap</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">keycode NUMERO = XF86AudioLowerVolume
keycode NUMERO = XF86AudioMedia
keycode NUMERO = XF86AudioMute
keycode NUMERO = XF86AudioNext
keycode NUMERO = XF86AudioPlay
keycode NUMERO = XF86AudioPrev</pre></div></div>

<p>Substitua o NUMERO pelo número do keycode que você detectou com o xev, acho que está claro o que cada um representa, né? Abra o arquivo ~/.<strong>xinitrc</strong> e adicione</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">xmodmap</span> ~<span style="color: #000000; font-weight: bold;">/</span>.Xmodmap</pre></div></div>

<p>Se você tiver preguiça de reiniciar a interface gráfica, pode digitar o comando acima para fazer as teclas funcionarem. Ai é só habilitar no exaile!!!</p>
<h2>Ajustando o Exaile</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pacman <span style="color: #660033;">-Ql</span> exaile <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> mmkeys</pre></div></div>

<p>Identifiquei que a mmkeys.so realmente não constava nos arquivos de instalação do <em>exaile</em>. Como o <em>pacman</em> guarda um cache das versões dos programas que eu instalei e atualizei, fui verificando os arquivos de cada uma delas atrás dessa lib, pois um dia isso havia funcionado.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pacman <span style="color: #660033;">-Qpl</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>pacman<span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>exaile-0.2.14-2.pkg.tar.gz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> mmkeys</pre></div></div>

<p>Esta foi a última versão que tem a dita lib (exaile /usr/lib/exaile/<strong>mmkeys.so</strong>) &#8211; aparentemente o problema veio da versão 3 em diante -, então bastou eu jogá-la para /usr/lib/exaile.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>exaile-src
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>pacman<span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>exaile-0.2.14-2.pkg.tar.gz <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>exaile-src
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>exaile-src<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>exaile<span style="color: #000000; font-weight: bold;">/</span>mmkeys.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>exaile<span style="color: #000000; font-weight: bold;">/</span>mmkeys.so
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>exaile-src</pre></div></div>

<p>Pronto! Não precisa nem reiniciar o exaile, apenas habilitar o plugin <strong>XKeys</strong> que ele irá reconhecer automaticamente as suas teclas de atalhos.</p>
<p>Não fui atrás para saber se é problema no empacotamento ou o quê, mas deve funcionar isto até sair uma outra solução.</p>
]]></content:encoded>
			<wfw:commentRss>http://gustavodutra.com/post/327/solucionando-problema-com-mmkeys-so-no-exaile-do-archlinux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
