<?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>Dae’s blog &#187; How to’s</title>
	<atom:link href="http://dae.cyberic.eu/blog/categories/technical/how-tos/feed/" rel="self" type="application/rss+xml" />
	<link>http://dae.cyberic.eu</link>
	<description></description>
	<lastBuildDate>Sun, 11 Jul 2010 16:03:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Select input language by Caps Lock in Mac OS X</title>
		<link>http://dae.cyberic.eu/blog/select-input-language-by-caps-lock-in-mac-os-x/</link>
		<comments>http://dae.cyberic.eu/blog/select-input-language-by-caps-lock-in-mac-os-x/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 11:38:41 +0000</pubDate>
		<dc:creator>Dae</dc:creator>
				<category><![CDATA[How to’s]]></category>
		<category><![CDATA[caps lock]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[increasing productivity]]></category>
		<category><![CDATA[keyremap4macbook]]></category>
		<category><![CDATA[mac os]]></category>
		<category><![CDATA[pckeyboardhack]]></category>

		<guid isPermaLink="false">http://dae.cyberic.eu/?p=593</guid>
		<description><![CDATA[(This article is as well available in Russian). I found a new way to bind input language (input source) switch to the Caps Lock button in Mac OS X. Unlike Kirgudu, the Russian application which is also able to do that, my &#8230; <a href="http://dae.cyberic.eu/blog/select-input-language-by-caps-lock-in-mac-os-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>(This article is as well available <a href="http://dae.cyberic.eu/blog/pereklyucheniye-yazika-vvoda-po-caps-lock-v-mac-os-x/">in Russian</a>).</em></p>
<p>I found a new way to bind <strong>input language (input source) switch to the Caps Lock</strong> button in Mac OS X. Unlike <a href="http://pihto.com/kirgudu">Kirgudu</a>, the Russian application which is also able to do that, my method works without a lag, so language changes instantly after pressing the Caps Lock button. This is especially important if you’re a fast typer: with Kirgudu, when you start typing right after pressing the Caps Lock, the first letters of a new word might appear in a previously selected language. (I.e. if you used English and Russian layouts, instead of <em>www.google.com</em>, you’d type <em>ццw.google.com</em>).<br />
<span id="more-593"></span><br />
The logic behind my method is: in OS X system settings, I bind input source selection to the F19 button (instead of default Cmd + Space — which you will still be able to use, by the way). Then, by the means of <a href="http://pqrs.org/macosx/keyremap4macbook/index.html">PCKeyboardHack</a> (driver patch with a “System Preferences” pane, written by Takayama Fumihiko) Caps Lock is remapped to F19. And of course, it will work regardless of your keyboard having a F19 key.</p>
<p>It should work on Mac OS X Leopard and Snow Leopard — but I don&#8217;t know about Tiger.</p>
<h3>Cons</h3>
<ol>
<li>You will not be able to toggle the Caps Lock mode anymore.</li>
<li>The green light on the button of your keyboard will not change as you change the input source — it will be lid constantly.</li>
<li>You will have to uninstall DoubleCommand and any other keyboard remappers.</li>
<li>This way is harder than simply installing Kirgudu.</li>
</ol>
<p>If you don’t like it later or something won’t work, you will always be able to revert changes. Every mentioned program has an uninstaller.</p>
<h3>Step-by-step guide</h3>
<ol>
<li>Download and install <a href="http://pqrs.org/macosx/keyremap4macbook/extra.html">PCKeyboardHack</a> (requires a reboot).</li>
<li>In System Preferences go to “Keyboard” → click the “Modifier Keys&#8230;” button and for Caps Lock choose “No action”.<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/caps-lock-no-action-en.png" alt="Caps Lock No Action" width="323" height="229" /></li>
<li>If your keyboard does have a F19 key, you may skip this step. Otherwise <a href="http://dae.cyberic.eu/wp-content/uploads/Simulate%20F%20keys.dmg">download</a> my application (actually, this is just a line of AppleScript wrapped into an application), which will press this button virtually. After downloading, unpack and mount the .dmg and drag “Simulate F19” to the Dock (temporarily).<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/simulate-f19-to-dock.png" alt="Simulate F19 To Dock" width="110" height="173" /></li>
<li>Switch to “Keyboard Shortcuts” tab in the same window, select “Keyboard &amp; Text Input” and find “Select the previous input source” (or “next source” — does not matter). Double click the shortcut to change it. Now, if you have F19 on your keyboard, just press it, otherwise press Simulate F19.app in the Dock (if your window lost focus, try once or twice again until the result: double click the shortcut field and press Simulate F19.app). Here is what you should get eventually:<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/bind-change-layout-to-f19-en.png" alt="Bind Change Layout To F19" width="481" height="245" />If it worked out, you can remove Simulate F19 from the Dock.</li>
<li>Return to the main window of System Preferences and choose PCKeyboardHack. Tick “Change Caps Lock” and in the “keycode” column change 51 to 80.<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/change-caps-lock-keycode-en.png" alt="Change Caps Lock Keycode" width="452" height="151" /></li>
</ol>
<p><strong>Done!</strong></p>
<h3>Additional information</h3>
<p><strong>If there is a noticeable delay,</strong> download and install <a href="http://pqrs.org/macosx/keyremap4macbook/index.html">KeyRemap4MacBook</a> (requires a reboot). Choose it in System Preferences, select “Mapping” tab, in search field type “capslock” and tick “Enable CapsLock LED Hack” thereafter. This is required to suppress <a href="http://support.apple.com/kb/HT1192">accidental activation protection</a>, used for the Caps Lock button in Mac OS X.<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/tick-caps-lock-led-hack-en.png" alt="Tick Caps Lock Led Hack" width="452" height="151" /></p>
<p><strong>For advanced users:</strong> instead of F19 you may use any other key in the range of F13–F19. To do that, in the third step choose an appropriate application (Simulate F13, Simulate F14 etc). And in the fifth step, instead of 80, you need to pick a keycode according to the following table:</p>
<table>
<tbody>
<tr>
<th>Button</th>
<th>Keycode</th>
</tr>
<tr>
<td>F13</td>
<td>105</td>
</tr>
<tr>
<td>F14</td>
<td>107</td>
</tr>
<tr>
<td>F15</td>
<td>113</td>
</tr>
<tr>
<td>F16</td>
<td>106</td>
</tr>
<tr>
<td>F17</td>
<td>64</td>
</tr>
<tr>
<td>F18</td>
<td>79</td>
</tr>
<tr>
<td>F19</td>
<td>80</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://dae.cyberic.eu/blog/select-input-language-by-caps-lock-in-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Переключение языка ввода по caps lock в Mac OS X</title>
		<link>http://dae.cyberic.eu/blog/pereklyucheniye-yazika-vvoda-po-caps-lock-v-mac-os-x/</link>
		<comments>http://dae.cyberic.eu/blog/pereklyucheniye-yazika-vvoda-po-caps-lock-v-mac-os-x/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 12:43:55 +0000</pubDate>
		<dc:creator>Dae</dc:creator>
				<category><![CDATA[How to’s]]></category>
		<category><![CDATA[caps lock]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[increasing productivity]]></category>
		<category><![CDATA[keyremap4macbook]]></category>
		<category><![CDATA[mac os]]></category>
		<category><![CDATA[pckeyboardhack]]></category>
		<category><![CDATA[на русском]]></category>

		<guid isPermaLink="false">http://dae.cyberic.eu/?p=572</guid>
		<description><![CDATA[(This article is as well available in English). Я нашел новый способ «повесить» на клавишу caps lock переключение языка (раскладки) в Mac OS X. В отличие от программы Kirgudu, которая тоже умеет это делать, мой способ работает без задержек, то &#8230; <a href="http://dae.cyberic.eu/blog/pereklyucheniye-yazika-vvoda-po-caps-lock-v-mac-os-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>(This article is as well available <a href="http://dae.cyberic.eu/blog/select-input-language-by-caps-lock-in-mac-os-x/">in English</a>).</em></p>
<p>Я нашел новый способ «повесить» на клавишу caps lock переключение языка (раскладки) в Mac OS X. В отличие от программы <a href="http://pihto.com/kirgudu">Kirgudu</a>, которая тоже умеет это делать, мой способ работает без задержек, то есть язык переключается практически моментально после нажатия. Это важно, если вы набираете быстро: в случае с Kirgudu, при быстром наборе после нажатия caps lock первые несколько букв могут напечататься на предыдущем языке. (То есть, например, вместо <em>www.google.ru</em> получится <em>ццw.google.ru</em>)<br />
<span id="more-572"></span><br />
Суть способа такова: в настройках сочетаний клавиш OS X смена языка назначается на клавишу F19 (вместо стандартного сочетания Cmd + Space, которое, впрочем, тоже можно оставить), затем с помощью <a href="http://pqrs.org/macosx/keyremap4macbook/index.html">PCKeyboardHack</a> (это патч к драйверу + интерфейс к нему в системных настройках, написанные Takayama Fumihiko) клавиша caps lock переназначается на эту самую F19. При этом совершенно не важно, есть ли у вас эта клавиша на клавиатуре или нет.</p>
<p>Это должно работать на Mac OS X Leopard и Snow Leopard, про Tiger не знаю.</p>
<h3>Минусы</h3>
<ol>
<li>Сам режим caps lock будет никак не включить.</li>
<li>Нет синхронизации текущего языка с зеленым огоньком на клавише (он будет гореть постоянно).</li>
<li>Перед применением придется избавиться от DoubleCommand и иных клавиатурных «ремапперов», если у вас такие имеются.</li>
<li>Этот метод сложнее в настройке, чем Kirgudu.</li>
</ol>
<p>Однако, если вам что-то не понравится или не сработает, всегда можно будет все вернуть на место. У каждой из устанавливаемых программ есть деинсталлер.</p>
<h3>Пошаговая инструкция</h3>
<ol>
<li>Скачайте и установите <a href="http://pqrs.org/macosx/keyremap4macbook/extra.html">PCKeyboardHack</a> (перезагрузитесь опять).</li>
<li>В системных настройках зайдите в «Клавиатуру» → вкладка «Клавиатура» → кликните по кнопке «Клавиши модификации» и для caps lock выберите «Никакого действия».<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/caps-lock-no-action.png" alt="Caps Lock No Action" width="371" height="230" /></li>
<li>Если на вашей клавиатуре в верхнем ряду присутствует клавиша F19, то вы можете пропустить данный шаг. В противном случае, скачайте мою <a href="http://dae.cyberic.eu/wp-content/uploads/Simulate%20F%20keys.dmg">программу</a> <em>(на самом деле, это просто одна строчка на AppleScript, обернутая в программу)</em>, которая эту клавишу нажмет виртуально. После скачивания, распакуйте образ dmg и перетащите «Simulate F19» из него в док (это временно).<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/simulate-f19-to-dock.png" alt="Simulate F19 To Dock" width="110" height="173" /></li>
<li>Переключитесь в том же окне системных настроек на вкладку «Сочетания клавиш» → «Клавиатура и ввод текста» → найдите «Выбрать предыдущий источник ввода» (или «следующий», не важно). Кликните дважды по месту, где указывается сочетание клавиш для данного действия. Затем, в случае, если на вашей клавиатуре есть F19, просто нажмите эту клавишу, в противном случае, нажмите иконку программы Simulate F19.app в вашем доке. (Если окно после этого перестало быть активным, просто повторите процедуру: кликните двойным кликом по сочетанию справа и еще раз нажмите на Simulate F19.app). В итоге должно получиться так:<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/bind-change-layout-to-f19.png" alt="Bind Change Layout To F19" width="481" height="245" />Если все получилось, иконку Simulate F19 можно убрать из дока.</li>
<li>Вернитесь в главное окно системных настроек, нажмите PCKeyboardHack. Поставьте галочку напротив «Change Caps Lock», а в колонке «keycode» поменяйте 51 на 80.<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/change-caps-lock-keycode.png" alt="Change Caps Lock Keycode" width="452" height="151" /></li>
</ol>
<p><strong>Готово!</strong></p>
<h3>Дополнительно</h3>
<p><strong>Если вы замечаете задержку</strong>, скачайте и установите <a href="http://pqrs.org/macosx/keyremap4macbook/index.html">KeyRemap4MacBook</a> (потребуется перезагрузка). После этого, откройте ее в системных настройках, затем выберите вкладку «Mapping» — там в строке поиска введите «capslock» и поставьте галочку рядом с «Enable CapsLock LED Hack». Это нужно для того, чтобы выключить предусмотренную Apple <a href="http://support.apple.com/kb/HT1192">защиту от случайных нажатий caps lock</a>.<img class="centered" src="http://dae.cyberic.eu/wp-content/uploads/tick-caps-lock-led-hack.png" alt="Tick Caps Lock Led Hack" width="452" height="151" /></p>
<p><strong>Для продвинутых пользователей:</strong> вместо клавиши F19 может выступить любая другая клавиша в диапазоне F13–F19. Очевидно, что для этого нужно на третьем шаге выбрать соответствующую желаемой клавише программу (Simulate F13, Simulate F14 и т.д.) А на пятом шаге, вместо 80 нужно будет поставить keycode в соответствие с таблицей:</p>
<table>
<tbody>
<tr>
<th>Клавиша</th>
<th>Код</th>
</tr>
<tr>
<td>F13</td>
<td>105</td>
</tr>
<tr>
<td>F14</td>
<td>107</td>
</tr>
<tr>
<td>F15</td>
<td>113</td>
</tr>
<tr>
<td>F16</td>
<td>106</td>
</tr>
<tr>
<td>F17</td>
<td>64</td>
</tr>
<tr>
<td>F18</td>
<td>79</td>
</tr>
<tr>
<td>F19</td>
<td>80</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://dae.cyberic.eu/blog/pereklyucheniye-yazika-vvoda-po-caps-lock-v-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Create an iPhone ringtone on Mac</title>
		<link>http://dae.cyberic.eu/blog/create-an-iphone-ringtone-on-mac/</link>
		<comments>http://dae.cyberic.eu/blog/create-an-iphone-ringtone-on-mac/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 00:58:27 +0000</pubDate>
		<dc:creator>Dae</dc:creator>
				<category><![CDATA[How to’s]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mac software]]></category>

		<guid isPermaLink="false">http://dae.cyberic.eu/?p=162</guid>
		<description><![CDATA[This “how to” will guide you through the process of making an iPhone ringtone from a mp3 file using free tools on Mac OS X. I&#8217;m pretty sure most of those steps can as well be reproduced on Windows, since &#8230; <a href="http://dae.cyberic.eu/blog/create-an-iphone-ringtone-on-mac/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This “how to” will guide you through the process of making an iPhone ringtone from a mp3 file using free tools on Mac OS X. I&#8217;m pretty sure most of those steps can as well be reproduced on Windows, since both applications we&#8217;re going to use — Audacity and iTunes — exist for both systems.<br />
<span id="more-162"></span></p>
<h3>Step 1</h3>
<p>Download and install <a href="http://audacity.sourceforge.net/download/">Audacity</a> and <a href="http://manual.audacityteam.org/index.php?title=FAQ:Installation_and_Plug-Ins#How_do_I_download_and_install_the_FFmpeg_Import.2FExport_Library.3F">FFmpeg</a>. Both are free open-source programs: Audacity is a sound editor, and FFmpeg is a media converter, which will allow us to export ringtones into the AAC format required by iTunes.</p>
<p>After that we need to link Audacity to ffmpeg: launch Audacity, go to preferences and click the <strong>“Locate”</strong> button under “FFmpeg Import/Export Library”.<br />
<img class="aligncenter size-full wp-image-179" title="audacity-preferences-locate-ffmpeg" src="http://dae.cyberic.eu/wp-content/uploads/audacity-preferences-locate-ffmpeg.png" alt="" width="611" height="355" /></p>
<h3>Step 2</h3>
<p>Press File → Open (in Audacity, of course) and pick the audio track you would like to make a ringtone from. I&#8217;ve chosen “Mmmbop” by Hanson which is the ringtone of Dr. House in “House” TV series. Once the file is open, you will see something like this:<br />
<img class="aligncenter size-full wp-image-190" title="audacity-interface" src="http://dae.cyberic.eu/wp-content/uploads/audacity-interface.png" alt="" width="806" height="470" />The blue graphic is an audio track. You can click anywhere on it to set the position to play from or you can select fragments of it to edit them.</p>
<p><strong>Press the space bar</strong> (or the green right arrow button in the topmost controls) to play your track.</p>
<h3>Step 3</h3>
<p>Now we can actually start making the ringtone. iTunes has a 40 seconds length limitation for a ringtone, so you can&#8217;t just convert the whole track into it.</p>
<p>Take a look at <strong>“Audio Position”</strong> counter in the bottom of the window — when you hear the best position to cut your ringtone from, note down the time. After that, stop the playback and type the noted time into the “Selection Start” field, then switch the radio button from “End” to “Length” above the middle field and change the last number to 40. I&#8217;ve decided to cut the ringtone from 1 minute 40 seconds (mind the selection):<br />
<img class="aligncenter size-full wp-image-193" title="audacity-selection" src="http://dae.cyberic.eu/wp-content/uploads/audacity-selection.png" alt="" width="806" height="470" />Now copy the selection (Cmd+C), make a new Audacity file (Cmd+N) and paste the selected piece (Cmd+V). The new track might look totally different than it was in the original file: don&#8217;t be scared, you might need to zoom out a bit (Cmd+F to fit in window). You may now close the original file.</p>
<h3>Step 4</h3>
<p>Now let&#8217;s add some effects.</p>
<p><strong> First of all</strong>, iPhones have quiet speakers, so it&#8217;d be worth to amplify the ringtone to the maximum. Press Cmd+A to select the whole track, then in the top menu choose Effect → Amplify.</p>
<p>You will see a small dialog:<br />
<img class="aligncenter size-full wp-image-194" title="audacity-amplify" src="http://dae.cyberic.eu/wp-content/uploads/audacity-amplify.png" alt="" width="305" height="217" /></p>
<p>Tick “Allow clipping” and change “Amplification (dB)” to any positive value. You may experiment with preview to find the most suitable amplification value before the hisses are too strong. I&#8217;ve chosen 5.<strong></strong></p>
<p><strong>Secondly</strong>, I wouldn&#8217;t want a call to scare me or bother people around me, so I&#8217;ve changed volume in the beginning of the ringtone to grow gradually. To do the same, just select the first 10 seconds of the track and in the top menu press Effect → Fade In.</p>
<p><strong>Thirdly</strong>, the ringtone might play continuously several times before I pick up the phone, so I&#8217;ve also used the “Fade Out” effect on the last 5 seconds of the track to smooth the “discrepancy” between the end and beginning of it.</p>
<p>Eventually the track will resemble this:<br />
<img title="audacity-ringtone-result" src="http://dae.cyberic.eu/wp-content/uploads/audacity-ringtone-result.png" alt="" width="806" height="470" /></p>
<h3>Step 5</h3>
<p>Press File → Export. The program will ask you to set some meta tags, you may optionally specify “Artist Name” and “Track Title” — that would be enough:<br />
<img class="aligncenter size-full wp-image-196" title="audacity-metadata" src="http://dae.cyberic.eu/wp-content/uploads/audacity-metadata.png" alt="" width="437" height="357" />In file saving dialog, choose format: “M4A (AAC) Files (FFmpeg)” and as well click the nearby “Options” button to make sure the slider remains at 128.</p>
<h3>Step 6</h3>
<p>After saving your file, find it in Finder and change it&#8217;s extension from “.m4a” to “.m4r”:</p>
<p><img class="aligncenter size-full wp-image-208" title="rename-m4a-to-m4r" src="http://dae.cyberic.eu/wp-content/uploads/rename-m4a-to-m4r.png" alt="" width="166" height="106" />(If you don&#8217;t see extensions in file names, go to Finder preferences → “Advanced” tab → tick “Show all filename extensions”).</p>
<p>Double click your file to add it to iTunes. It should appear under “Ringtones” now.</p>
]]></content:encoded>
			<wfw:commentRss>http://dae.cyberic.eu/blog/create-an-iphone-ringtone-on-mac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
