Karabiner-elements: Can't switch section key (§) for hash/pound (#)

Created on 20 Dec 2016  Â·  9Comments  Â·  Source: pqrs-org/Karabiner-Elements

I would have thought I'd be able to choose both of these keys from the lists, but the section key is not obvious, being called 'non_us_backslash', and the hash/pound symbol is not available at all.

In previous versions of Karabiner, I edited the config file by hand, like this -> http://blog.sellorm.com/remap-mac-keyboard.html

The format has now changed though and even when using the even viewer I con't figure out how to recreate the hash/pound/# symbol.

MacBook Air with built in UK keyboard - this means the # symbol is option+3

stale

Most helpful comment

Hi, I can't believe that an app that is designed to map keys, lacks of "#"

All 9 comments

Yes, I am also trying to figure this out. Miss the § being mapped to # dreadfully.
I have tried dozens of combinations in Karabiner Elements UI and .json to achieve this but without success. What the devil is the correct name for '#' (in karabiner) ?
Help!

What worked for me was to switch to British-PC keyboard layout. Does not
match the characters on the keyboard but keys are where you would expect
them to be.

On 31 Dec 2016 17:01, "kryten68" notifications@github.com wrote:

Yes, I am also trying to figure this out. Miss the § being mapped to #
dreadfully.
I have tried dozens of combinations in Karabiner Elements UI and .json to
achieve this but without success. What the devil is the correct name for
'#' ?
Help!

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tekezo/Karabiner-Elements/issues/506#issuecomment-269873494,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJZ6bQR41Cb1z0qQ271KPaTGhjJf_C_nks5rNopWgaJpZM4LRTK_
.

This is driving me crazy too. The workaround above causes more problems than it solves. Please add an item to Karabiner-elements to allow us to map a key to the # sign.

This is the only reason I installed Karabiner Elements, to remap § to # on a UK keyboard.

Please please can it be added

In case anyone is still looking for this, it's possible to do with a complex modification. Here's the relevant complex_modifications section of my ~/.config/karabiner/karabiner.json:

"complex_modifications": {
    "parameters": {
        "basic.to_if_alone_timeout_milliseconds": 1000
    },
    "rules": [
        {
            "description": "Change section to hash",
            "manipulators": [
                {
                    "from": {
                        "key_code": "non_us_backslash"
                    },
                    "to": [
                        {
                            "key_code": "3",
                            "modifiers": [
                              "left_option"
                            ]
                        }
                    ],
                    "type": "basic"
                }
            ]
        }
    ]
}

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hi, I can't believe that an app that is designed to map keys, lacks of "#"

Here is a method that works for me. I am on macOS 10.14 Mojave with a UK keyboard. To have the '§ ' key send a '#' try the following:

  • caveat: it removes the keyboard's ability to send a '§'. You will have to map it to another key if you need it.
  • installation:

    • download & install karabiner-elements (I used version 12.9.0)

    • launch it and make a 'simple modification': map 'non_us_backslash' to anything

    • edit the JSON file ~/.config/karabiner/karabiner.json and locate the "simple_modification" block. Modify it to look like this:

"simple_modifications": [
                {
                    "from": {
                        "key_code": "non_us_backslash"
                    },
                    "to": {
                        "key_code": "3",
                        "modifiers": "option"
                    }
                }
            ],

.
* save the JSON file: karabiner-elements will detect you have changed it, and reload it. I you messed it up, you will get an error message in the application's log. Remove the file and restart the app if you need to start over.

  • use: the key remapping is active until you reboot your mac.

Explanation: we cannot just ask karabiner-elements to map a key to '#' because there is no such key, it only exists as 'option+3' key combination. It would be nice if such common key combinations were listed in the right-hand part of the 'simple modification' menu. Then we would not have to fiddle with the JSON file (most humans have no clue how to edit a text file).
Thanks to the previous posters for putting me on the right track.

excellent, this application remapped the key easily for me

Was this page helpful?
0 / 5 - 0 ratings