One thing that always trips me up!

| | Comments (15)

Gahh! If there's one thing that I wish I could consolidate between Windows and the Mac, it's the way the keyboard works. Because I use a KVM to switch back and forth, I run into one constant problem: Home, End, Page Up and Page Down.

On Windows, these keys shift the caret to the location you want. So when I hit end, I'm brought to the end of the current line. Same with home. However, on the Mac, it simply scrolls the page and does not move the caret. So hitting end scrolls me to the bottom of the page, and typing another character scrolls me right back to where I was. The same sort of stuff happens with Page up and Page down -- it scrolls instead of setting the caret.

Needless to say, this constantly hinders me because I'll hit end thinking that it'll move me to the end of the line and instead I'm taking to someplace entirely unexpected. And my fingers are trained that to select a line, you hit home, hold shift and hit end. So as you can imagine, I'm all messed up when I move to the Mac.

I really don't care what behavior happens (though my preference is towards the Win32 behavior since it seems more functional, to me) -- I just wish it was consistent. About the fourth time I jump off into never-never land while trying to write some code on the Mac, I get rather annoyed. :-P

15 Comments

Oh, and that only works for Cocoa applications. I suppose you could somehow intercept Home and End at the OS level and translate it into Cmd+Left Arrow and Cmd+Right Arrow, respectively, though I don't know how.

Gah! So close! The app that I want it to work for most is Code Warrior, which is not a Cocoa app. But that's still some interesting information, thanks for it!

For CodeWarrior go to Edit->Commands & Key Bindings... and add Home/End to "Move to top/bottom of page" bindings under the "Editor Commands" section.

Frank, you are my hero. Works like a charm!

The one thing that bothers me... when you're on the bottom line of a text field, and you hit the down arrow:

Windows will "beep" (which makes sense, because there's no line below that to move down to)

Macintosh will position the cursor to the end of the line (which makes sense, because that's as close to the next line as you can get)

Both behaviors make sense, and were chosen for good reason, but since I'm used to the Macintosh behavior, the Windows behavior DRIVES ME ABSOLUTELY BATTY!

When I was a child, working on those Classic Macs that don't have "End" or "Page Down" keys, I got into the habit of just holding the down arrow for a few seconds to get to the end of the document, then typing my additions. In Windows, this means the text I wanted to go to the end of the line ends up somewhere in the middle.

Now my favorite cross-platform app: I used to complain that Firefox used very non-standard controls on Macintosh, and my example was the EditField (which behaved like Windows.) And yes, it's a minor point, but I hated it when the Firefox zealots would tell me it's a perfect cross-platform port when in fact they had missed MANY porting details like that. Apparently, somebody in Mozilla-land listened to me, because now Firefox for Mac uses the Macintosh EditField behavior... BUT ALSO ON WINDOWS! So they've just switched the app from being wrong on Macintosh (~4% marketshare) to being wrong on Windows (~95% marketshare.) Idiots.

Just curious, why do you still use Code Warrior? Is it for plugin development? Or just other stuff you do?

While I'm griping... when you plug a PC USB keyboard into a Mac, Control remains Control, Windows becomes Command and Alt becomes Option.

But when you're remote-controlling a Mac using VNC from a Windows PC, Control remains Control, Windows becomes Option, and Alt becomes Command.

Either way is fine, people, but PLEASE be CONSISTENT! This one bites me on the butt all the time as well.

If you have a screen for each of your computers, I highly recommend Synergy (synergy2.sourceforge.net). It's just about the best program ever. Even if you don't have two screens, go out and buy a second one just so you can use Synergy!

Basically, it allows you to create the illusion of a single unified desktop by moving the mouse and keyboard focus of a single "server" computer onto other, secondary computers. Thus you can use one keyboard and mouse to control several computers at once, simply by moving the mouse off the edge of one screen and onto another.

It's worked with everything I've tried it with, even games. It certainly beats a KVM, hands down!

have you tried using command-up and command-down to move to the beginning/end of the document? afaik, that's been the standard behavior on macs forever. i find it easier to find the arrow keys than home/end, but that might be just because i'm using a powerbook…

unfortunately, i don't know a keyboard shortcut that works "properly" for page up/down.

@Adam -- KVM = Can't use multiple monitors. As for why I use CW, it's needed for a lot of the framework dev work.

@David -- I'm aware of the Mac standards. My gripe is that my brain can't switch between Mac standards and Every Other OS standards. But thanks to Frank, the main app I use on the Mac no longer has that issue for me.

I've been a long time Mac user but... I so totally agree with Aaron on this one. The mappings of the home and end keys make me want to cry on a Mac. This is one area where I feel Microsoft got it right and Apple's blown it.

I wish they'd give us a preference setting so you could control it system wide. For people moving from Windows, use it's behavior, for long time Mac users, use the default.

My $0.02 worth :)

Aaron: I know. But what I mean is, buy a second monitor and get rid of your KVM altogether. Synergy acts as a virtual keyboard/mouse switcher and is much nicer. And monitors are what, $90 these days?

Back when I had KVM I hated only being able to see one screen at a time.

@Adam -- ah, I get it now! :-) Interesting idea, I may have to try it out.

I also use Synergy for going between my Windows PC and Mac and love it.

Leave a comment

Disclaimer

I'm currently an employee of REAL Software. My blog is mine. The opinions represented in this blog are mine as well and may not represent my employer's opinions. All original material is copyrighted and property of the author.

REALbasic® is a registered trademark of REAL Software, Inc. REAL SQL Server™ and Lingua™ are pending trademarks of REAL Software, Inc. All rights reserved.