Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3274554
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:03:05+00:00 2026-05-17T19:03:05+00:00

I have a Mac Laptop and I am connecting to server running Linux. As

  • 0

I have a Mac Laptop and I am connecting to server running Linux. As Alt+3 is already bound in EMACS to a command, so I cannot insert the hash symbol in a file.
I have tried the following solution I found online:

(global-unset-key (kbd "C-3"))
(global-set-key (kbd "C-3") '(lambda() (interactive) (insert-string
"#")))      //I know that C is for CTRL not Alt - I have tried with
M-3 instead as well

and some others as well, but none seem to work. Can you tell me any
other way in which I might be able to enter the hash sign (#) in a
file.

Aso tried (did not work):

(fset 'insertPound "#")
(global-set-key (kbd "M-3") 'insertPound)

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:03:05+00:00Added an answer on May 17, 2026 at 7:03 pm

    I assume that you have a Mac UK keyboard so Shift–3 is £. On most other keyboards Shift–3 is # as others have said.

    The way I get round it is to change the input source to Australian the only difference is that Shift–3 is now # and Alt–3 is £ (or leave as the emacs binding)

    Input Source setting
    was System Preferences->Language&text->Input Source
    On later OSX versions (OSX 10.11 definitely but would have been earlier) Input Source setting is System Preferences->Keyboard->Input Source By default this will just show the UK keyboard to see more hit the + at the bottom of the list and add Australian

    The reason I prefer this rather than adding code in emacs is that Shift–3 is # for all apps e.g. including Xcode/Eclipse so I don’t have to switch the key according to the app or according to wether I am on a US keyboard or on Windows/Linux etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I just followed the thoughtbot laptop setup for my Mac Mini Server running
I have an iphone simulator running on my Mac. I have a .ipa file,
I'm running php script updreading.php locally on my laptop (with Mac OS X 10.6.7).
I have got Mac on work, Ubuntu on my notebook, CentOS on my server,
I have a Mac running Mac OS X Leopard at work as well as
At the office, we have 2 MBPs with Mac OS X & 1 laptop
I have a mac with a custom PHP 5 install that built from about
I have Perl on Mac, Windows and Ubuntu. How can I tell from within
I have multiple installations of apache on my Mac OS X 10.5 and would
I have just installed PostgreSQL 8.3.4 on Mac OS X 10.5 (using ports), but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.