Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Why am I not able to use square brackets and curly braces in console?

My system is Windows 10, using the newest version of FireFox. Also with IE, it is a problem.

I have to use Ctrl + Alt in order to make square brackets and curly braces. Might the Ctrl + Alt be the problem?

It is hard for me to follow some of the Python videos in the Flask course due to this.

  • I have learned a lot though, compensating by printing from the script in terminal.

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Anders Axelsen! I'm going to make a semi-educated guess here and say that you are likely using a "nordic" keyboard with the letters "äåö" on it and likely an "Alt Gr" key. I could be wrong. But the console assumes that you are using a US Qwerty keyboard. So the key mappings are going to be off. Here you have a couple of choices. You can switch the keyboard to standard US English, or you can use "Alt Codes". The alt codes, however, will only work from a Windows system and not a Mac. Here is a great site to get you started using alt codes.

Hope this helps! :sparkles:

edited for additional note

When I say to switch the keyboard to English, I mean in your local environment. Also, when using these codes be sure to use "Alt" and not "Alt Gr".

Jennifer - Thank you - it totally worked.

My keyboard is a US-keyboard. I have memorized the nordic keys, though. Finally, I can actually look to the keys to find their acutal value. Relief and peace in the valley..

Looking forward to videos with brackets and braces in console. Yay!

Awesome Jennifer, nice solution!

How come it works in my consoles but not his? I got kind of curious now :) I am also using a Nordic keyboard, for that matter.

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

stjarnan I believe it's because you're referring to your consoles on your local system which use your system settings. And he's referring to the console in workspaces, which of course, is not subject to your system settings.

Ah I see, yea I missed the part of it being the workspaces console, it makes sense then!

Thanks for helping, my problem is solved

Hi Anders,

Have you tried Chrome or Edge?

Hi Stjarnan.

I have just tried Chrome. Same problem.

I use Ctrl + Alt myself for brackets, and experience no problem so I am afraid I have no solution for you right now.

If you use your personal text editor, do you experience the same problem? Test that and we could be able to isolate the problem a little bit.

Within the script-writer/terminal, I can do square brackets etc fine. This is also possible in any other text field on my OS, except from Console.

P.S.: Thank you for your helpfulness :-)