14

Hi all I would like to know if it's possible to add or change a keyboard shortcut to make brackets "[ ]". They are available by doing Alt + Shift + ( but I would like to change it or add one to just do Cmd+ ( for example at least one thing faster because in programming I will win a lot of time (in my opinion) haha. Thanks in advance ciao!

(I'm on MacOS Sierra)

7
  • 2
    You probably need to tell us what nationality your keyboard & layout are. On English layouts they have their own keys. support.apple.com/HT201794
    – Tetsujin
    Feb 23, 2018 at 8:34
  • Oh sorry I'm french and with the 'azerty' keyboard we need to do Alt + Shift + ( and I'd just like to do Cmd + ( or anything easier :')
    – Beno
    Feb 23, 2018 at 8:39
  • 1
    OK, probably Karabiner Elements though software recs are frowned on as answers, so I'll just leave it here ;)
    – Tetsujin
    Feb 23, 2018 at 8:48
  • Mmh ok but it's not really what I want because with KE I can just replace one key with another and I want to replace one shortcut with another but it will do if I can't find a better solution. Thank you guy !
    – Beno
    Feb 23, 2018 at 9:03
  • 1
    Since most programming happens in english anyway, it might be worth to consider adding the U.S. keyboard in the settings and using a shortcut to switch between them (discussions.apple.com/message/17760654#message17760654). However, that would be probably a bigger challenge, than just getting used to press 3 buttons simultaneously ...
    – leun4m
    Feb 23, 2018 at 10:23

5 Answers 5

9

On latest MacBook Pro it works like this:

  • ⌥ alt+5 : [

  • ⌥ alt+6 : ]

  • ⌥ alt+8 : {

  • ⌥ alt+9 : }

I would love to have them as shortcuts on the touch bar together with the pipe-symbol | (= ⌥ alt+7) and the backslash \ (= ⌥ alt+Shift+7)!

1
  • Honestly, I have the last M1 Pro, I still can't understand why it doesn't appear on the keyboard. Is it something bad ? I am really curious. Jan 4, 2022 at 20:45
2

alt + 8 worked for me in MacBook Pro and I believe for programming it's convenient.

1
  • 1
    Thank you but it doesn't work for me :/
    – Beno
    Mar 26, 2019 at 13:42
2

In my case using macbook pro 2019 13-inch azerty

option + shift + ( : [
option + shift + ) : ]
0

I finally found out the easiest way to write square braket, braces and perenthesis by mac type keypad. alt+shift= {, only alt= [ and shift= (

1
  • 1
    Welcome to Super User! Please expand your answer to provide more details. Jan 2, 2021 at 9:54
0

I have been searching for this myself, and I think there's not one specific answer to this question. I think it depends on the keyboard layout (Language). I have MacBook Pro 2018 with Norwegian keyboard, and I found that the following key combinations works for me:

Option + 8 = [
Option + 9 = ]
Option + Shift + 8 = {
Option + Shift + 9 = }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.