* "xkbmap": setxkbmap de neo -option
* "xmodmap": setxkbmap lv && xmodmap neo_de.xmodmap

* special layer numbers:
** 0 --> undefined
** 7 --> layer 1 with Caps Lock
** 8 --> layer 2 with Caps Lock

* find current layer

|-----+-----+-------|
| '1' | 'q' | Layer |
|-----+-----+-------|
| 1   | x   |     1 |
| °   | X   |     2 |
| ¹   | …   |     3 |
| ª   | ⋮   |     4 |
| ₁   | ξ   |     5 |
| ¬   | Ξ   |     6 |
| 1   | X   |     7 |
| °   | x   |     8 |
|-----+-----+-------|

* layers in "xkbmap"

|------------------+------+------+------+-----------|
| Modifier / Locks | none | Caps | Mod4 | Caps+Mod4 |
|------------------+------+------+------+-----------|
| none             |    1 |    7 |    4 |         4 |
| Mod3             |    3 |    3 |    6 |         6 |
| Mod4             |    4 |    4 |    1 |         7 |
| Mod3+Mod4        |    6 |    6 |    3 |         3 |
|------------------+------+------+------+-----------|
| Shift            |    2 |    8 |    0 |         0 |
| Shift+Mod3       |    5 |    5 |    0 |         0 |
| Shift+Mod4       |    0 |    0 |    2 |         8 |
| all              |    0 |    0 |    0 |         0 |
|------------------+------+------+------+-----------|


* plain (xkbmap):

|-----------+----------+---------|
| Shift off | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        1 |       4 |
| Mod3 on   |        3 |       6 |
|-----------+----------+---------|
| Shift on  | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        2 |       0 |
| Mod3 on   |        5 |       0 |
|-----------+----------+---------|


* Caps Lock (xkbmap):

|-----------+----------+---------|
| Shift off | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        7 |       4 |
| Mod3 on   |        3 |       6 |
|-----------+----------+---------|
| Shift on  | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        8 |       0 |
| Mod3 on   |        5 |       0 |
|-----------+----------+---------|


* Mod4 Lock (xkbmap):

|-----------+----------+---------|
| Shift off | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        4 |       1 |
| Mod3 on   |        6 |       3 |
|-----------+----------+---------|
| Shift on  | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        0 |       2 |
| Mod3 on   |        0 |       5 |
|-----------+----------+---------|


* Caps+Mod4 Lock (xkbmap):

|-----------+----------+---------|
| Shift off | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        4 |       7 |
| Mod3 on   |        6 |       3 |
|-----------+----------+---------|
| Shift on  | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        0 |       8 |
| Mod3 on   |        0 |       5 |
|-----------+----------+---------|


* layers in "xmodmap"

|------------------+------+------+------+-----------|
| Modifier / Locks | none | Caps | Mod4 | Caps+Mod4 |
|------------------+------+------+------+-----------|
| none             |    1 |    2 |    4 |         0 |
| Mod3             |    3 |    5 |    3 |         5 |
| Mod4             |    4 |    0 |    4 |         0 |
| Mod3+Mod4        |    6 |    6 |    6 |         5 |
|------------------+------+------+------+-----------|
| Shift            |    2 |    8 |    0 |         0 |
| Shift+Mod3       |    5 |    5 |    5 |         5 |
| Shift+Mod4       |    0 |    0 |    0 |         0 |
| all              |    6 |    6 |    6 |         5 |
|------------------+------+------+------+-----------|


* plain (xmodmap):

|-----------+----------+---------|
| Shift off | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        1 |       4 |
| Mod3 on   |        3 |       6 |
|-----------+----------+---------|
| Shift on  | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        2 |       0 |
| Mod3 on   |        5 |       6 |
|-----------+----------+---------|


* Caps Lock (xmodmap):

|-----------+----------+---------|
| Shift off | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        2 |       0 |
| Mod3 on   |        5 |       6 |
|-----------+----------+---------|
| Shift on  | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        2 |       0 |
| Mod3 on   |        5 |       6 |
|-----------+----------+---------|


* Mod4 Lock (xmodmap):

|-----------+----------+---------|
| Shift off | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        4 |       4 |
| Mod3 on   |        3 |       6 |
|-----------+----------+---------|
| Shift on  | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        0 |       0 |
| Mod3 on   |        5 |       6 |
|-----------+----------+---------|


* Caps+Mod4 Lock (xmodmap):

|-----------+----------+---------|
| Shift off | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        0 |       0 |
| Mod3 on   |        5 |       5 |
|-----------+----------+---------|
| Shift on  | Mod4 off | Mod4 on |
|-----------+----------+---------|
| Mod3 off  |        0 |       0 |
| Mod3 on   |        5 |       5 |
|-----------+----------+---------|


#+STARTUP: showall