MacBook Pro keyboard remapper

11 03 2007

Well it has been a very long time since my last post, I have kinda got out of blogging regularly, but I do still plan on posting at least every once in a while. Today I have a useful bit of software to share with you.

If like me, you are using your MacBook Pro to run Windows under BootCamp, you may have noticed a slight problem. Unless you have the full Apple BootCamp drivers installed, you won’t have full keyboard support, and even then you don’t get all the features you would probably like.

I found a very useful utility called Input Remapper, which provides support for the MacBook Pro keyboard when running under Windows, allowing you to control the volume, brightness and eject key as well as right-click while holding Ctrl.

Not only that, but it allows you to remap certain keys including swapping the ordering of the left 4 keys, for example, to swap the Fn and Ctrl keys round. I play first person shooters, and usually the duck/crouch key is Ctrl. On the MacBook Pro keyboard, where Ctrl usually is, there is the Fn key. So wouldn’t it be nice to make the Fn key behave as the Ctrl key? Well with this utility you can.

A few other nice extras include the ability to control your MacBookPro’s other settings, such as minimum/maximum display brightness, keyboard illumination settings, and fan speeds. Setting the fan speeds to max makes the computer a little bit loud, but makes it run icy cold, even when playing some pretty intensive games.

I’m guessing, but haven’t tried, that this will also work with the standard MacBook under BootCamp.

Input Remapper 1.0.02
Link: http://www.olofsson.info/index.html?inputremapper.html

Advertisements




IMAP and Mail.app

11 11 2006

IMAP: If you can you shouldMail.app

I’m here to talk about the Internet Message Access Protocol (IMAP) today. In the world of email there are basically two protocols: POP and IMAP.

POP is the original old faithful, but is very simple – you connect to your POP server, it sends you new messages, you download them and they are removed from the server.

The main problem with that is that the messages are now stored locally on your computer. Many people now use webmail of various types to connect in to their mailboxes, so if the messages have been downloaded, you won’t be able to see them anymore through the webmail.

Now most people probably will not find this a problem – and it isn’t if you only ever read your mail at home, on the same computer.

Enter IMAP. With IMAP, your emails are stored on the server and you connect to the server to download new messages, which are then cached on your computer for offline viewing. If you then connect in via a web interface, and delete some messages, when you next connect in from home, the mailbox is synchronised to reflect these changes.

This means you can organise your mail into different folders, and be able to see the exact same setup, regardless of your email client. Another really useful ability of IMAP is that it can request just the mail headers, allowing you to see the subject, sender, size and so on, without having to actually download the whole message.

Users of dial up who often receive large messages, will find this more useful than most, as it prevents them from wasting connected time (and money) waiting for large messages to download, as they can choose whether or not they want a particular email.

Thunderbird, Mozilla’s email client works with no further configuration, other than the account settings, but if you want to use the built in OS X Mail.app, then there are a few things to be aware of.

Mail.app and IMAP
Mail.app has issues with IMAP – it just doesn’t behave properly. Any folders you may have added to your IMAP account will either be missing or incomplete, and will disappear at seemingly random times!

After puzzling over this for some time I was worried that perhaps my email server host (1&1) didn’t fully support IMAP properly. So I installed Mozilla Thunderbird and tested it, only to see all my folders exactly as they should be.

So with 1&1 ruled out as the cause, I decided to move on to setup Mail.app to work with my Gmail account, while I puzzled over it. After setting Gmail up, suddenly, my original IMAP account started working perfectly!

So the solution to getting IMAP to work properly with Mail.app is to make sure you always have more than 1 account configured in it. After accidentally stumbling across this solution, I checked online for more advice, and apparently this is quite an old problem, stemming back to early versions of Mail.app, so who knows why it hasn’t been solved yet.

The only other thing you need to do when first setting up your IMAP, is tell Mail.app which of the server folders are to be used as the Inbox, Drafts and so on, or things will get a little confusing.

To do this, you just need to find each special server folder in the list, click on it, and choose ‘Use this mailbox for’ from the ‘Mailbox’ menu. Then select the appropriate option. Once this is done, you’ll have a fully working IMAP setup on Mail.app through OS X.





Tutorial: Index PHP Script Contents

15 10 2006

Note: The modifications described in this document require working with system files, so be careful and make sure you have backups of any files you change, just in case.

Until recently I ran an online strategy game set in space, which was written in PHP. When I switched, the latest version of Mac OS X was 10.3 (Panther). Searching files in Panther was a lot different, namely in that Spotlight wasn’t around back then.

Take for example, a situation which used to happen quite regularly, I would need to do a search for all PHP files in my web development folder, which contained certain text strings, such as ‘FIX THIS’ and so on. Basically text I had put there so I could come back to later.

In Panther, this worked a treat. If I did a search for “all php files in this folder, which contain the phrase ‘FIX THIS'”, the relevant PHP files would be listed.

When I upgraded to Tiger, I realised that the same search was not working – no PHP files were being listed at all, even ones I knew for sure contained that phrase. I had to do some reading to find out why Spotlight was evidently messing up.

In order to provide the almost instantaneous search function, Spotlight maintains a database of index files, along with their meta data and other things. Spotlight indexes most things, such as the file name, creation and modification dates, file size and so on for all files, but it doesn’t index the content of any files it does not know the type of.

To allow developers to add Spotlight support to their applications, Apple use what are known as ‘mdimporters’. These bits of code tell Spotlight how to behave with file types it doesn’t understand by default.

One of the existing Apple mdimporters it turned out was a plain text importer called ‘RichText.mdimporter’. Since PHP scripts are really just plain text files, surely this importer should be covering them?

Mdimporters, like standard applications, are actually special types of folders containing the required resources. Poking about inside the RichText mdimporter I found there was an ‘Info.plist’ file which seemed to contain various pieces of information, but most importantly it was defining which file types the mdimporter would cover!

So I added another entry to this list, to include PHP files, saved the plist and (after making a backup) replaced the original RichText.mdimporter.

Retrying my search nevertheless showed the same problem, despite the changes I had made. I decided the best way to see if my changes were working was to tell Spotlight to completely rebuild it’s index of my computer. A few Terminal commands later and Spotlight was busy at work doing just that.
Note that it can take Spotlight a while to rebuild a complete index, especially if you have lots of files on your computer.

When Spotlight was finished, I retried my search for the second time, and finally I had success!

So the following steps are necessary for Spotlight to begin indexing your PHP files:

  • In the Finder, click the ‘Go’ menu and choose ‘Go to Folder…’.
  • Type ‘/System/Library/Spotlight/’ and click ‘Go’.
  • Copy and paste the file ‘RichText.mdimporter’ to your desktop to edit.
  • Right click on the newly copied file, and choose ‘Show Package Contents’. A folder will appear.
  • Double click on ‘Contents’ within this new folder.
  • Right-click on ‘Info.plist’ and choose ‘Open With’ and then ‘Other…’.
  • Select TextEdit or your text editor of choice.
  • Locate the part of the file that looks like this:

PHP Spotlight Image 1

  • Add the code “public.php-script”, positioned as shown here:

PHP Spotlight Image 2

  • Save the file and close the ‘Contents’ folder.
  • You now need to replace the original ‘RichText.mdimporter’ with your updated version on your desktop. Make sure you backup your original first in case.
  • Finally, open up ‘Terminal’ – you can find ‘Terminal’ in ‘Applications’ under ‘Utilities’.
  • Type the following command and press enter:
    • mdimport -r /System/Library/Spotlight/RichText.mdimporter

After Spotlight completes the operation, you should find that PHP scripts are being indexed properly and can now be searched for by content!

Note: This post was originally created as an article. It has now been recreated as a normal post as part of my rearranging.





Switching: Emails

15 10 2006

Switching from Microsoft Outlook Express to Apple Mail

This is an article written to assist those users who wish to switch, or indeed have already switched from Windows XP to the Mac OS.

When it came to my ‘big switch’ there were several things that I needed: my documents, my music, my pictures and my internet stuff (emails and bookmarks and so on). All of these were easily copied across to the Mac using a crossover cable, no problems there – but shock horror, my emails were another story.

Most Windows users will be familiar with the free email application which comes with Windows XP: Outlook Express. When I was using Windows, I was using Outlook Express to manage my SMTP email account, just because it was there and did everything I needed – why bother downloading a suitable alternative product?

Anyway, it turned out that I couldn’t just do a straight copy and paste, as Outlook Express stores emails in a proprietary Microsoft format, which can’t be read by Apple Mail.

Wondering what to do about the problem, it was then that I remembered once installing Netscape to test compatibility of my web site. Netscape had very nicely offered to import the Internet and email settings from Internet Explorer and Outlook Express.

Checking up on this I found that when it does this it stores the resulting emails in a standard .mbox format – which can then be read by any sensible email client. After performing said conversion, I promptly copied the new .mbox files onto the Mac, fired up Apple Mail and pointed it in their direction.

So the basic steps to import your emails from Outlook Express on Windows to Apple Mail on the Mac:

  • Install Netscape on the Windows box.
  • Allow it to import from your Outlook Express when asked.
  • Copy the newly created .mbox files to your Mac.
  • Launch Mail.app and show it where it can find them when it asks.
  • That’s it!

Note that I only tested this myself with Outlook Express, I don’t think Netscape can import from the full version of Outlook, so if you use the full version of Outlook this method may not work for you.

Note: This article was previously posted on my personal blog, and was re-written slightly as an article on this blog. It has now been recreated as a normal post as part of my rearranging.





Quick Tip #4: Move Menubar Icons

2 10 2006

In Mac OS X the top right hand corner of the menubar holds a number of icons, usually controls for the built in AirPort and Bluetooth, a battery metre if it’s a laptop, a clock and Spotlight search.
Menubar icons
You can change the position of these icons by holding ⌘ (Cmd) and dragging them into their new positions. You can also use this method to remove an icon from the menubar; simply drag the icon off the menubar and let go of the mouse and the icon will disappear in a puff of smoke.

Since the Spotlight search icon is fixed, you can’t move or remove this icon.





Intel Macs with Windows: Audio Stuttering Tip

28 09 2006

If you’ve installed Windows on your Intel based portable Mac, and have experienced strange ‘stuttering’ in the audio output when you resize windows, open applications or basically do anything at all involving a bit of CPU work, then you may be able to fix it with the following tip:

Open ‘Control Panel’ and double click on ‘Intel(R) GMA Driver for Mobile’ choose ‘Display Settings –> Power Settings’ and then uncheck ‘Intel(R) Display Power Saving Technology’. Click ‘Apply’ followed by ‘OK’ and that should be it.

This problem is apparently caused by the Intel GMA screen power save mode, so disabling this mode should resolve the problem.

Credit to this tip goes to Matthias who posted it in a comment to the MacBook Pro with XP post.





iFact of the day

18 09 2006

As everyone knows, the letter ‘i’ has become integral to Apple’s brand image, and can be found positioned in front of almost all of their products.

What does it stand for though? Until very recently, I myself didn’t know, and had assumed that since it is mostly found in front of creativity applications, it was simply a synonym for ‘myself’ or ‘mine’ ie ‘my tunes’, ‘my photos’ and so on.

Original iMacIn actual fact, its origins stem from the release of the original iMac all the way back in 1998.

The iMac was designed to be an all-in-one, fully integrated computer, capable of connecting to the Internet right out of the box. The ‘i’ was added to the front of the ‘Mac’ brand name to signify this, so iMac is actually short for ‘Internet Mac’.

Now of course, the ‘i’ has evolved and is now used to represent high-tech consumer hardware or software and is also no longer used exclusively by Apple; several other companies have used the ‘i’ in their product names to reflect their purpose as a consumer oriented product. Another description which would fit an ‘i’ product would be ‘digital lifestyle product’.

Although Apple have now dropped the ‘i’ branding on the latest versions of their consumer notebooks, the iMac itself remains as their flagship consumer desktop computer, and probably will do for some time yet.