What does pressing Alt + Shift + 3 in Terminal do?

All I can see is that it prints a pound sign and jumps to the next line, but, supposedly, it does something special.

  • 1
    What shell is this supposed to be answered for? – Kusalananda Oct 13 '11 at 9:14
  • I get a heart for when I do alt+shift+3, but it may be different on your end. – user103159 Feb 14 '15 at 23:18

In readline, Alt can be interpreted as \e. On my system (and likely yours as well) \e# is bound to insert-comment, which according to the bash(1) man page comments or uncomments the current command line and executes it. If you press it without typing anything then # is executed, which has no effect since it's a comment.

  • Unless you are, like me, using ksh with Vi key bindings, in which case no # is inserted when nothing yet has been typed. – Kusalananda Oct 13 '11 at 9:13

It depends on the layout. In my case it creates ¥ character.

  • Did you perhaps think the asker meant AltGr-#? – Ignacio Vazquez-Abrams Oct 13 '11 at 6:58
  • No, as I said, it depends on the layout. I don't have AltGr on my keyboard at all. – greenoldman Oct 13 '11 at 9:00
  • 1
    @macias Are you sure about this? AltGr is usually just an alias for "right Alt key". Does the same appear when you use the left Alt (assuming you have one)? – rozcietrzewiacz Oct 13 '11 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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