mogenson / ctrl2esc

Like caps2esc, but for Chrome OS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ctrl2esc

Like caps2esc, but for Chrome OS.

Description

It is my factual opinion that the best keyboard mapping is to have the Search key (Caps on a normal keyboard) send an Esc key event when pressed by itself and a Ctrl key event when used a modifier with another key. Try this out when using Vim or Tmux and thank me later.

The caps2esc utility for Linux does this perfectly. ctrl2esc is my attempt to mimic this behavior on Chrome OS. It creates an Esc key event when the Ctrl key is pressed by itself and otherwise leaves things alone. This works best when mapping the 🔍 key and Caps to Ctrl in the Chrome OS keyboard settings.

Usage

  1. Set Caps Lock and Search to Control in Settings->Device->Keyboard
  2. Enable the Developer mode switch in the top right of chrome://extensions
  3. Press the Load unpacked button and select the ctrl2esc folder
  4. Press Input method -> Manage input methods and select ctrl2esc in chrome://settings/languages
  5. Enable Show input options in the shelf
  6. Select EN ctrl2esc in the Chrome OS shelf, near the notifications

Caveats

The Chrome input method editor system only provides a valid context for text field entries. ctrl2esc will work for apps that are text fields like the Secure Shell app and the hterm based Crostini Terminal app.

Thanks to gbishop for the improved implementation!

About

Like caps2esc, but for Chrome OS

License:MIT License


Languages

Language:JavaScript 100.0%