summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2021-12-04 12:06:07 +0300
committerGitHub <noreply@github.com>2021-12-04 12:06:07 +0300
commitd74d89a01f5aafe57855ad18f8863d580214e0b3 (patch)
tree12ecdafc0eac88d4b849bb9ae2955861f5c7dc93 /README.md
parent50fa61222597b3fa1ddfde5099285c9862a42d28 (diff)
syntax highlighting for snippets in readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index 0b4b2ca..d2623e4 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@ tap = ["KEY_ESC"]
You can also express simple remapping entries:
-```
+```toml
# This config snippet is useful if your keyboard has an arrow
# cluster, but doesn't have page up, page down, home or end
# keys. Here we're configuring ALT+arrow to map to those functions.
@@ -77,7 +77,7 @@ the function key row has alternate functions on the keycaps. It is natural
to want the mute button to mute by default, but to emit the F8 key when
holding alt. We can express that with the following configuration:
-```
+```toml
[[remap]]
input = ["KEY_LEFTALT", "KEY_F8"]
# When our `input` is matched, our list of `output` is prevented from
@@ -97,7 +97,7 @@ output = ["KEY_MUTE"]
## Building it
-```
+```console
$ sudo dnf install libevdev-devel
$ cargo build --release
```
@@ -106,8 +106,8 @@ $ cargo build --release
To run the remapper, invoke it *as root* (so that it can grab exclusive access to the input device):
-```
-sudo target/release/evremap remap my-config-file.toml
+```console
+$ sudo target/release/evremap remap my-config-file.toml
```
## Systemd
@@ -115,7 +115,7 @@ sudo target/release/evremap remap my-config-file.toml
A sample system service unit is included in the repo. You'll want to adjust the paths to match
your system and then install and enable it:
-```
+```console
$ sudo cp evremap.service /usr/lib/systemd/system/
$ sudo systemctl daemon-reload
$ sudo systemctl enable evremap.service