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?
-
Look for "mac osx diacritics key combinations" or some such on Google. StackOverflow is for programming-related questions only. – Lutz Prechelt Sep 13 '17 at 13:32
-
@LutzPrechelt The issue has a direct impact on the quality and performance of code making. In my understanding, therefore, the space is appropriate: as IDE customization, which is widely discussed around here. – Damasio Nov 11 '19 at 02:13
4 Answers
I was able to solve this by creating a custom layout with the help of this post https://superuser.com/questions/665494/how-to-make-a-custom-keyboard-layout-in-os-x.
First downloaded Ukelele.
Chose my desired layout to be edited as the current layout.
- In Ukelele, went to File -> New From Current Input Source
- The current layout is then shown on an on-screen keyboard. All the keys that will automatically accent the next keyboard input are highlighted with a different color from the rest of the keyboard. Right Click on the highlighted key and clicked on Make Output and pressed OK.
This makes the output of the key to the character and does not accent any following inputs. Did the same for all other highlighted keys ("Dead Keys" I think they are called).
- Then saved the keyboard layout as a Bundle file anywhere (Remember to also change the name of the keyboard layout within the bundle. Otherwise it will have the same name as the layout you started with and may cause confusion when trying to select it)
- Moved the saved bundle to ~/Libraray/Keyboard Layouts/
- Selected the new layout from the Input Sources in System Preferences
- Became a happy programmer :)

- 370
- 2
- 11
-
That's an awesome application. I've also found this link for British PC users: http://liyang.hu/osx-british.xhtml. It works perfectly on my High Sierra MBP :) – dom96 Sep 26 '18 at 21:50
-
Awesome thanks! No need to manually move the .bundle, simply double-click to install. – KiwiKilian Oct 04 '22 at 12:01
If by chance you are using the US International PC layout, remove that and use US, British, or ABC instead.

- 171
- 2
-
Great help... didn't know that the US International PC Layout make so much difference – Vinh Dec 23 '18 at 13:14
-
Choosing ENGLISH -> ABC for me worked well as I needed the dollar sign to be accessible for programming, this save me a lot of trouble thanks ! – NuoNuo LeRobot Jul 14 '21 at 03:54
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
- 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
- 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^
. - The amount of keystrokes can be reduced using Karabiner. The following is an example of a complex modification to reduce
Option
+Shift
+{
intoOption
+{
for typing^
in the Spanish LATAM layout. To find the value forkey_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"]
}
}
]
}
]
}

- 145
- 2
- 9
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
.

- 12,047
- 89
- 66