Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/csmclaren/loco

Enter complex key sequences with ease!
https://github.com/csmclaren/loco

emacs emacs-configuration emacs-lisp emacs-mode keyboard library

Last synced: 3 days ago
JSON representation

Enter complex key sequences with ease!

Awesome Lists containing this project

README

        

# Loco  🚋

Loco is a library and minor mode to help you enter complex key sequences with ease.

[![MELPA](https://www.melpa.org/packages/loco-badge.svg)](https://www.melpa.org/#/loco) [![MELPA Stable](https://stable.melpa.org/packages/loco-badge.svg)](https://stable.melpa.org/#/loco)

## Introduction

Loco is a [package](https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html) for [Emacs](https://www.gnu.org/software/emacs/). Loco lets you type any [key sequence](docs/build/loco.md#keys-key-sequences-and-commands), including those requiring the modifiers Alt, Control, Hyper, Meta, or Super, without using any physical modifier keys except Shift. This makes it easy to enter key sequences that are complicated or use hard-to-reach keys.

Loco works by translating key sequences from one form to another. It does not redefine the [standard key bindings](https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf), nor does it prevent you from [defining your own](https://www.gnu.org/software/emacs/manual/html_node/emacs/Key-Bindings.html). Learn the few rules of Loco and be productive immediately, using the key bindings you already know.

Loco does not preclude the use of physical modifier keys; it integrates well with them. There may even be some key bindings for which you find using physical modifier keys preferable. And it works equally well in the [GUI](https://en.wikipedia.org/wiki/Graphical_user_interface) or the [terminal](https://en.wikipedia.org/wiki/Computer_terminal), working around the [limitations of terminals](docs/build/loco.md#considerations-when-using-a-terminal) that prevent the entry of certain keys, allowing you to move between both easily.

When enabled, and using the default configuration, pressing S-\ will activate Loco.

> In Emacs, S-\ means hold Shift then press Return.

Once activated, you can type any key sequence, taking advantage of the following special keys to help you avoid pressing any physical modifier keys:

- j to apply the modifier Control to the next non‑special key;
- k to apply the modifier Meta to the next non‑special key; or
- l to open a menu that includes options to:
- apply other modifiers (for example, Alt, Hyper, or Super) to the next non‑special key; or
- enter the special keys themselves as the literal characters *j*, *k*, or *l*.

### Examples (using the default configuration)

| Typed Key Sequence | Translated Key Sequence | Command |
|--------------------|-------------------------|---------------|
| j d | C-d | `delete-char` |
| k d | M-d | `kill-word` |
| j h i | C-h i | `info` |
| j x j s | C-x C-s | `save-buffer` |

This is only a brief overview; see [Usage](docs/build/loco.md#usage) for a detailed explanation.

The default configuration is not the only way to use Loco. Loco can be [extensively customized](docs/build/loco.md#customization) with just a few lines of code. Many options are possible, including:

- Changing the key bindings used to enable, disable, or activate Loco;
- Changing the keys used while Loco reads a key sequence;
- Configuring activation keys that also function as modifiers; and
- Configuring activation keys that avoid modifiers completely.

## Documentation

This project includes a user manual which includes information on how to install this package.

The user manual is available here, in five formats:

- [Markdown](docs/build/loco.md)
- [HTML](docs/build/loco.html)
- [HTML Standalone](docs/build/loco-standalone.html)
- [Texinfo](docs/build/loco.texi)
- [Info](docs/build/loco.info)

## Author and copyright

Loco was written and copyright in 2024 by Chris McLaren ([@csmclaren](https://www.github.com/csmclaren)).

## License

This file is part of Loco.

Loco is licensed under the [GNU](https://www.gnu.org) General Public License v3.0. See the [COPYING](COPYING) file for details.