Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Console Foundations Users and Permissions Creating Users

Omahr B. Carpinteyro
seal-mask
.a{fill-rule:evenodd;}techdegree
Omahr B. Carpinteyro
Front End Web Development Techdegree Student 4,684 Points

Problems wit pipe key "|" and tilde "~" in console with spanish keyboard

In sublime text and iTerm i have no problem. These are the key combinations I use to get those characters: | (option + 1) ~ (option + ñ)

but it doesn't work in the treehouse console.

4 Answers

Actually I got myself a US layout keyboard and set my input source to US everytime I code. My native language keyboard layout (DE) is really inconvenient for coding. Whenever I need to switch to DE input layout, I use the Mac shortcut "Cmd-Space". (Spotlight shortcut needs to be disabled for this to work, but as I rarely use spotlight but Alfred, this is not a problem for me). This shortcut makes switching input sources rapidly much easier.

Did you try bringing up the onscreen keyboard? Remember the encoding of the console can affect what displsys since it is a web application.

Omahr B. Carpinteyro
seal-mask
.a{fill-rule:evenodd;}techdegree
Omahr B. Carpinteyro
Front End Web Development Techdegree Student 4,684 Points

I added a english input source and I figured out the key combination with the onscreen keyboard. Now I need to switch the input source anytime I need those especial characters, but at least I'm not stuck. Thanks, Zahscha!

Felipe Mujica
Felipe Mujica
753 Points

I had the same problem here... here's my solution for spanish keyboard:

  • The "tilda" character (~) can be entered by typing AltGr+4
  • The "pipe" character (|) worked just fine inside the terminal by using the Alt+124 combination

Hope that takes care of the issue for other people out there. Saludos F

Juan Antonio Aguilar
Juan Antonio Aguilar
642 Points

I have the same problem with "[", "]" and other characters. I have spanish keyboard.

I fix this using ascii codes, but it is annoying.

Omahr B. Carpinteyro
seal-mask
.a{fill-rule:evenodd;}techdegree
Omahr B. Carpinteyro
Front End Web Development Techdegree Student 4,684 Points

Al parecer, los caracteres especiales que requieren utilizar la tecla alt son los que no aparecen en la consola para los teclados en español.

Yo lo he resuelto cambiando el Input Source del teclado a US cada vez que necesito esos caracteres, con el shortcut que menciona Daniel es super rápido hacerlo.

Una vez que estás en US obtienes los caracteres con las sig combinaciones

~ (shift + <)

| (shift + ç)

[ (`)

] (+)

El atajo para cambiar el input del teclado está en preferences > keyboard > Shortcuts > Input Sources

Parece fastidioso hacer esto, pero una vez hecho creo que vale la pena. Puedes probar si te conviene.

Saludos