How to readjust your keyboard map to your liking.

Contents

  1. Introduction
  2. xbindkeys
  3. xmodmap

Introduction

Sometimes, esp. when working in an X environment, the default keyboard layouts aren't enough...

xbindkeys

Create a default file

  xbindkeys --defaults > $HOME/.xbindkeysrc

Grab a key code

  xbindkeys -k

or

  xbindkeys -mk

for multi-keys respectively.

Examples

xmodmap

German umlauts with en_US keyboards

Swap Caps_Lock and Control_L

Alternatively you can add in the InputDevice section of your keyboard in /etc/X11/xorg.conf (dunno if Xfree.conf works):

  Option  "XkbOptions"    "ctrl:swapcaps"

Mouse emulation mode with Num_Lock

  remove Lock = Num_Lock
  add Lock = Control+Mod2 + Num_Lock