How do I make {, } and | on a mac?

Discussion in 'Mac Basics and Help' started by Sommer, Sep 19, 2009.

  1. Sommer macrumors member

    Joined:
    May 24, 2009
    #1
    Feeling kind of stupid I suppose the thread title says everything required to answer this question.

    I am working in PHP and simply cannot find any shortcuts for the three characters listed above.
     
  2. GoCubsGo macrumors Nehalem

    GoCubsGo

    Joined:
    Feb 19, 2005
    #2
    Shift [ to make { and shift ] to make } and comma is a comma ... no?
    {, }
     
  3. Mew2468 macrumors regular

    Joined:
    Apr 11, 2009
    Location:
    Home of the 2010 Winter Games
  4. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #4
    Standard obvious question... since these characters are all shown on the face of the US keyboards, where do you live / what kind of keyboard do you have?
     
  5. Sommer thread starter macrumors member

    Joined:
    May 24, 2009
    #5
    Denmark... so not that obivous as neither of the requested characters is on the keyboard. Brand new uMBP (15", 2.8, etc...) - backlit as well.

    So I found (due to the first answer) that it is:

    CMD + Shift + 8 (which is Shift + [) = {
    CMD + Shift + 9 (which is Shift + ]) = }

    Backslash I simply cannot find... hmmm! Any ideas? It is not above the CTRL (as on e.g. a PC)


    , (comma) was a seperater... 1, 2 and 3... you know ;)
     
  6. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #6
    If we're being sarcastic, one might point out that you shouldn't have wasted everyone's time and should have posted your keyboard type in the first place. ;)

    Try option-i and option-shift-7 for pipe and backslash?
     
  7. knweiss macrumors newbie

    Joined:
    Feb 15, 2008
    Location:
    Germany
    #7
    Go to System Preferences, Keyboard and check "Show Keyboard & Character Viewer in menu bar". Then select "Show Keyboard Viewer" in the menu bar. Now you see the keyboard layout in a new window. Try pressing the various keyboard modifier combinations until you see the Backslash on one of the keys.

    On a German keyboard it's on Alt(Option)+Shift+7.
     
  8. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #8
    ...or option-7 for pipe (|) and shift-option-7 for backslash (\), if the Danish keyboard is similar ti the Norwegian. ;)

    (That option-i (ı) is actually a dotless I).
     
  9. Sommer thread starter macrumors member

    Joined:
    May 24, 2009
    #9
    Thanks to all of you ;)

    { } | \

    All of them are found... back to scripting. Thanks again.
     
  10. GoCubsGo macrumors Nehalem

    GoCubsGo

    Joined:
    Feb 19, 2005
    #10
    I am beyond lost but glad the op got it sorted. Another cup of coffee is in order.
     
  11. jzuena macrumors 6502a

    jzuena

    Joined:
    Feb 21, 2007
    Location:
    Lexington, MA, USA
    #11
    Those are all pretty important keys when programming... stinks they are not labelled on a Danish keyboard!

    Depending on how convoluted it is to get the characters to print from your standard keyboard, you can open up System Preferences and go to Language & Text (at least under Snow Leopard; I forget what it was called in Leopard and earlier). Go to the Input Sources tab and tick the Show Input menu in menu bar box and then add a second keyboard that has these keys (like the US one). When you need these keys click on the Danish flag in the upper right of your menu bar and select the US keyboard by selecting the US flag. The first time you can also click on Show Keyboard Viewer to see how the US keys are mapped. Once you know where the keys are, you can just press the corresponding one and it will print out the character that would have been in that spot on a US keyboard. When done, just click on the US flag and re-select the Danish keyboard by selecting the Danish flag. I use the same system with the British flag for when I need to use the Pounds Sterling sign, and the French and Italian flags for when I need accented characters or for the Euro symbol. You may have found a faster method already, but if not this may help.
     
  12. tflournoy95 macrumors 6502

    Joined:
    Sep 21, 2009
    #12
     
  13. jMc macrumors 6502

    jMc

    Joined:
    Nov 19, 2001
    Location:
    London N8, Late-16th Century
    #13
    I have those characters marked on my UK keyboard. So I guess the UK kicks arse? :)

    jx
     
  14. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #14
    They're not labeled on a lot of keyboards. The Swiss French AZERTY doesn't have them either, for example.
     
  15. jMc macrumors 6502

    jMc

    Joined:
    Nov 19, 2001
    Location:
    London N8, Late-16th Century
    #15
    And in the UK we don't get a dedicated # label on the 3 key, which is annoying when specifying colours in CSS. # is alt-3 while shift-3 is the £ symbol.

    Less kick arsey than I suggested. :(

    jx
     
  16. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #16
    Maybe adaptive keyboards will help with this... that way they can have dedicated keys for the most commonly used keys and then smart keys that offer a range of less used options. The way the iPhone works is really pretty intuitive, for instance, holding down the $ key in the US provides other currency symbols such as Euro, Pound, Yen, and Won (although, as another user recently pointed out, oddly not the US "cent" symbol). Accented characters that are rarely used in English but used in other Roman character languages are also readily available by holding down the respective key.

    No reason in principle something like this couldn't be put in OS X. And perhaps someday that OLED keyboard will be a real desktop accessory option and will offer that kind of thing... (although psssh, I still hate Microsoft's "smart" menus that automatically hide less common options with a passion).
     
  17. jzuena macrumors 6502a

    jzuena

    Joined:
    Feb 21, 2007
    Location:
    Lexington, MA, USA
    #17
    Also a rather important key for adding comments when scripting :eek:

    That made me try alt-3 on my US keyboard and sure enough it gives me £. Since the # is the pound key, it should be easy for me to remember how to get the Pound key.
     
  18. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #18
    Wow. Germans must find DOS particularly annoying.
     
  19. jzuena macrumors 6502a

    jzuena

    Joined:
    Feb 21, 2007
    Location:
    Lexington, MA, USA
    #19
    I'm reaching WAY back here, but didn't DOS batch files use "REM" to start a line that was to be a remark, rather than any of the above comment or programming delimiters?

    And after the progress of the last 15 years, shouldn't we all find DOS particularly annoying by today's standards? :D
     
  20. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #20
    Well, yes. :) I was referring specifically to the backslash key though, since in DOS you were regularly typing things like:

    cd \
    copy C:\Files\Backups\1995\Sept\*.* A:\Docs
     
  21. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #21
    Germans and anyone who ever used any other kind of computer! :mad:

    I had Commodores -- a 128 and then an Amiga 500 -- up until my senior year of HS. Used a little Unix for math classes (Maple in Calculus class) also. All these backslashes drove me crazy, plus using the forward slash for a flag. :rolleyes:

    The US Mac keyboard at least is much easier than the US Windows keyboard for getting things like accents -- they're all pretty logically laid out and easy to remember. The onscreen keyboard helps also. I think though ultimately some kind of onscreen aid like the way kotoeri input works in Japanese makes more sense though, as there come to be more and more symbols in use (The Euro symbol is obviously relatively new itself, and for instance lots of people are using TM's and (C) and (R)'s on ther web now, and the Apple logo, and so on...).
     
  22. tflournoy95 macrumors 6502

    Joined:
    Sep 21, 2009
    #22
    america owns the uk. not literally
     
  23. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #23
    And option+3 is harder than shift+3? If you're doing CSS, I assume you're a good enough typist that you don't have to look at your fingers while typing anyway, so I don't see that it matters a whole lot.

    By the way, it's the reverse on the Canadian keyboard layout — option+3 for £ and shift+3 for #. I don't think there is any difference between the English Canadian and American keyboards, except that the Canadian flag in my menu bar makes me feel especially patriotic.

    I make extensive use of the en dash (–) and em dash (—) which are option-hyphen and shift-option-hyphen, respectively.

    You're getting on my nerves now.
     

Share This Page