16 votes

Binding Super+C Super+V to Copy and Paste

If you want to bind just a few sequences of the form Super+x, Super+c, Super+v to other sequences like Ctrl+x, Ctrl+c, Ctrl+v, for example so that (as the OP desired) these particular Super-key ...
Glen Whitney's user avatar
12 votes

How to remap CAPS LOCK on Wayland?

For gnome you can use gsettings set org.gnome.desktop.input-sources xkb-options "['caps:ctrl_modifier']" While the preferred way for X is now setxkbmap -option caps:ctrl_modifier instead of ...
anon's user avatar
  • 121
12 votes

How to swap control and function key on Lenovo external keyboard?

As of September 2020, swapping Ctrl and Fn is now possible without the hardware modifications described by Martin. Instructions can be found here, courtesy of the OP, I will recount them for ...
Lesik2008's user avatar
  • 221
11 votes

How to map the Caps Lock key to Escape key in Arch Linux

Xorg.conf You can achieve this by editing the file /etc/X11/xorg.conf.d/00-keyboard.conf. Example file: Section "InputClass" Identifier "system-keyboard" ...
styrofoam fly's user avatar
8 votes

How do I swap Alt and Windows keys with xmodmap?

I found that on Ubuntu 16.04 that uses xkb and gnome you need a few extra steps when compared to Christopher Devine's answer answer above if you want to retain all of the short cut behavior for the ...
Trevor Owens's user avatar
6 votes
Accepted

How to swap control and function key on Lenovo external keyboard?

Answering my own question: Thanks to Lenovo forum user blackdot54 from Canada, there is a hardware modding solution, that works well for me: https://forums.lenovo.com/t5/Displays-Options-and-...
Martin's user avatar
  • 191
5 votes

xmodmap how to remap keys and disable the original ones?

After reading in and getting some information around. It appears that the issue is that you have to delete the modifiers before actually doing the remapping. To the answer : After changing the ...
tukan's user avatar
  • 2,050
4 votes

How do I swap Alt and Windows keys with xmodmap?

You can also set the hid_apple kernel module options to only modify your apple keyboard but not normal PC keyboards. No need to use xkbmap or Xmodmapr. Just create the file /etc/modules.d/hid_apple....
sebastian's user avatar
  • 163
4 votes

Emulating mouse click with a keyboard

The built-in "Keyboard Mouse Emulation" mode can do this and/but has pre-configured key combinations for emulating various mouse clicks and presses (for dragging). (FYI: The key combination to turn ...
imz -- Ivan Zakharyaschev's user avatar
4 votes

Xmodmap fails to remap modifier keys

According to the Xmodmap Manual, there is at least one key step it appears you have left out. Not only must you "remove" the modifier bit assignments you must also "clear" the keys from the modifier ...
AuralArch's user avatar
  • 126
4 votes

How to disable a keyboard key in Linux (Ubuntu)?

A simple bash script for my personal use has been uploaded at https://github.com/anitaggu/ikbdop. To disable internal keyboard of laptop, ./ikbdop.sh detach To enable the keyboard again ./ikbdop.sh ...
Ani's user avatar
  • 41
3 votes

How to remap CAPS LOCK on Wayland?

For completeness: Under KWin/KDE you can remap Caps-Lock (and a few other control keys) quite flexibly using System settings → Input Devices → Keyboard → Advanced. In particular you can set the Key to ...
ntninja's user avatar
  • 348
3 votes

What is the function of the modifier keys in xmodmap?

X11 provides 8 modifiers to any keypress. You seem to have a fairly conventional set, where shift, control and lock have the obvious mappings. mod1 usually represents Meta or Alt, and mod2 to mod5 ...
Toby Speight's user avatar
  • 4,977
3 votes

How to make my Alt_R function as another Control on Linux

If you are one of the unfortunate people like me that could not get xmodmap to switch right Alt with right Ctrl, then maybe this will help. If you press right Alt and e and you get é then this ...
Mugur 'Bud' Chirica's user avatar
3 votes

Disable Escape key in linux?

Just for completeness, this is how I did it. $ cat ~/.config/xmodmap.d/disable-esc keycode 9 = NoSymbol keycode 66 = Escape ! Make CAPS lock the new Escape This can then be invoked on logon to ...
shalomb's user avatar
  • 240
3 votes
Accepted

xmodmap - remap Caps_Lock to Escape and Shift+Caps_Lock to Caps_Lock

Finally found a way to make this work. I figured out that X keyboard extension yet offers an option for this. By looking at /usr/share/X11/xkb/rules/base.lst i found the following line: caps:...
Fabius's user avatar
  • 181
2 votes

How do I swap Alt and Windows keys with xmodmap?

I'd recommend against using xmodmap in the future due to it not working in Wayland, but that aside setxkbmap or xkbcomp would be the best method to use going forward and my project Kinto uses it. ...
R Ben R's user avatar
  • 239
2 votes

Swapping special keys

You are switching it twice so it returns to the origin. Instead you should have changed modifier: remove mod1 = Alt_L remove control = Control_L add mod1 = Control_L add control = Alt_L or keycode: ...
sergeykish's user avatar
2 votes

Changing the Mod key in Awesome WM

Way late, but for others' reference: The problem seems to be that xmodmap isn't identifying any of the keys you listed as modifier keys. AwesomeWM therefore doesn't allow them to be used as modifier ...
mtalexan's user avatar
  • 121
2 votes

Binding Super+C Super+V to Copy and Paste

Update 02/03/2020 Kinto - Type in Linux like it's a Mac. I think this latest update better addresses the issue the original author was trying to tackle, even though it is binding Super to Ctrl+Shift ...
R Ben R's user avatar
  • 239
2 votes

How to map the Caps Lock key to Escape key in Arch Linux

The Arch repos now include two relevant interception tools: caps2esc (tap=esc, hold=ctrl) dual-function-keys (fully customizable tap/hold remappings) caps2esc (tap=esc, hold=ctrl) Install via ...
tdy's user avatar
  • 125
2 votes

Switching left alt and left win

The solution is clean and a built in function: setxkbmap -option altwin:swap_lalt_lwin (I am using it for my Thinkpad X260) on Fedora 27 and the Windowmanager Xmonad, which uses the Super_L key as ...
erik's user avatar
  • 1,968
2 votes

How to disable a keyboard key in Linux (Ubuntu)?

None of the above-mentioned method works on Wayland. I am not sure about other desktop environments, but the easiest way to disable a specific key on a specific keyboard on sway-wm is to use keyd. It ...
Arcadio's user avatar
  • 46
2 votes
Accepted

Non-toggling caps lock with xkmodmap or xkb?

Edit the file (as sudo) /usr/share/X11/xkb/compat/basic and change interpret Any+Lock { action= LockMods(modifiers=Lock); }; to interpret Any+Lock { action= SetMods(modifiers=Lock); }; Then ...
DreadPirateLynx's user avatar
2 votes
Accepted

Cannot remap keys with xmodmap in Fedora 26

xmodmap doesn't work in Wayland. You'll need to use xkb instead. This has several advantages, although convenient configuration is not one of them. See Create xkb configuration from xmodmap for a way ...
mattdm's user avatar
  • 2,871
2 votes

xmodmap - remap Caps_Lock to Escape and Shift+Caps_Lock to Caps_Lock

I followed the example from the xmodmap wiki for 'CapsLock to Control and Shift+CapsLock to CapsLock' and it worked. clear lock keycode 66 = Escape Caps_Lock NoSymbol NoSymbol You might need to log ...
leto's user avatar
  • 121
1 vote

xmodmap how to remap keys and disable the original ones?

Sorry for writing an answer instead of commenting, but I still don't have enough reputation for that. I know that this doesn't answer you question, but it could solve your problem. Instead of ...
TheEdgeOfRage's user avatar
1 vote

How to remap CAPS LOCK on Wayland?

For sway you can use: export XKB_DEFAULT_OPTIONS=caps:escape before running: sway reference https://github.com/swaywm/sway/wiki
Neil Billingham's user avatar
1 vote

Rebind windows key of microsoft sculpt ergo mouse

I found the following solution here xmodmap -e "keycode 134 = XF86Forward" xmodmap -e "keycode 134 = XF86Back" You can get the keycode using the tool xev
Jan B's user avatar
  • 131
1 vote

fedora 25 map winkey into control

As mentioned by @user2889981 in https://superuser.com/a/1193894/1032352, it can be done in Gnome Tweaks app. In Fedora 29 it's in Keyboard & Mouse > Additional Layout Options (button next to ...
sudodoki's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible