8

I am switching back from mac-land, and the thing that bugs me the most about linux these days is the keybindings. Specifically, right now, I miss Karabiner, and the ability to turn the caps lock both into control and escape at the sametime.

Luckily, I found caps2esc. Unluckily, I don't quite understand how to install it.

I found the way to compile and make install both interception tools and caps2esc. But now it seems I need to mess around with systemd? Now I'm lost.

Help?

Here's the relevant documentation:

  1. https://gitlab.com/interception/linux/plugins/caps2esc

  2. https://gitlab.com/interception/linux/tools/blob/master/README.md

  • 1
    to really help I'd have to run it, and sorry i'm not doing that. a quick scan-read of files however and I don't see the need of sysd except if you want it to auto-run every boot or use system (systemctl) commands to stop/restart/start/.. it (which would be nicer yes) but are not necessary from my read. – guiverc Nov 23 '17 at 6:09
8

I think I mostly figured this out.

  1. Follow the instructions to cmake, make, sudo make install
  2. On Ubuntu/Debian, these executables are now in /usr/local/bin/caps2esc
  3. sudoedit /etc/udevmon.yaml and then put this in:

    - JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE"
      DEVICE:
        EVENTS:
          EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
    
  4. sudoedit /etc/systemd/system/udevmon.service and put this in:

    [Unit]
    Description=udevmon
    Wants=systemd-udev-settle.service
    After=systemd-udev-settle.service
    
    [Service]
    ExecStart=/usr/bin/nice -n -20 /usr/bin/udevmon -c /etc/udevmon.yaml
    
    [Install]
    WantedBy=multi-user.target
    
  5. sudo systemctl enable --now udevmon

  • 2
    When I ran sudo make install on interception tools, it installed udevmon to /usr/local/bin/udevmon. I changed the reference in /etc/systemd/system/udevmon.service from /usr/bin/udevmon to /usr/local/bin/udevmon and all was well. – Duane J Jul 14 '19 at 22:51
  • 1
    Also note that if you don't already have it ( didn't on Pop!_OS), you'll need to install Interception Tools: gitlab.com/interception/linux/tools. The cmake .., make, sudo make install instructions worked out for that for me as well. – Tom Jan 1 at 19:14
  • 1
    update to add: I also had to install libyaml-cpp-dev and libevdev to install interception tools. – Tom Jan 1 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.