Xcode, the very friendly tool



  • Mac os x comes with lots of stuff made to increase the number of apps running on mac. This mean developper tools (named XCode 2) are free to use, qualified by apple of powerful and easy. One of the major feature i like in ide includes codes highlighting, errors marking and, of course, autocompletion. Being a java developper, i started learning C++ "for fun" :). I installed xcode and tried the first examples/exercices in the book. I looked for autocompletion and found a very nive auocompletion menu:

    So far so good, you hit ctrl-space like in eclipse to get autocompletion and ... Er wait, it's not ctrl-space sorry, it's

    The ^ symbol represent ctrl, that could be ok (exept on french keyboard, you need an additionnal shift to reach the dot), but the second one! The double angle bar is the "meta" key of mac keyboard. Easy to reach. But the Circle one.... It's the power button. Could you imagine coding by hitting every 15 seconds "meta - power" ?!

     

    Very user friendly indeed, and easy to use :D

    I can only imagine a desktop developper hitting meta with one hand and reaching his tower powxer button with the other one :D

     

    PS: this shortcut fails, which makes it even worse 



  • This must have been too hard to debug properly, they must have given up on this problem.



  • The "circle one" is Escape, and it's trivial to remap in Preferences if it doesn't suit your fancy.



  • @delta407 said:

    The "circle one" is Escape.

    Yup. The 'power' symbol has a vertical hash, not a slanted one (it's the standard power symbol these days).

    (EDIT: Hey, you edited your post to add the line about preferences. I deleted my redundant statement.)



  • @tchize said:

    PS: this shortcut fails, which makes it even worse 

    Your key symbol comprehension fails, which makes this even funnier.

    But don't let that get you down... I didn't have a clue what the escape symbol was when I first saw it!



  • So the WTF is not using the standard Esc symbol that everyone knows?  Or bringing back ^ as a shortcut for Control when Ctrl has become standard. Or whatever that shortcut for "Meta" is. Is that actually the symbol on the Apple Keyboards? Or are users left to guess? Did Apple drop their Apple Key (or open-apple/closed-apple I don't think that one ever made it to the Mac)?



  • @SuperousOxide said:

    So the WTF is not using the standard Esc symbol that everyone knows? Or bringing back ^ as a shortcut for Control when Ctrl has become standard. Or whatever that shortcut for "Meta" is. Is that actually the symbol on the Apple Keyboards? Or are users left to guess? Did Apple drop their Apple Key (or open-apple/closed-apple I don't think that one ever made it to the Mac)?

    It's option, not "meta" - non-US keyboards use these symbols extensively http://www.thebookyard.com/images/ig4kb.jpg - ⌤, incidentally, means "enter" (not "return", which is ↩ - the keys are distinct). The "command key" [what we usually associate with "meta", option is more like altgr] is, as always, ⌘.

    And, I wasn't aware there _was_ an Esc symbol everyone knows - unless you mean writing out "Esc". Surely you can't have meant ^[, which wouldn't even be accurate in a gui environment. 



  • @Random832 said:

    And, I wasn't aware there was an Esc symbol everyone knows - unless you mean writing out "Esc". Surely you can't have meant ^[, which wouldn't even be accurate in a gui environment. 



    Yeah, I meant just "Esc", this is the first time I've seen anything else used to describe it.



  • edit: oops, too late...



  • Ok, probably someone can explain then why this symbol looks so much like a power symbol. And since i have an ibook, the only key that looked like the symbol on or arround the keyboard was the power button :D

    Seems i made a fool o myself on it. Makes 2 weeks i wonder why they choose option-power as a shortcut :)



  • @tchize said:

    Ok, probably someone can explain then why this symbol looks so much like a power symbol. And since i have an ibook, the only key that looked like the symbol on or arround the keyboard was the power button :D

    Seems i made a fool o myself on it. Makes 2 weeks i wonder why they choose option-power as a shortcut :)

    The icon is badly designed, yes. A square would have been better. 



  • Apple are weird in being such a famous US brand and yet having such a non-US-centric GUI. As mentioned, non-US keyboards show the same symbols as you see in menus, so it's an adorably cute system. Except esc. And ctrl. Which have their classic textual abbreviations (but in lowercase). That said, this also has historical significance. (Interestingly, my PC keyboard has "Control" not "Ctrl")

    See, escape has no meaning in Mac OS. Cancel in Mac OS was universally cmd-. I have no idea when escape was permitted as an alternative in dialog boxes, but as far as I know, to this day it still doesn't cancel operations. (Although I'm really not sure on that one.) I find this sad as, starting from my first ever computer, bashing Escape to stop something was a great idea. Although apparently that in itself is an abuse of the escape key that plagues terminal software developers...

    Ctrl also has no meaning on a Macintosh. While Commodore did weird shit like have completely blank keys on Amigas, Apple gave us a ctrl key regardless, even though it never did anything (except reboot some Macs, with ctrl-cmd-power). The only thing I ever used it for was colour codes in IRC, but terminal software could also use it safely without conflicting with local shortcuts. However, some larger applications desperate for more shortcuts started using cmd-control, and one or two use cmd-ctrl where Apple stole existing commonly-used shortcuts like cmd-H and cmd-M. Of course, nowadays it's useful for Terminal. (Oh, and ctrl-click for context menus, which was just outright bizarre, but possible since the key was, otherwise, completely useless.)

    And someone else also pointed out that return (0x0D) an enter (0x03) are totally separate keys on a Mac. This is a wonderful innovation. For example, in a dialog box where return should type a newline, enter (on the numpad) will hit OK instead. I wish other GUIs were this straightforward. You can use this in IM, too -- return - newline, enter - send message. And you never send a half-complete message by mistakenly hitting return. Then you get apps that insert 0x03 instead, or simply ignore the key outright when you somehow expect it to do a newline. Most confusing when you're accustomed to PC convention of having two return keys (called enter, but they function as return in Mac naming convention, i.e. they send a return character).



  • @Daniel Beardsmore said:

    And someone else also pointed out that return (0x0D) an enter (0x03) are totally separate keys on a Mac. This is a wonderful innovation.

    Innovation? Everything has always worked that way on every platform, right back to the old mainframes. Return and enter haven't got anything to do with each other.

     

    Most confusing when you're accustomed to PC convention of having two return keys (called enter, but they function as return in Mac naming convention, i.e. they send a return character).

    PCs do not do this. Not even Windows does this. Maybe you're using an application that maps both keys to the same function.



  • @asuffield said:

    @Daniel Beardsmore said:

    And someone else also pointed out that return (0x0D) an enter (0x03) are totally separate keys on a Mac. This is a wonderful innovation.

    Innovation? Everything has always worked that way on every platform, right back to the old mainframes. Return and enter haven't got anything to do with each other.

    They don't have the same virtual key code, but on a PC, both of them generate the same ASCII code of 13. (Which makes me wonder, since who gets to add the 10 afterwards? I wonder why I don't remember?) Maybe this is only a Windows thing, but Windows does not differentiate between the two enter keys. Both are officially called enter, whereas Apple officially name one return and the other enter. The BBC Master incidentally called both return where, again, they both returned 13.

    Software that scans for virtual key code can tell them apart, but for the most part, in Windows, they're the same key. Things like alt-enter (Properties in Explorer, or full-screen) or asking for a new line, work equally well with either. Windows native apps, XUL apps and GTK+ apps all behave identically -- there's no way I know to map numpad enter to send message in Pidgin, for example.

    The point you're missing is that a Mac assigns these keys different ASCII codes. Return sends ASCII 13, enter returns ASCII 3. I don't even know WTF 3 means. It meant cease printer echo in Acorn MOS and that's all I've seen it used for. On a Mac, anyone who wants enter to start a new line has to code for that specifically, by throwing away ASCII 3 and inserting 13 instead. Maybe Linux is the same way as this, although when I've talked about it with the Pidgin folk, I didn't get that impression.



  • @Daniel Beardsmore said:


    The point you're missing is that a Mac assigns these keys different ASCII codes. Return sends ASCII 13, enter returns ASCII 3. I don't even know WTF 3 means. It meant cease printer echo in Acorn MOS and that's all I've seen it used for. On a Mac, anyone who wants enter to start a new line has to code for that specifically, by throwing away ASCII 3 and inserting 13 instead. Maybe Linux is the same way as this, although when I've talked about it with the Pidgin folk, I didn't get that impression.

    Well... In a standard terminal emulator (among other things) ASCII codes from 1-26 can be sent by pressing Control + the number's corresponding letter of the alphabet. For example, a Carriage-Return (ASCII 13) is Control-M, and a Linefeed (ASCII 10) is Control-J... and your Mac's Enter key (ASCII 3) apparently would be Control-C -- which has a particularly amusing significance in most of the Unix-style shells I've seen.



  • An instant "Cancel" button, right beside your keyboard!  Another wonderful innovation from Apple...



  • @merphle said:

    Well... In a standard terminal emulator (among other things) ASCII codes from 1-26 can be sent by pressing Control + the number's corresponding letter of the alphabet.

    In Acorn MOS, ctrl-@ -- the character before A in ASCII -- types a null. Not quite sure why ... perhaps something to do with the way I/O is driven. Pressing ctrl-@ or 0 would both act as null if you omit the higher nybble.

    @merphle said:

    ... and your Mac's Enter key (ASCII 3) apparently would be Control-C -- which has a particularly amusing significance in most of the Unix-style shells I've seen.

    Now that would be quite funny :P Hit enter to kill programs.



  • @Daniel Beardsmore said:

    @asuffield said:
    @Daniel Beardsmore said:

    And someone else also pointed out that return (0x0D) an enter (0x03) are totally separate keys on a Mac. This is a wonderful innovation.

    Innovation? Everything has always worked that way on every platform, right back to the old mainframes. Return and enter haven't got anything to do with each other.

    They don't have the same virtual key code, but on a PC, both of them generate the same ASCII code of 13.

    That is entirely dependant on your application. For example, a typical vt100-like terminal emulator will deliver 0x0d in numeric mode, and 0x1b 0x4f 0x4d in application mode (the state of the terminal is undefined when an application starts inside the emulator; it must emit the relevant control sequence to pick the mode it wants, if it cares). An X server delivers only the keysym KP_Enter.


Log in to reply