From 08ca5282004d6a13ea574844d46702ef354bf01f Mon Sep 17 00:00:00 2001 From: nontntnt <85178643+nontntnt@users.noreply.github.com> Date: Tue, 3 Aug 2021 12:41:03 +0100 Subject: [PATCH] Add extra plugin to the interception-tools section. --- Tricks.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/Tricks.md b/Tricks.md index c9f97bd..6e74b5f 100644 --- a/Tricks.md +++ b/Tricks.md @@ -120,7 +120,7 @@ save it as `$HOME/bin/tamefox` and add this to your `.config/sway/config`: exec [ -x $HOME/bin/tamefox ] && $HOME/bin/tamefox -# Use space as $mod (when chorded with another key) +# Use space as $mod If using Arch Linux, install Interception tools: ``` @@ -133,7 +133,7 @@ Also install the space2meta plugin: If using Arch, install from the AUR: ``` -yay -S https://aur.archlinux.org/packages/interception-space2meta +yay -S interception-space2meta ``` Otherwise follow instructions here: https://gitlab.com/interception/linux/plugins/space2meta @@ -181,3 +181,47 @@ sudo systemctl start udevmon The space key should now behave as the Super/Windows/Mod4 key when held and combined with another key. + +**If your chording style does not agree with this method:** + +You may find that your typing style makes it hard to hit the "chord timing" needed to trigger the Mod4 key. +There is an alternative plugin for interception-tools you can use which changes the behaviour of the tool. Feel free to play with the "delay" value in `/etc/interception/spacetomod4.yaml` to adjust it to your taste. + +Install this alternative plugin for interception tools: + +``` +yay -S interception-dual-function-keys + +``` + +Create a new file in /etc/interception (name it spacetomod4.yaml for example) with the following content: + + +``` +TIMING: + TAP_MILLISEC: 200 + DOUBLE_TAP_MILLISEC: 0 + +MAPPINGS: + - KEY: KEY_SPACE + TAP: KEY_SPACE + HOLD: KEY_LEFTMETA +``` + +Modify the /etc/interception/udevmon.yaml file to this instead: + + +``` +- JOB: "intercept -g $DEVNODE | dual-function-keys -c /etc/interception/spacetomod4.yaml | uinput -d $DEVNODE" + DEVICE: + EVENTS: + EV_KEY: [KEY_SPACE, KEY_LEFTMETA] +``` + +And remember to restart the udevmon service: + + +``` +sudo systemctl restart udevmon +``` +