Evdev

evdev is the open source input driver for many input devices like keyboards, mice, joysticks and more.

Kernel
You need USB support, if you have an USB input device. Also you need to activate the following kernel options:

Some USB mice (e.g. Logitech G5 and Razer Naga 2014) additionally need the following option:

Keyboard layout
To set the default layout copy the file to  and edit the keyboard section, e.g. for a German layout: