When pressing tilde in Windows 7, using a Swedish keyboard layout, the computer waits for a second key to be pressed. The reason behind the wait is to allow users the ability to construct characters such as ã and ñ, which I never type. Can I disable this so that pressing tilde once actually generates a tilde?
4 Answers
First, download and install Microsoft Keyboard Layout Creator. Then, follow these steps:
- open KLC and go to File -> Load Existing Keyboard...
- select your keyboard layout and click OK
- when the layout has loaded, double-click on the key that produces the tilde character

- in the new window, click "All..."

- find the combination that produces the tilde character and uncheck the "Dead Key?" checkbox

- click OK
- optional: go to Project -> Test Keyboard Layout to make sure the key behaves the way you want to
- optional: go to Project -> Properties and change the layout name and description
- go to Project -> Build DLL and Setup Package, wait for the process to complete and click Yes to open the directory where the setup files are located
- run the setup.exe file to install the new layout
- finally, go to Regional Settings in Control Panel (or use the Language Bar) to switch to the new layout
- 262
- 24,874
Visit The Microsoft Keyboard Layout Creator web page and download MSKLC.EXE (10.1 MB).
Some of this program's features allow you to base new layouts off of existing ones. (This means that you can take the current Sweedish keyboard layout and remove the current character/action and replace it with a tilde.)
Not an answer to your exact question, but since I see someone in the comments talking about pressing ~ twice, you can also press AltGr+~ followed by space, might be a faster way to type it without having to modify your keyboard layout.
(This is how I typed ~ for a long time on my Norwegian (works the same as Swedish for this particular thing) keyboard before eventually giving in and switching to a US keyboard)
- 181
I have found it difficult to maintain a keyboard layout created with MSKLC, because every time I update the layout I have to uninstall and reinstall the keyboard layout. I am using an AutoHotKey (version 1.1.33.10) script to map the keys. The script starts on system startup and always runs in the background.
This is my script for Norwegian layout:
; Map Shift + button left of backspace from dead `(backtick / GRAVE ACCENT) to living `(backtick / GRAVE ACCENT)
+SC00D::SendInput, {U+0060}
; Map AltGr + button left of backspace from dead ´(ACUTE ACCENT) to living ´(ACUTE ACCENT)
<^>!SC00D::SendInput, {U+00B4}
; Map the button right of Å from dead ¨(DIAERESIS) to living ¨(DIAERESIS)
SC01B::SendInput, {U+00A8}
; Map Shift + button right of Å from dead ^(caret / CIRCUMFLEX ACCENT) to living ^(caret / CIRCUMFLEX ACCENT)
+SC01B::SendInput, {U+005E}
; Map AltGr + button right of Å from dead ~(tilde) to living ~(tilde)
<^>!SC01B::SendInput, {U+007E}
The mappings have the format:
<mods>SC<sc>::SendInput, {<codepoint>}
Where:
<mods>: The modifier you are pressing while creating the dead key, such as + for Shift or <^>! for AltGr. You can see all Hotkey Modifier Symbols here: https://www.autohotkey.com/docs/v1/Hotkeys.htm#Symbols
<sc>: The scan code for the key you are pressing. It can be found by creating and running an AutoHotKey script, so that the AutoHotKey icon shows up in the taskbar, then right click the AutoHotKey icon > Open > View > Key history and script info. Press your key, and then F5 to update. It should look like this:
VK SC Type Up/Dn Elapsed Key Window
-------------------------------------------------------------------------------------------------------------
74 03F u 0.11 F5
DB 00D d 2.06 \
DB 00D u 0.08 \
74 03F d 0.33 F5
Press [F5] to refresh.
The second column tells us that the scan code for the desired key is 00D
<codepoint>: The Unicode Code Point for the desired letter. This can be found by entering the dead character into a page such as fileformat.info, which tells us that the character ` has code point U+0060.
Combining these we get:
+SC00D::SendInput, {U+0060}
To make the ` key not dead.
- 547