« February 2006 | Main

June 2006 Archives

June 11, 2006

I, Newbie

On Friday I bought myself a new laptop. I'd been quietly iCurious for a while and then vocally so for the last few weeks, so I bought myself a Macbook Pro. The last time I used an Apple for any length of time was over ten years ago (and the first time about 25 years ago!), and it seems like I haven't remembered much from that experience.

Everything seems so foreign that suddenly I feel like a complete newbie. Different GUI, a mouse with bits missing, and an even stranger keyboard. I guess I should try to remember this feeling.

The first thing I wanted to do was learn more about the hardware I had - hard drive, memory, video memory, USB hub details, etc. I looked around in the applications folder but I couldn't see anything obvious that would describe the hardware. I started up a bash shell to look for something like the /proc directory I'm used to in Linux, but couldn't find anything so I was only able to answer the basic questions (e.g. df -k to check the drive size). Eventually I found what I wanted: the System Profiler application. As it turns out, this application gets started when you click the More Info... button in the About This Mac dialog that is accessible from the apple menu at the top left corner of the screen. I didn't click that button first, though, and I don't think I even noticed it. The distraction of all the new stuff seemed to affect my ability to see what was right in front of me. That's worth remembering too, for the next time I see someone using one of my applications for the first time.

June 14, 2006

Cocoa Keyboard Coolness

One of the things that I've found difficult about adapting to OSX is the behaviour of the keyboard. It seems that each application requires different keystrokes to move the cursor to the end of a line or to scroll to the top of a page. The thing that annoyed me the most was that the page up key (ctrl-up or fn-up in the text editor application) does not move the cursor back by one page in the text editor. It scrolls the view buffer by one page, but doesn't move the cursor.

In my search for a solution to this problem, I learnt about a very cool feature of the Cocoa UI controls that newer OSX applications are built with: the key bindings can be altered system wide (or on an individual user basis). Just by editing some simple files, I have been able to make my Mac move the cursor up and down by a page in all applications that use a Cocoa text editing control - the text editor application, mail, and others. That's a nice fix, but what's even better is that I can add new functionality to all applications by describing sequences of actions to take on certain key presses. If you are a keyboard user with a Mac, I strongly recommend reading the following pages to learn how to do this:

I really don't like to have to reach for the mouse to perform a simple operation, especially on a laptop where the mouse pad is a nuisance to use. Eventually I'll learn shortcuts for all the things I do regularly, but in order to do this it helps to be able to explore the menus. In MS-Windows, Gnome, or KDE, I can always access application menus by holding down the ALT key and pressing the first letter of the menu item name. This doesn't work in OSX. The closest I've been able to find is to use Ctrl-F2 to move focus to the menu bar, then letter keys or the arrow keys to navigate around. Ctrl-F3 moves focus to the Dock, and Ctrl-F8 moves focus to the status menus at the top right of the screen.

The trick to enabling this behaviour on a new Mac laptop is to open the Keyboard & Mouse part of the System Preferences application, select the Keyboard tab, and select the checkbox labeled 'Use the F1-F12 keys to control software features'. You may need to press Ctrl-F1 to switch on this type of keyboard access. Having done this, you'll then need to use the fn key in conjunction with the function keys to access their hardware specific role, e.g. fn-F5 to increase sound volume. While you've got the System Preferences application open, you can also switch over to the Keyboard Shortcuts tab and select the radio button labeled 'All controls' at the bottom of the dialog. This will enable you to move between controls using the Tab button. When a dialog with buttons is presented, for example, you can tab to a button then use the space bar to press it.

About June 2006

This page contains all entries posted to no user serviceable parts inside in June 2006. They are listed from oldest to newest.

February 2006 is the previous archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33