1

Since I am Hungarian, I am used to the Hungarian QWERTZ layout when typing, even in English. However, I have recently started to type in Japanese, which is based on a QWERTY layout. Maybe I would just get used to it in time, but it would make things much easier for me if I could switch the Z and Y keys for the Japanese input.

The problem is that Japanese has a unique input (labeled "Microsoft IME" in the settings) and I can't just load a QWERTZ layout under it. When clicking on "Add keyboard", I get no alternative options. This is in contrast to Hungarian, where I get a few dozen different options at the same place.

Due to the above I was not sure it would work, but I tried to download the official software recommended in this answer, and was not able to install it. (It asks for .NET framework version 2.0.50727, which is not available on the MS website anymore. I have a newer version installed, which it did not recognize. Also, according to the description, the latest windows version it supports is XP.)

A QWERTY layout is available for Hungarian, so if I could swap the two keys on a more basic level, that could also solve the problem. Otherwise I would need the change to be restricted to the Japanese input. This second option would also be preferred since it would not lead to weirdness were I to add a new language input.

4
  • you mean MKLC? I've used it on Windows 10 without any issue
    – phuclv
    Commented Dec 22, 2019 at 10:35
  • @phuclv Yes, version 1.4. It may run on win 10, but I still don't have the suitable .NET framework and the setup won't launch.
    – Szega
    Commented Dec 22, 2019 at 11:23
  • I somehow missed this question, which seem like a duplicate...
    – Szega
    Commented Dec 22, 2019 at 11:26
  • I don't know how I installed it but .NET framework 2.0 should be easy to enable: How To Enable .NET Framework 2.0 and 3.5 in Windows 10 and 8.1. But the best solutions for key mapping should be SharpKeys or AutoHotkey
    – phuclv
    Commented Dec 22, 2019 at 12:07

1 Answer 1

0

My Solution

For anyone stumbling upon this in the future:

I solved this issue on my german QWERTZ keyboard with a simple AutoHotkey script:

SC015::z
SC02C::y

Explanation

To understand why this works, you have to know, that each key on your keyboard has a ScanCode (short: SC) unique to it, which is independent of your input language in Windows

E.g. if I have my usual german QWERTZ layout active in Windows and I press the z key, Windows sends a z character; After I switch to the japanese input language my z key will now send a y character, but it will still have the same ScanCode

By writing the ScanCode of my z Key (which is SC015 for me and might be different for you) I tell AHK to send the z character independent of how Windows interprets it


Guide

If you have no knowledge of Autohotkey, I will try to guide you through everything you need

  1. Download and install the current version of AutoHotkey
  2. Create a text file e.g. test.txt and copy my above mentioned solution of two lines into it
  3. Save it, close the file and change the file extension from test.txt to test.ahk
  4. Double-click it to start the script, which will create an icon in your taskbar (It's an H inside a green box)
  5. Change your input language to japanese or other QWERTY input languages and try if this already solves your problem; If it works you're done, if it doesn't you'll now need to find out your specific ScanCodes
  6. Right-click the icon in your taskbar and select Open (Picture)
  7. In the top-toolbar select View/Key history and script info
  8. Press your z key and y key once, then press F5 to refresh the Key history (Picture)
  9. The second column will list the ScanCodes of your respective keys which you can now replace inside your test.ahk file
  10. Reload the script from the icon context menu and that's it

Everytime you want to change this behaviour, you just have to start this script. If it doesn't work in some of your applications, try running the script as administrator, so that the script has access to those programs as well


Extras

To make the script even better you can add the following code to the top of your script

#SingleInstance, Force
SendMode Input

Additionally you may want to autostart the script with Windows, for which you can read further upon here

Last, you may only want this behaviour only in a certain program (e.g. Anki) for which you can change your script in the following way:

IfWinExist, ahk_exe anki.exe
{
    SC015::z
    SC02C::y
    return
}    

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .