How to remap the backslash and backtick keyboard buttons? Windows 11
Any ideas how I can swap them without the use of external software? Surely this is some windows thing?
1,887 11 11 gold badges 13 13 silver badges 20 20 bronze badges
asked Mar 25, 2023 at 15:56
user3647488 user3647488
1 2 2 bronze badges
Try Auto HotKey for this.
Mar 25, 2023 at 15:57
I’m specifically asking not to use it as before it worked without it, something changed with the recent windows installation and swapped the keys, tried with the keyboard layout but that wasn’t it.
Mar 25, 2023 at 16:05
Windows 11 continues to change things so you may need to use a 3rd party approach.
Mar 25, 2023 at 16:09
What you appear to have is an ANSI/ISO swap. American ANSI keyboards have no character key left of Z, so \ is left of 1. European ISO keyboards have an extra \ key left of Z, so the ` key goes left of 1 instead.
Mar 25, 2023 at 16:39
@Tetsujin I think you’re hitting the nail on the head, but how would I remedy this or swap the keys? The thing is if I go to a website like: keyboard-test.space when I press my «` \ «` key it says as it can’t even register it because of the layout.
Mar 25, 2023 at 18:40
1 Answer 1
If you would like to use only software by Microsoft, you could use the Microsoft PowerToys.
The power toy to use is the Keyboard Manager utility :

answered Mar 25, 2023 at 16:44
469k 31 31 gold badges 553 553 silver badges 959 959 bronze badges
Although I like this better than running an autohotkey script, doing this configuration doesn’t work as when I bind \ to ` and ` to \ pressing each key now produces \ instead of vice versa. I think this is due to the fact that I have 2 keys on my keyboard that are producing the backslash as @tetsujin pointed out in the comments because I have a European keyboard.
Trying to set Alt Gr+Keycode 50 to backslash
I’ve just started running Linux Mint, However I’m using a slightly different keyboard hardware wise. It had a multitude of issues in the start, such as Shift being mapped wrongly, atastrophe/asterisk not being mapped at all, however I’ve managed to fix that using XModMap.
xmodmap -e "keycode 50 = less greater backslash"
Is my Keymap for Keycode 50, and the first two works, but backslash doesn’t I’ve tried repeating the backslash a couple of times to fix it, but haven’t managed to fix it. Xev Output Edit
KeyPress event, serial 270, synthetic NO, window 0x3200001, root 0xd4, subw 0x0, time 9366403, (859,242), root:(1128,662), state 0x90, keycode 50 (keysym 0x3c, less), same_screen YES, XLookupString gives 1 bytes: (3c) "" XFilterEvent returns: False KeyRelease event, serial 270, synthetic NO, window 0x3200001, root 0xd4, subw 0x0, time 9366523, (859,242), root:(1128,662), state 0x90, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XFilterEvent returns: False
Swapping keys AltGr and Space in Kali — Firefox is not affected
After trying several Space and AltGr key remapping ideas, changing xkb looks most promising. I read and used these ideas related to xkb :
Remap altgr key to AC10 in XKB
How can I remap keyboard keys? From the first glance my corrections seem to work in text editor and in the terminal( Space symbol is printed on AltGr key press). However, in Firefox it does not work. Looking more closely, I have noticed that in all the three applications key combinations with AltGr also work (as if no remapping was done), except that in the terminal and in text editor the combination additionally prints the space character. E.g., in the terminal and in FireFox the combination AltGr + F opens the File menu and in the terminal also a space character is printed. My Space is broken and I don’t use AltGr . I just want to completely swap their functionality. What am I missing? (I use Kali Linux.) This is what I did:
1. Opened /usr/share/X11/xkb/symbols/pc
2. Changed the commented line with the one below:
// key < [ space ] >; key < [ ISO_Level3_Shift ] >;
3. Added these lines:
// Additionally added key < [ 32 ] >;
4. Saved the pc file.
5. Cleared the xkb cache running rm -rf /var/lib/xkb/*
6. Restarted Additional information (after the alterations listed above). Full current pc file:
default partial alphanumeric_keys modifier_keys xkb_symbols "pc105" < key < [ Escape ] >; // The extra key on many European keyboards: key < [ less, greater, bar, brokenbar ] >; // The following keys are common to all layouts. key < [ backslash, bar ] >; // key < [ space ] >; key < [ ISO_Level3_Shift ] >; include "srvr_ctrl(fkey2vt)" include "pc(editing)" include "keypad(x11)" key < [ BackSpace, BackSpace ] >; key < [ Tab, ISO_Left_Tab ] >; key < [ Return ] >; key < [ Caps_Lock ] >; key < [ Num_Lock ] >; key < [ Shift_L ] >; key < [ Control_L ] >; key < [ Super_L ] >; key < [ Shift_R ] >; key < [ Control_R ] >; key < [ Super_R ] >; key < [ Menu ] >; // Beginning of modifier mappings. modifier_map Shift < Shift_L, Shift_R >; modifier_map Lock < Caps_Lock >; modifier_map Control< Control_L, Control_R >; modifier_map Mod2 < Num_Lock >; modifier_map Mod4 < Super_L, Super_R >; // Fake keys for virtualreal modifiers mapping: key < [ ISO_Level3_Shift ] >; key < [ Mode_switch ] >; modifier_map Mod5 < , >; key < [ NoSymbol, Alt_L ] >; include "altwin(meta_alt)" key < [ NoSymbol, Meta_L ] >; modifier_map Mod1 < >; key < [ NoSymbol, Super_L ] >; modifier_map Mod4 < >; key < [ NoSymbol, Hyper_L ] >; modifier_map Mod4 < >; // End of modifier mappings. key < [ XF86Display ] >; key < [ XF86KbdLightOnOff ] >; key < [ XF86KbdBrightnessDown ] >; key < [ XF86KbdBrightnessUp ] >; // Additionally added key < [ 32 ] >; >; hidden partial alphanumeric_keys xkb_symbols "editing" < key < type= "PC_ALT_LEVEL2", symbols[Group1]= [ Print, Sys_Req ] >; key < [ Scroll_Lock ] >; key < type= "PC_CONTROL_LEVEL2", symbols[Group1]= [ Pause, Break ] >; key < [ Insert ] >; key < [ Home ] >; key < [ Prior ] >; key < [ Delete ] >; key < [ End ] >; key < [ Next ] >; key < [ Up ] >; key < [ Left ] >; key < [ Down ] >; key < [ Right ] >; >;
setxkbmap -print :
xkb_keymap < xkb_keycodes < include "evdev+aliases(qwerty)" >; xkb_types < include "complete" >; xkb_compat < include "complete" >; xkb_symbols < include "pc+us+inet(evdev)" >; xkb_geometry < include "pc(pc105)" >; >;
xev ( AltGr press and release):
KeyPress event, serial 34, synthetic NO, window 0x3400001, root 0x6cb, subw 0x0, time 1249191, (168,-8), root:(797,298), state 0x0, keycode 108 (keysym 0x20, space), same_screen YES, XLookupString gives 1 bytes: (20) " " XmbLookupString gives 1 bytes: (20) " " XFilterEvent returns: False KeyRelease event, serial 37, synthetic NO, window 0x3400001, root 0x6cb, subw 0x0, time 1249261, (168,-8), root:(797,298), state 0x8, keycode 108 (keysym 0x20, space), same_screen YES, XLookupString gives 1 bytes: (20) " " XFilterEvent returns: False
As my keyboard’s Space key is broken, I cannot show its xev .
Backslash alt gr key swap что
Let’s help each other out
- AutoHotkey v1 Help
- AutoHotkey v2 Help
- Tutorials
- It is currently 08 Jan 2024, 09:49
- All times are UTC-05:00
Information
The requested topic does not exist.
- HomeBoard index
- All times are UTC-05:00
- Delete cookies
- The team
- Contact us
Powered by phpBB® Forum Software © phpBB Limited
Style by Arty — Update phpBB 3.2 by MrGaby