update usage.md

This commit is contained in:
sezanzeb 2021-04-03 23:50:07 +02:00
parent 2e0e3cbbd7
commit 1c1976b586

View File

@ -132,13 +132,37 @@ Wayland than with X11 for me.
# Advanced
You usually don't need the stuff described here, you can configure everything
via the gui as well.
If you have trouble mapping some keys because the gui loses focus, or
if you don't have a graphical user interface, you'll need to edit the
If you don't have a graphical user interface, you'll need to edit the
configuration files.
## How to use unavailable characters
For example Japanese letters. Only works in X11.
```
xmodmap -pke > keyboard_layout
mousepad keyboard_layout &
```
Find a code that is not mapped to anything, for example `keycode 93 = `,
and map it like `keycode 93 = kana_YA`. See [this gist](https://gist.github.com/sezanzeb/e29bae637b8a799ccf2490b8537487df)
for available symbols.
```
xmodmap keyboard_layout
key-mapper-gtk
```
"kana_YA" should be in the dropdown of available characters now. Map it
to a key and press apply. Now run
```
xmodmap keyboard_layout
```
again for the injection to use that xmodmap as well. It should be possible
to write "ヤ" now when pressing the key.
## Configuration Files
The default configuration is stored at `~/.config/key-mapper/config.json`.