How to make ^ and ` non-dead-keys on Windows 7 with German keyboard layout

35

17

In the default German keyboard layout ^ and backtick/forwardtick are deadkeys.

However, as a programmer I usually do not need to write áccênts, but the characters itself. Being required to press the key twice and backspace or the key and space is pretty annoying in this case.

So I'd like to know if (and how) it's possible to change those keys so they immediately create the character instead of waiting for a second character.

ThiefMaster

Posted 2011-05-06T08:55:09.917

Reputation: 4 918

1

For non-German keyboards, see also When I type " nothing comes out, and if I type it again, 2 of it comes out as such: "" which explains about choosing some non-"US International" keyboard layout.

– Arjan – 2014-11-09T20:09:05.143

Not only programming, you can't use console in games like quake/half-life properly. You have to delete crap every single time you open it. – Smit Johnth – 2017-01-28T20:17:05.293

6+1 programming on German Windows keyboards makes me go nuts. – slhck – 2011-05-06T08:59:29.613

2@slhck That's why I got several British/International layout keyboard, even in my laptops ;) – Daniel Beck – 2011-05-06T09:56:58.090

1I'm used to it so I don't want to change the layout. – ThiefMaster – 2011-05-06T10:14:53.233

Answers

36

You can use Microsoft's Keyboard Layout Creator to modify your layout. Once you've downloaded and installed, do this:

  1. Hit "File" and "Load Existing Keyboard".
  2. Dead keys are displayed as grey - with a right-click on any key, you can assign or un-assign dead key behavior:

enter image description here

  1. When you're done assigning and un-assigning, go to "Project" -> "Properties" and edit the description. "Name" has an 8-character-limit (for whatever reasons), so just set it to "Deutsch" and the description to something like "Deutsch - No Dead Keys" or whatever you fancy.

  2. When you're done, go to "Project" and choose "Build DLL and Setup Package". On creation, it will say it has some warnings in the log file, but they can probably ignored. The next prompt will ask you if you want to open the directory the files have been written to - if you do so, you can just install your layout with one click.

  3. Open Keyboard Settings in Windows to check whether the new keyboard layout has been added to Windows' list. I

Done!

Tobias Plutat

Posted 2011-05-06T08:55:09.917

Reputation: 5 051

1

For your convenience, I published a version of the German keyboard layout without dead keys on GitHub for you to download and install.

– RAnders00 – 2016-06-04T11:42:25.737

@OliverSalzburg and caps lock should only work with letters, not with digits. – Smit Johnth – 2017-01-28T21:18:56.530

See also http://freeman2222.mywebcommunity.org/us-intnd.zip for a ready-made non-dead-key keyboard installation. Based on US_international. Found at https://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/disable-dead-keys-for-us-international-keyboard/1de44160-83d9-4cd8-9eb3-e6b06b8604a4

– parvus – 2017-10-12T08:59:05.673

14To all the German programmers: While you're in there, change the numpad decimal separator to .. – Der Hochstapler – 2012-04-30T09:50:24.257

0

I couldn't get the method based on the keyboard creator to work. Instead, I came up with an AutoHotKey script. The method for detecting the current keyboard layout is taken from How to find out what is the current keyboard layout?.

The idea is to automate sending the sequence "dead key + space". Since this will have the wrong effect for layouts without dead keys, I filter based on the locale ID, which for the German keyboard fulfills the pattern 0x0407????. This value may not be portable, given that keyboard layouts are not hardcoded.

I considered using GetKeyboardLayoutNameA, but the value sometimes is outdated.

;;;; ------ NO DEAD KEYS ------

GetCurrentLocaleId()
{
  ;; Source:
  ;;   https://autohotkey.com/board/topic/
  ;;   22900-how-to-find-out-what-is-the-current-keyboard-layout/
  WinGet, WinID,, A
  ThreadID := DllCall("GetWindowThreadProcessId", "Int", WinID, "Int", 0)
  InputLocaleID := DllCall("GetKeyboardLayout", "Int", ThreadID)
  Return InputLocaleID
}

IsGermanKbdLayout()
{
  Return GetCurrentLocaleId()//0x10000 == 0x407
}

#If IsGermanKbdLayout()
SC029::SendRaw % "^ "
SC00D::SendRaw % "´ "
+SC00D::SendRaw % "`` "
;; Find scan codes by viewing script's console > view > key history

kdb

Posted 2011-05-06T08:55:09.917

Reputation: 1 076