Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bitboxer/caps2escape
fork of caps2escape for people who swapped left ctrl and left alt
https://github.com/bitboxer/caps2escape
Last synced: 25 days ago
JSON representation
fork of caps2escape for people who swapped left ctrl and left alt
- Host: GitHub
- URL: https://github.com/bitboxer/caps2escape
- Owner: bitboxer
- License: mit
- Created: 2019-05-01T12:20:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-01T12:23:46.000Z (over 5 years ago)
- Last Synced: 2024-12-12T21:37:04.741Z (27 days ago)
- Language: C
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# caps2esc
This is a fork of [caps2escape](https://gitlab.com/interception/linux/plugins/caps2esc) that
changed the left ctrl and left alt keys._Transforming the most useless key **ever** in the most useful one._
_For vi/Vim/NeoVim addicts at least_.## What is it?
- **Put what's useless in its place**
_By moving the CAPSLOCK function to the far ESC location_
- **Make what's useful comfortably present, just below your Pinky**
_By moving both ESC and CTRL functions to the CAPSLOCK location_## Why?!
Because CAPSLOCK is just "right there" and making it CTRL when key-chording and
ESC when pressed alone is quite handy, specially in vi.## Dependencies
- [Interception Tools][interception-tools]
## Building
```
$ git clone [email protected]:interception/linux/plugins/caps2esc.git
$ cd caps2esc
$ mkdir build
$ cd build
$ cmake ..
$ make
```## Execution
`caps2esc` is an [_Interception Tools_][interception-tools] plugin. A suggested
`udevmon` job configuration is:```yaml
- JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE"
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]```
For more information about the [_Interception Tools_][interception-tools], check
the project's website.## Installation
- Arch Linux :
- Debian:## Caveats
As always, there's always a caveat:
- `intercept -g` will "grab" the detected devices for exclusive access.
- If you tweak your key repeat settings, check whether they get reset.
Please check [this report][key-repeat-fix] about the resolution.## History
I can't recall when I started using CAPSLOCK as both ESC and CTRL but it has
been quite some time already. It started when I was on OS X where it was quite
easy to achieve using the [Karabiner][], which already provides an option to
turn CTRL into CTRL/ESC (which can be coupled with OS X system settings that
turn CAPSLOCK into CTRL).Moving on, permanently making Linux my home, I searched and tweaked a similar
solution based on [xmodmap][] and [xcape][]:-
It's a simple solution but with many annoying drawbacks I couldn't stand in the
end:- It resets any time a device change happens (bluetooth, usb, any) or the
laptop lid is closed or when logging off and needs to be re-executed.
- It depends on [X][]. Doesn't work on TTY (bare terminal based machine,
CTRL-ALT F2, etc).Meanwhile on Windows land, I had a definitive solution based on my
[Interception library][interception] that always works perfectly, no hiccups.It made me envy enough, so I ported the
[Windows Interception caps2esc][caps2esc-windows] sample to Linux based upon
the [_Interception Tools_][interception-tools].## License
Copyright © 2017 Francisco Lopes da Silva
[caps2esc-windows]: https://github.com/oblitum/Interception/blob/master/samples/caps2esc/caps2esc.cpp
[karabiner]: https://pqrs.org/osx/karabiner/
[xmodmap]: https://www.x.org/releases/X11R7.7/doc/man/man1/xmodmap.1.xhtml
[xcape]: https://github.com/alols/xcape
[x]: https://www.x.org
[interception]: https://github.com/oblitum/Interception
[interception-tools]: https://gitlab.com/interception/linux/tools
[key-repeat-fix]: https://github.com/oblitum/caps2esc/issues/1