2

I have created a keyboard layout in the Microsoft Keyboard Layout Creator tool. It is based on US layout, the only changes I've made include:

mapped from               mapped to

alt(right)+[                  å
alt(right)+'                  ä
alt(right)+;                  ö
alt(right)+Shift+[            Å
alt(right)+Shift+'            Ä
alt(right)+Shift+;            Ö

The goal is to allow me to use the US layout but add the possibility to enter Swedish characters while holding the right alt key. This works to a degree, but feels buggy. When attempting to enter the Swedish characters using this custom map, nearly 1 out of every 3 attempts will send input incorrectly. Often, no character is input at all, and if retrying the same character, it is inserted after the cursor.

I've used it this way before on a Windows 10 system, where it worked perfectly. Now I'm on a Windows 7 Enterprise box where the problem occurs.

Update April 7:

This is not the same computer or keyboard as when I successfully used it with Windows 10, so it might not only be a difference between the versions of the operating systems. However, I am using the same hardware with GNU/Linux where I have a flawless configuration with the same key mappings, so I doubt it has to do with key ghosting. Also, I have tried with two very different keyboards, with the same result.

One observation is that the frequency of the misbehavior varies depending on the software used. For instance, in Google Chrome it happens very frequently. I can never type å (trying will even release focus on the input field), but the other characters only fail intermittently. Typing in a terminal or Notepad works better, but not without problems.

It feels like if something else was listening for the right alt key and competes with my layout setting. Of course, this is just a hypothesis.

Johan
  • 1,596
  • 1
  • 12
  • 13
  • Is they keyboard you're using now different from when it was working? Many keyboards have [hardware limitations](http://gaming.stackexchange.com/a/6671) that restrict multiple button presses. – root Apr 05 '16 at 20:07
  • Also, can you confirm if this problem occurs everywhere you type? For example, does the issue persist in Notepad, web browsers, ect? – root Apr 05 '16 at 20:17
  • The frequency of hitting the bug varies depending on the program I'm using. In Chrome and IE it is very frequent. In a terminal or in Notepad it is happening in about 1/5 of my attempts. It is another keyboard and another machine I'm using now than when it worked, but I doubt it is related to hardware. I'm using the same key combinations in GNU/Linux without any issues on the same hardware, and as the problem is intermittent, it could not really be caused by ghosting. Tried with two different keyboards too, with identical behavior. – Johan Apr 07 '16 at 12:14
  • This is helpful information, you should edit your original post to include these details. – root Apr 07 '16 at 12:49
  • Thank you @root for helping me with this issue! I have updated the original post. – Johan Apr 07 '16 at 13:36
  • @Johan The frequency makes sense as in chrome etc the key bindings may already have been assigned to other tasks. I would check the shortcuts options to ensure there is no crossover.I would also be tempted to make the keybinding 3 phases instead of 2 e.g. Alt+ Shift+ ] I know you've done that with some of them, however I would suggest doing ti with all of them. – Lelantos Apr 07 '16 at 14:08
  • @Johan You may want to try an [alternative](http://superuser.com/questions/64178/compose-key-on-windows) mapping method to see if your results change, if nothing more than for testing purposes. – root Apr 07 '16 at 14:58
  • In GNU/Linux I'm switching the complete keymap while holding the right alt key, and when releasing it is switched back. This would be awesome if I could do with Windows too, but after many hours of googling I cannot find a way of doing it. That's why I've bound the most commonly used Swedish characters to their corresponding positions. I'm too old to re-learn a new binding. :) – Johan Apr 08 '16 at 06:22
  • Ever figure this out? – William Sep 14 '18 at 22:52
  • Not really. The reason seems to be internal behavior of the Win key in Windows. If you disable all hotkeys in Windows where the Win key is involved you will get a safer result, but it still is not 100. This is still my main issue with using Windows. – Johan Sep 16 '18 at 15:40

1 Answers1

1

This may not exactly be what you're looking to accomplish but I believe the US - International keyboard layout already has the Swedish characters that you need. They're made available through AltGr (i.e. the right Alt key or Ctrl+Alt) shortcuts.

Glyph               Shortcut               Shortcut (No AltGr)

å                   Right Alt+w          Ctrl+Alt+w
ä                   Right Alt+q          Ctrl+Alt+q
ö                   Right Alt+p          Ctrl+Alt+p
Å                   Right Alt+Shift+W   Ctrl+Alt+Shift+W
Ä                   Right Alt+Shift+Q   Ctrl+Alt+Shift+Q
Ö                   Right Alt+Shift+P   Ctrl+Alt+Shift+P

Some Ctrl+Alt shortcuts may trigger other action on certain programs.

For instance Ctrl+Alt+p would open the Print dialog in Notepad.

You can check what characters are available to you using Microsoft Keyboard Layout Creator by loading your existing keyboard profile through File → Load Existing Keyboard... and checking the Alt+Ctrl (AltGr) shift state.

Keyboard Layout Creator 1.4 - AltGr shortcuts

Vinayak
  • 10,625
  • 10
  • 54
  • 89
  • Thanks, but as you say that's not what I'm looking for. The keys are not mapped according to my preferences. – Johan Apr 11 '16 at 05:55