Posts tagged with keyboards

Make Home & End keys behave like Windows on Mac OS X

I’ve been using Mac OS X daily since 2001 when I purchased my Titanium PowerBook and I still can’t get used the home and end key behavior.

If, like me, you want Home to send you to the start of the line and not to the top of the document then create a file called DefaultKeyBinding.dict in your ~/Library/KeyBindings folder (might need to create that folder too) with the following contents:

  "\UF729"  = moveToBeginningOfParagraph:; // home
  "\UF72B"  = moveToEndOfParagraph:; // end
  "$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
  "$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end
  "^\UF729" = moveToBeginningOfDocument:; // ctrl-home
  "^\UF72B" = moveToEndOfDocument:; // ctrl-end
  "^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
  "^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end

This remapping does the following in most Mac apps including Chrome (some apps do their own key handling):

  • Home and End will go to start and end of line
  • ShiftHome and ShiftEnd will select to start and end of line
  • CtrlHome and CtrlEnd will go to start and end of document
  • ShiftCtrlHome and ShiftCtrlEnd will select to start and end of document

Note that you will need to reboot after creating this file for it to take effect.

If you have a PC keyboard with LED back-lighting and would like the scroll-lock, num-lock or caps-lock LEDs on when using your Mac check out my free SetLEDs for Mac


Windows media keys on a regular keyboard

Many full-size Windows keyboards come with extra buttons some of which are of questionable value but the volume and music controls are useful especially if you’re a programmer that likes to listen to music all day.

Unfortunately my two keyboards of choice (DAS Ultimate and Topre Realforce) do not come with such controls. Neither does my MacBook Pro but Apple do the elegant thing and re-purpose some of the function keys.

Apple media control keys

If only I could do that on my keyboards and take advantage of the Windows global music controls. (It also makes testing a bit easier if you support background music playback in your Windows Store apps). In fact Windows 8 even has a great little pop-up that comes up to show you what you’re doing:

Windows 8 music overlay

Thankfully with the help of the wonderful AutoHotkey you can. This great little tool lets you remap keys globally or per-app and even put some scripting and macro’s in place to really take control of Windows.

My keyboards don’t have a Fn key like the Mac but given the Windows key is the modifier for system shortcuts we can re-purpose that! Once you’ve unpacked and run AutoHotkey simply right-click on its system tray icon and choose Edit This Script then paste the following into the Notepad Window that opens and hit save:

; Windows Media controls in Mac positions

Now simply right-click on AutoHotkey and choose Reload This Script and enjoy Windows media controls on your laptop or regular keyboard!


In search of the perfect keyboard

I started programming at 12 and have been fortunate to carve out a successful career in something I love to do. People find it strange when I talk with passion about IDEs, fonts, color schemes, mice and keyboards.

To me it seems perfectly natural when you consider a writer has strong preference and passion for pens and notebooks and photographers spend a small fortune on specific lenses and cameras to get the shot they want.

For years I was happy with my Apple Pro keyboard and then one day found myself messing around with my Amiga A600 and realized my typing was faster and more accurate on the Amiga than on the PC.

Some prefer “ergonomic” split-keyboards, others are impressed by back lighting, LCD screens or even an OLED display in every key. Most reviews skip over the most important aspect – what it is like to type on.

IBM Model M

IBM Model M keyboardI have fond memories of typing away on the IBM XT, AT and 5150 terminals and I found myself at eBay eyeing up an original unused IBM Model M keyboard similar to the ones those machines used.

Whilst the keyboard uses a membrane each key has its own spring that buckles as the key is pressed. This gives a satisfying tactile click that saw typing speed further accelerate than on the Amiga. Each key comprises of two plastic parts, the main body and the outer shell or key-cap. This means you can easily re-arrange the keys or put on specialist caps.

The Model M is a joy to type on but isn’t without fault. I can live without the Windows keys but the keyboard sports a huge surround taking up masses of desk space, is incredibly heavy and sounds like a machine gun when you get going with it.

Matias Tactile Pro

The Mattias Pro keyboard Apple produced a legendary keyboard too, the Apple Extended Keyboard but this has some immediate drawbacks in that it uses the Apple Desktop Bus, so would need an adapter, and is also tricky to get hold of.

I settled on the Matias Tactile Pro which uses the same Alps switches for each key but comes in a more friendly USB version. Designed for the Mac it has some extra keys and helpfully each key shows the various extra symbols available with the Alt key.

The Tactile Pro is great to type on however it is even louder than the IBM Model M and only available in the US key-map which means it is a couple of keys short. The enclosure mimics that of the Apple Pro keyboard but uses an inferior plastic that feels cheap and does nothing to dampen the volume but does helpfully feature a two port passive USB hub.

Note: The Matias Tactile Pro is an OEM version of the Strong Man SMK-Power989X. Matias now have the Tactile Pro 2.

DAS Keyboard II

DAS 2 mechanical keyboard I’d heard some good things about the DAS Keyboard II which unlike it’s predecessor is also mechanical but uses individual switches from one of the original keyboard manufacturers, Cherry.

The DAS II is USB and is a little quieter than the other two keyboards but is still loud enough to annoy nearby co-workers and yet nicer to type on than the other two. One of the selling points of the DAS II is that each key is totally blank resulting in one black keyboard but I could take or leave it.

Where the DAS does fall down is the large echo-inducing enclosure and the cheap-feeling plastic used for both the keys and the surround.

Note: The DAS Keyboard is effectively a custom OEM version of the Cherry G80 series.

Apple ultra-thin wired

Apple aluminum scissor-switch keyboardI only picked up this keyboard a few days ago so my experience with it is not as extensive as the others which all got a fair work-in. Impressions so far are very good despite it being a scissor-switch like most laptops and not mechanical like the others.

The surround is an absolute minimum which is fantastic and it looks great. Noise levels are sufficiently quiet and the feeling very enjoyable despite the low-profile and gaps between the keys. The addition of a built-in USB hub is useful but MacBook Pro style light-sensitive back lighting would have been great.

Where next?

I’m sticking with the Apple at home for at least a couple of weeks and will continue to use the DAS at work for now. The Model M and the Matias are currently gathering dust in the cupboard.

I have already modified my DAS II by removing it from the enclosure and placing it on a soft sponge material. It is immediately much quieter with less echo and a soft wrist rest which solves some of the issues. Replacing the keys with a softer rubberized plastic would be great but injection molding is rather expensive.

Check out the GeekHack keyboard forum for like minded chat.


Hidden menu options on the Mac

Apple tends to hide away unusual functionality in order to keep the user interface easy to use.

Here are a few hidden menu options that magically appear when you press the Shift, Alt or Ctrl modifier keys.

The Apple System Menu

Standard menus

Apple menu

  • Alt > System Profiler… (Leopard only)
  • Alt > Shut Down (with no confirmation)
  • Alt > Restart (with no confirmation)
  • Alt > Log Off (with no confirmation)
  • Shift > Force Quit ? (current application)

File menu

  • Alt > Close All (in some applications)

Edit menu

  • Alt > Deselect All (in some applications)

Window menu

  • Alt > Minimize All
  • Alt > Zoom All
  • Alt > Arrange in Front


Finder menu

  • Alt > Empty Trash (no confirmation)
  • Alt > Secure Empty Trash (no confirmation)

File menu

  • Alt > Always Open With
  • Alt > Show Inspector (like Get Info but changes to reflect whatever you select)
  • Shift > Slideshow (Leopard only)
  • Shift > Add to Favorites
  • Shift > Find by Name… (Leopard only)
  • Ctrl > Open in this Window (Leopard only)
  • Ctrl > Get Summary Info

View menu

  • Alt > Clean Up
  • Alt > Keep Arranged By (Leopard only)

Go menu

  • Ctrl > Enclosing Folder in this Window (Leopard only)


Application running menu

  • Alt > Hide Others
  • Alt > Force Quit


Application menu

  • Alt > Private Browsing (no confirmation)

File menu

  • Alt > Close All Windows
  • Alt > Close Other Tabs

Bookmarks menu

  • Shift > Add Bookmark to Menu


Edit menu

  • Alt > Delete Page (no confirmation)

Insert menu

  • Alt > Custom Footmark…

QuickTime Player

Window menu

  • Alt > Show Movie Info


Photos menu

  • Ctrl > Hide Flagged Photos
  • Ctrl > Move Flagged to Trash
  • Alt > Clear All Flags

Events menu

  • Alt > Merge With Next


Buddies menu

  • Alt > Send Direct Message

Window menu

  • Ctrl > Logout Jabber List


File menu

  • Ctrl > New Empty File
  • Ctrl > Close Project
  • Alt > Open in Separate Editor
  • Alt > Reveal in Finder
  • Alt > Show Inspector
  • Alt > Save All…
  • Alt > Save a Copy As…

View menu

  • Alt > Zoom Editor In Fully
  • Alt > Split View Horizontally

Project menu

  • Shift > Ungroup

Run menu

  • Alt > Step Into Instruction
  • Alt > Step Over Instruction

Find menu

  • Shift > Find Previous
  • Shift > Replace and Find Previous
  • Alt > Find Select Regex in Project (Damn useful!)
  • Alt > Replace All


File menu

  • Alt > Save As…

Bookmarks menu

  • Alt > Open Bookmarks Window
  • Ctrl > Open All Changed Bookmarks

OmniGraffle Pro

Edit menu

  • Alt > Select None

Arrange menu

  • Alt > Bring Forward
  • Alt > Send Backward

Note: OmniGraffle Pro also toggles various toolbar buttons on Alt including lock/unlock and which side the utilities drawer slides out.

OmniOutliner & OmniFocus

View menu

  • Alt > Expand Line Completely
  • Alt > Collapse Line Completely

VMware Fusion

Virtual Machine menu

  • Alt > Start Up Guest
  • Alt > Shut Down Guest
  • Alt > Suspend Guest
  • Alt > Restart Guest


View menu

  • Alt > Show Inspector
  • Alt > Mark All

Window menu

  • Alt > Select Previous Active Panel
  • Alt > Select Next Active Panel


View menu

  • Alt > Reload All Tabs
  • Shift > Force Reload Page

Bookmark menu

  • Shift > Bookmark Current Page
  • Shift > Bookmark Current Tabs as Tab Group

If you like keyboard short cuts you might also want to check out KeyCue which can display all of an applications short cuts on in a single list when you hold down the Apple key including these key-modified options.

Heavy keyboard users may also want to head to the Keyboard & Mouse preferences pane where you can switch on full keyboard navigation allowing you to tab through all controls in a window. It also shows a number of useful key-navigation options you may not be aware of such as pressing CtrlF3 to select an item from the dock.