@futurebird There is even more to consider here: Maybe you were using a standard ANSI QWERTY keyboard layout (US) with { and [ on one key (reachable via shift) and } and ] on another key (reachable via shift).
Using a standard German keyboard layout those are spread to Alt Gr of 7, 8, 9 and 0. I remember having had similar issues when I ran The Carpentries workshops.
US: https://commons.wikimedia.org/w/index.php?title=File:KB_United_States.svg&oldid=1095945851
German: https://commons.wikimedia.org/w/index.php?title=File:KB_Germany-text.svg&oldid=1059056551