Better Windows Keyboard Shortcuts

I've been using AutoHotkey for a while now. It's made my computer much easier to use.

You can use it to do several things, including:
  • Starting common programs without the mouse
  • Controlling your music and video programs
  • Making Mac shortcuts like Ctrl+Q work everywhere
  • Customizing application keyboard shortcuts


Installation


  1. Download and install AutoHotkey
  2. Create an empty file called shortcuts.ahk
  3. Create a shortcut to that file and put it in the Startup folder


You can then edit the script by right clicking on the green H icon in the corner of the screen and selecting Edit This Script, saving the file, then clicking Reload This Script.

Starting common programs


The Windows key is used for only a few things on a normal computer, such as Win+L to lock the screen. It's easy to add shortcuts for all your favorite programs, for example Win+F for Firefox, Win+I for iTunes, Win+N for Notepad, and so on.

Do this by adding a line like this

#i::Run C:\Program Files\iTunes\iTunes


to your shortcuts.ahk file.

The # means the Windows key (labeled with either a Windows symbol or the word Start), i means the I key, and C:\Program Files\iTunes\iTunes is the command to run when Windows and i are pressed together.

Another trick is to start a program in a maximized window, e.g.

#p::
Run C:\Program Files\PuTTY\PuTTY servername
WinWait, PuTTY
WinMaximize
return


Controlling your music and video programs


I use AutoHotkey to simulate the media buttons that some newer keyboards have, such as back, forward, pause, mute, and so on. I could buy a media keyboard, but I prefer a smaller keyboard that doesn't take up all my desk space.

You can either set it up to control the program in the foreground using something like:

#Left::Send {Media_Prev}
#Right::Send {Media_Next}


or tell it to control iTunes (even if the current window is Windows Media Player) using something like:

#Left::SendMessage, 0x319, 0, 0xC0000, , iTunes
#Right::SendMessage, 0x319, 0, 0xB0000, , iTunes


I also use these to control the volume everywhere:

#Up::Send {Volume_Up}
#Down::Send {Volume_Down}
#NumpadDot::Send {Volume_Mute}
#NumpadDel::Send {Volume_Mute}


Making Mac shortcuts like Ctrl+Q work everywhere


Since using Macs and Linux systems for a while, I find Ctrl+Q a more convenient shortcut to close the current program. A few Windows programs support this, but most of them use Alt+F4.

Adding this rule makes Ctrl+Q equivalent to Alt+F4.

^q::Send !{F4}


Customizing application keyboard shortcuts


I was trying out the Safari web browser, and it wasn't too bad, but the keyboard shortcut to change tabs is Ctrl+Shift+[. Firefox uses Ctrl+PageUp, which is more familiar and easier to press. Unfortunately, Safari doesn't let me change its keyboard shortcuts.

These rules check if the program is Safari then translate Ctrl+PageUp to Ctrl+Shift+[ and similarly for Ctrl+PageDown.

#ifWinActive ahk_class {1C03B488-D53B-4a81-97F8-754559640193}
^PgUp::Send ^+[
#ifWinActive ahk_class {1C03B488-D53B-4a81-97F8-754559640193}
^PgDn::Send ^+]


To find out the class id numbers, right click on the H icon, click on Spy, then click on the window you want to control.

Labels: , , ,

MOTORAZR V6 on Telstra Next G

I got a new phone for work yesterday, a Motorola MOTORAZR maxx V6. It seems to be a pretty good phone. Much better than I was expecting.

When I last used a Motorola several years ago, the menus were less intuitive than the Ericsson or Nokia ones. Now I feel that both of those have taken a step or two backwards, and the Motorola is no worse. The menu hierarchy is quite logical, and the keypad is very direct and responsive. It's definitely better than my Sony Ericsson Z610i, which is especially good considering it's only about 1 cm thick.

I tried to get it synchronizing my contacts and calendar with Linux. Unfortunately, it's quite a new phone, so it's not supported yet. Instead, I set up an account on ScheduleWorld and transferred my contacts over the internet using a protocol called SyncML, which most new phones seem to support. It worked well and didn't cost me anything other than the data costs.

It's on the Telstra Next G network, which offers broadband internet access, and has much better coverage than the other 3G networks. The phone and network also support HSDPA, which is supposed to offer download speeds of up to 14 megabits (14,000 kilobits) per second. So far the best I've got is 400 kilobits per second, but that's still fast enuff to do my work. I'm connecting to it as a GPRS modem over Bluetooth so I can access the internet from my laptop.

So far so good!

Update: December 31, 2007


The phone stops making and receiving phone calls after a while. A reboot makes it work again. The dealer is sending it back to Motorola to get it fixed. (It's running software version R26111VL-AS_U_96.66.74R.)

Labels: , , , ,

Safari for Windows

Apple have just released their famous Safari web browser for Windows. Probably not everybody has heard of it, but it's famous in geek circles for being the first web browser to pass the Acid test, meaning it supports the latest web standards, and should be a good browser for web developers to test on.

Of course, being from Apple, it should also provide a really good user experience. I downloaded it this morning to take a look.


Safari on Windows




The first thing you notice is it uses the familiar Apple brushed metal look. This is expected, but it doesn't fit in very well with the rest of the system. That said, I tend to run my browser full screen, so it's not so important that it look identical to every other application, only that it behave like them.

Unfortunately, this first release for Windows doesn't do that very well either. I counted fifteen annoying differences.

The worst ones:

  • the default fonts are very dark
  • the address gets messed up if you press Ctrl+L and try to type a new address while the home page is loading
    (the same thing happens in Internet Explorer and is the #1 reason I don't use it)
  • the Windows task bar can't be accessed if it's in auto-hide mode
    (Safari doesn't leave a 1 or 2 pixel buffer at the bottom so you can move your mouse to the bottom of the screen and see what other programs are open)
  • new windows aren't the same size as the current one
  • many keyboard shortcuts don't work on Blogger
    (I couldn't use Ctrl+C, Left, Shift+Home, or my Alt Gr key)
  • no shortcut to switch between two most recent tabs
    (like Ctrl+Tab in Firefox when using the LastTab extension)
  • many menu items appear in the Edit menu (where they would be on Mac) rather than a Tools or Options menu (where they should be on Windows)
  • you have to hold down the mouse button while selecting an item from a drop-down list
  • no proxy support (meaning I can't use Safari at work)
  • no way to fix any of this! (I reported these as bugs, but who knows how long they'll take to fix; Safari isn't open source and isn't extensible like Firefox)



Bug: Pressing Ctrl+L then typing too quickly



Some of these are problems with the browser itself, some with particular web sites, and others with the user interface toolkit Apple use to make their Mac applications run on Windows. It would also be nice if it offered to migrate my passwords from Firefox. There's no way I'm typing in my passwords again for all the sites I go to.

On the upside, it has some nice features such as highlighting the active text field on a form with a clearly visible blue border, and showing the page loading progress using a nifty blue bar that takes up the whole address bar (this feature inspired the Fission addon for Firefox). It's also nice that my web site looks fine!


My web site in Safari



On the whole, the browser is quite usable, and hasn't crashed on me yet, it's just lacking several features that I want before making it my default web browser.

Update: June 28, 2007


I just tried Safari 3.0.2 at work behind an authenticating proxy, and it works fine. It's just the proxy settings button is grayed out. Apparently it uses the operating system settings (Control Panel->Internet Options).

Update: November 20, 2007


Safari 3.0.4 was released today. It seems to fix the taskbar hiding bug, and new windows are now the right size. There's now a Ctrl+Tab shortcut. It doesn't work the way I want, but at least it's there. Blogger also seems to work, but it crashed the first time I tried. The Ctrl+L bug isn't fixed, and sometimes Ctrl+L doesn't do anything.

Labels: , , , ,

Free Fonts

My interest in fonts began a few years ago when I discovered Lucida Sans. It was embedded in a paper about Plan 9, an operating system by the creators of UNIX. It's a nice, easy-to-read font without serifs (the ornaments on fonts like Times New Roman) that isn't as boring as Arial or Helvetica.

I was trying to find out how I could get the font on my computer, when I discovered that the Sun Java package includes the original Lucida Sans fonts. I now make a point of installing Java on all of my computers, then copying the fonts from the lib/fonts folder into my system fonts folder.

Lucida Grande



There's a similar font that comes with Mac OS X called Lucida Grande. If you're running Windows, you can get it by installing the Safari web browser public beta and copying the TTF files from the Safari.resources folder.

Microsoft Windows also comes with a version of Lucida Sans called Lucida Sans Unicode. On some systems (e.g. Windows 2000 without ClearType) this doesn't look very good and it doesn't differentiate between normal and bold, so I only use this as a fall back if the other two aren't available.

I use these three fonts as the default fonts on my web site. Since at least one of these is included in recent Windows and Mac systems, most peeple should see a Lucida Sans variant.

It also turns out there's a number of other good fonts available for free download, starting with the Microsoft Windows Core Fonts, including Andale Mono, Arial, MS Comic Sans, Courier New, Georgia, Impact, Tahoma, Times New Roman, Trebuchet MS, Webdings, and Verdana. Most peeple will be familiar with these fonts, but I'd like to point out Andale Mono as it's a really good font for programming and much better looking than Courier New. They can be downloaded from the SourceForge Core Fonts Project Page.

Andale Mono



Other worthwhile downloads are the Windows ClearType Fonts, including Calibri, Cambria, Candara, Consolas, Constantia, and Corbel. They are all included in a standard install of Windows Vista or Microsoft Office 2007, but you can also get them in the Microsoft PowerPoint 2007 Viewer package. Calibri is the definite highlight. It's the default font in Word 2007, so you're certain to see it more in future.

The Microsoft Office Fonts includes some classics, particularly Century Schoolbook, Gill Sans MT, and Lucida Sans. You can get them with most versions of Microsoft Office, but you can also get them in the freely available Microsoft Publisher 98 Euro Fonts Update. Run PubUpd.exe /c /t:c:\temp, then copy the TTF files from c:\temp into c:\windows\fonts.

I discovered today that Adobe Reader version 8 includes Myriad Pro. It's an attractive humanist font similar to Lucida Sans. It's the font used in Apple ads. You can download it here. Install it and then copy the OTF files from the Resource/Font folder into the system fonts folder.

Myriad Pro



Another set of good fonts that deserve more attention is the Bitstream Vera family. They are included as the default fonts in many recent Linux distributions, and can be downloaded from the GNOME Fonts web page. They can be used as pretty good replacements for Verdana, Georgia, and Andale Mono.

Thanks to GearedBull for releasing his excellent Wikipedia font previews into the public domain.

Labels: , , , , , ,