So as the title states I have a physical american keyboard but in Windows I am using a Swedish layout.' How do I enter the "greater/less, open/closen tag" <> character and the "pipe" | character?
5 Answers
Just messed around with this. I got a mechanical keyboard with US layout for a good price and my coding ability was struck down when I saw I was missing the <>| key.
I am running Linux (Manjaro & Ubuntu) Here is how I solved it:
I made a variant of the Swedish keyboard layout and made <>| 3rd level (AltGr) from keys ,.- (se-layout... corresponding to ,./ on us-layout)
Seemed like a small enough mod and it coincides fairly well with what is printed on the physical keys on the US keyboard.
Note: For me, sudo was not good enough. Had to go su instead!
1)------
add the following to the bottom of /usr/share/X11/xkb/symbols/se
// Swedish US_keyMod
partial alphanumeric_keys
xkb_symbols "se_uskeymod" {
include "se(basic)"
name[Group1]="Swedish (US key-mod)";
key <AB08> { [ comma, semicolon, less, dead_ogonek ] };
key <AB09> { [ period, colon, greater, dead_abovedot ] };
key <AB10> { [ minus, underscore, bar, dead_abovedot ] };
};
2)------
open /usr/share/X11/xkb/rules/evdev.xml and track down where the segment is for Swedish. Find where the Swedish starts and add the following variant along with the existing ones...
<variant>
<configItem>
<name>se_uskeymod</name>
<description>Swedish (US key-mod)</description>
</configItem>
</variant>
3)------
in the file /usr/share/X11/xkb/rules/evdev.lst find the line
! variant
and look for Swedish layout variants. When you find them squeeze in the folliwing line somewhere there
se_uskeymod se: Swedish (US key-mod)
4)------
Verify intended result with gkbd-keyboard-display -l "se(se_uskeymod)"
AltGr-mod of , . - should display < > |
5)------ Pick the modded variant of Swedish as your keyboard layout and fire away.
Optionally add SWERTY layout, available for Windows, Mac and Linux.
- 21
On Windows 10/11, you can solve this by installing PowerToys (link) and remapping the keys using their Keyboard Manager. Note that you will need to use the On-screen Keyboard (tutorial) in order to map to keys which are not available (such as |,<,>).
Step-by-Step:
- Once you've downloaded PowerToys, navigate to Keyboard Manager.
- Select "Remap a key", which opens the window in the bottom.
- Find the physical key you want to re-assign, either through the drop-down or with the Type-window. And then click the "Type" button for the "Mapped To".
Note that you cannot map a key combination, only a single key. For instance you cannot map: Ctrl+; or Alt+K.
- To easily map to the key that's missing from your physical keyboard use the Windows On-screen Keyboard. Simply click the key that you want your physical key to map to.
4a. If your key is missing, ensure that you are viewing the full On-screen keyboard.
- 21
All three use a key found to the left of the "z" key and to the right of a half-sized shift key found on ISO 102/105 keyboards. But US Keyboards are missing it.
You can enable the On-Screen Keyboard in windows settings for those times you need to use that key. With the Swedish language enabled the on-screen keyboard will include the missing key.
See below:
- 153
I have had a similar problem trying to use the UK layout setting with a US keyboard on a laptop. In my case I'm struggling to type the \ and | characters. The US keyboard does have a key with those symbols on it (next to the Enter key) but when using UK layout settings that key actually produces # and ~.
The key I'm trying to find would usually be to the left of the Z key, however this US keyboard simply has a much wider Shift key and the physical key is just missing. I won't stop to count the keys, but I assume this is the difference between a 101-key (US) layout and a 102-key layout.
HOWEVER I'm able to type the characters I want by holding down the AltGr key (the right-hand ALT key in case that's all the label shows) and then use the physical key with \ and | on it.
In order to get the | character I need to hold down the Shift key as well.
I hope that there might be a similar trick for the Swedish layout that works for you.
- 331






