Since key-mapper is a Python program, you'll need Python to run itĪnyway. Here's a nice guide for it: Remap Keyboard And Mouse Buttons On Linux With The New Key Mapper GUI (Supports X11 And Wayland). It works with X11 and Wayland, and has an easy GUI interface to it. This method allows more complex hotkeys and combos to be remapped to almost arbitrary input. This is lower level than setxkbmap, but it's not deprecated like xmodmap, and for single key to single key remapping, it seems to work well.ĭetailed instructions found at: Remapping keys using hwdb files But it's not easy the way it is on Macs and Windows! It is listed in a lower level description file at however :Īnd if you're up to it, you can change the low level description files that setxkbmap uses to give you great control over the keyboard remappings. It's not listed in man xkeyboard-config but it is easily possible! Just run: More annoyingly, turns out running man xkeyboard-config does not list a complete list of what setxkbmap can do!įor example, let's say you want to make the right alt another right control key. Man xkeyboard-config is not complete: e.g. To find what options are supported by setxkbmap, you can run : But if you want an easier way, check out the last section below because, of course, there's an app for that! If you want to go down this route, be sure to check out: A simple, humble but comprehensive guide to XKB for linux. You also may have to find and use keycodes or events generated by your keyboard or mouse interactively. There many be some set of xkeyboard-config options that'll work, but it's not straightforward the way it is on a Mac with Karabiner-Elements. bashrc or similar.īut what if you want to swap the right control and alt keys instead? Or some weird 4 way switch of keys? To make it auto set on login, put it in a script run from. Running setxkbmap only affects the current session, so logging out will wipe the settings. Swapping the left control and alt keys can be easy to do as there's a direct option for it too. Then the second option sets the capslock to control. The first blank "-option" clears any previously set. Setxkbmap -option -option caps:ctrl_modifier It has many common remappings like turning capslock to control : I tried to do some simple key remapping with it on Debian LXDE and it didn't work for me. Some xmodmap functionality remains, but it's clearly a deprecated system and it sometimes doesn't work. Prefer using setxkbmap if it'll do what you want. I'll link to some guides and answers below, but some big picture ideas to be aware of in 2020 for Linux key remapping: xmodmap is deprecated So it's ironic but when it comes to keyboard and mouse key remapping and scripting, Linux is the more challenging than Windows (using AutoHotKey) or Macs (using Karabiner-Elements). Linux is known for choice and customizability.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |