How to prevent the typing of special characters like "~" modifying the next keyboard input?

Viewed 2813

When I type in "^" it is highlighted and waits for the next keyboard input such that if available, the next input is accented with it. For example typing in "^" and then "a" would result in "â" instead of "^a". How do I prevent this from happening?

4 Answers

In the Spanish LATAM layout I ran into the same problem with the symbols ~, ^ and `. I added comfortable key bindings for them as "regular keys" (contrary to dead keys) with Karabiner. I think the approach I followed could work with other layouts as well, although I haven't tried.

Using Karabiner-Elements

  1. Before getting into Karabiner, select "Show Keyboard Viewer" in the menu of the Input icon in the menu bar. You should see a virtual keyboard displayed. If the Input icon is not shown, enable:
System Preferences > Keyboard > Input Sources > Show Input menu in menu bar
  1. Leveraging the virtual keyboard, find if there is a specific key combination to make the special symbol be printed as-is (without waiting for another key press). For instance, in Spanish LATAM, pressing Option+Shift+{ directly prints ^.
  2. The amount of keystrokes can be reduced using Karabiner. The following is an example of a complex modification to reduce Option+Shift+{ into Option+{ for typing ^ in the Spanish LATAM layout. To find the value for key_code, use Karabiner's EventViewer.
{
  "title": "Regularize dead keys - Spanish LATAM",
  "rules": [
    {
      "description": "left_option+{ PRINTS caret(^)",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "quote",
            "modifiers": {
              "mandatory": ["left_option"]
            }
          },
          "to": {
            "key_code": "quote",
            "modifiers": ["left_option", "left_shift"]
          }
        }
      ]
    }
  ]
}

In my case, my laptop keyboard was working fine, but somehow I bumped some keys and then my external keyboard was typing symbols instead of characters and numbers as expected.

I was going to investigate further, then I remembered the ancient wisdom that provides the simplest solution.

unplug it & plug it back in.

Related