Friday, August 22, 2008

Firefox Tabbing in HTML Forms

Another OS X default behavior that has been causing me grief was manifesting itself in Firefox. If you are like me and you use the Tab key on your keyboard to cycle through form controls in HTML, I'm sure you feel my pain... Tab will skip the Submit button (and maybe other controls--admittedly I have not fully researched this).

To fix this behavior, open up System Preferences, click on the Keyboard Shortcuts tab, and check the "All controls" option from the radio buttons at the bottom of the window. Thanks to Robert Nyman's website for the tip.

Sunday, August 17, 2008

Windows-Style Application Switcher (ALT+TAB)

Another of the instantly annoying features of OS X that I quickly encountered was the behavior of the application switcher, which you use by pressing ALT+TAB in Windows or Option+TAB in OS X.

In Windows, the application switcher will switch between all windows on your system, minimized or not. In OS X, you have the following functionality:
  • Option+Tab: Cycle through all applications
  • Option+Tilde: Cycle through all open windows
  • Control+F4: Cycle through and bring to the forefront all windows
Not to mince words, I find that all of these options suck and are less productive than the Windows application switcher which will cycle through all Windows and only bring to the forefront the window that you select, and a quick ALT+TAB afterwards will switch back to your prior window (so you can easily flip back and forth between applications).

The OS X functionality was driving me crazy until I found Witch, which (no pun intended) will allow you to mimic the Windows application switching behavior in OS X. Unfortunately, although it is free to try it is not free to use, and will run you €9.95 (that's euros, not dollars). That said, in my estimation for a Windows switcher it is money well spent.

Once you install Witch, you will only have to change one setting to mimic Windows behavior, and that is in the Behavior section. Change the "Sort windows by" value to "window activity order," and that should do it. Additionally you may want to remap the Forward and Backward key combinations under Triggers » All applications depending on how you have laid out your keyboard.

Open Terminal Here

Since I have made the switch from Windows, I have really missed the XP PowerToy "Open Command Window Here," where you could open a command window in the exact folder that you were browsing in Explorer. Luckily, I was able to find a Mac substitute called "Open Terminal Here" which does the same thing in Finder, provided by Marc Liyanage on his homepage.

Installing the tool is a snap... just follow the directions in the description.

Saturday, August 16, 2008

For Windows Users: Remapping the Home and End Keys to Emulate Windows Behavior

One of the first annoyances I discovered in switching from Windows to OS X was that the Home and End keys did not behave like I expected. In fact, they operate differently than in any other operating system I have ever used.

Normally if you hit the home or the end key it takes you to the beginning or the end of a line of text, text box, whatever. In OS X, the home and end keys take you to the top and bottom of a page.

The good news is that the same beginning/end functionality can be replicated by using the up and down arrows in OS X. The bad news is there is just no way I am going to be able to train myself to stop using home and end, especially when I am so used to using these keys for software development or word processing in Windows, so I had to come up with a solution.

It turns out that the solution is a two-step process for Mac users who are running Firefox, and a one-step process otherwise.

Step 1: Changing the Default Home and End Key Behaviors in OSX

Reference: evansweb.info | mac os x home / end keys
  1. Open a Terminal (Applications > Utilities > Terminal)
  2. Change the directory to Library (type: cd Library)
  3. Create the KeyBindings directory if it does not exist (type: mkdir KeyBindings)
  4. Change the directory to KeyBindings (type: cd KeyBindings)
  5. Run Pico (type: pico)
  6. Paste the following text--including the curly brackets--into Pico (Command+V to paste)
  7. {
    /* Remap Home / End to be correct :-) */
    "\UF729" = "moveToBeginningOfLine:";
    "\UF72B" = "moveToEndOfLine:";
    "$\UF729" = "moveToBeginningOfLineAndModifySelection:";
    "$\UF72B" = "moveToEndOfLineAndModifySelection:";
    }
  8. Save the file (Control+O)
  9. Name the file: DefaultKeyBinding.dict
  10. Exit Pico (Control+X)
  11. Log out of OS X, and log back in
Step 2: Changing the Default Home and End Key Behaviors in Firefox for OS X

Reference: Mac OS X Hints | Change Home/End behavior in Firefox and Thunderbird
  1. Jar extract the contents of /Applications » Firefox.app » [Control-click and show package contents] » Contents » MacOS » chrome » toolkit.jar into a temporary directory. Do this by moving toolkit.jar to your Desktop, opening a terminal window (Applications » Utilities » Terminal) and changing directories to your desktop (cd /Users/[You]/Desktop). Then extract the archive with this command: jar xf toolkit.jar.
  2. Replace the file content » global » platformHTMLBindings.xml with this one.
  3. Recreate the archive (jar cvf toolkit.jar content/) and replace the original toolkit.jar in the Firefox "chrome" directory above with the new one on your Desktop.
  4. Quit and restart Firefox

iRich Switch

I am iRich, attempted switcher from Windows to OS X. I have recently purchased an iPhone and a Mac Mini, and am trying to migrate to the Apple Way after 15-some years of DOS and Windows. Truth be told I am an IT professional and an avid user of Visual Studio .NET so I will never be able to ditch Microsoft completely, but I am making an attempt to remove it as the centerpiece of my computing existence.

When I first plugged in my Mac Mini and fired up OS X, I quickly discovered that my world had been turned upside down. As a software developer I have become very fond of keyboard shortcuts, and rely on them for productivity... and none of my shortcuts worked anymore. I decided I had to do something about this, since there was no way in hell that I was going to unlearn 15 years of Windows behavior (not to mention that I still have to use a Windows box at work).

This blog is going to contain information on how to switch from Windows to OS X as painlessly as possible, by changing the default behaviors of the operating system to match more closely with what Windows users already know. It will also include basic information on how to get around in the system, getting around Apple roadblocks, and perhaps pleas for help on how to resolve a certain issue.

My benefit in doing this is that I will have a log of things I did to modify the OS or my behaviors to better suit the environment, and I can follow these posts step by step should I upgrade my Mac in the future or buy an additional box. Therefore, I'm not going to post every day and/or just for the hell of it... if there are no updates for a while, you can assume I'm finally happy with my new Mac. :)

Thanks for reading!