Giter Site home page Giter Site logo

home-row-control's Introduction

Home Row Control

If you use a shortcut keys with Ctrl often, you can create a more ergonomic layout by using Caps Lock and Enter, two big keys in the home row, as Ctrl modifiers.

You need not give up on the key behavior you are used to: Enter and Caps Lock will act as usual when you strike them a single time, or like Ctrl when held down as a modifier for other keys.

Supported platforms

Home Row Control uses X11, which means no native Windows or Mac support.

(help wanted to support other platforms! see bugs #1 and #2)

Dependencies

  • Xcape
  • xmodmap (from x11-server-utils)
  • posix sh (eg. dash)
  • optionally systemd, to run automatically when you start your X session

(help wanted to support auto-start for other init systems! see bug #8)

Installing

You can find binary packages (deb, rpm, and tar) plus a self-executing .sh installer in releases.

After installing, run systemctl --user start home-row-control.

Usage

Run _home_row_control to activate for the current session. Optionally, set up your system to run that command automatically on login.

Detailed explanation of effects

  1. Enter is reassigned to Hyper which should have no effect in most contexts. When you press Enter, the system sees a key up and key down event corresponding to Hyper and also applies the same modifier as if a Control were held down.

    If you tap it briefly (<1 second) without pressing other keys between press and release, it will trigger the normal Enter behavior. This means the key press will not register immediately when you press, but will instead come a fraction of a second later upon release.

  2. Caps Lock is reassigned to Right Control. When you press Caps Lock the system sees a key up and key down event corresponding to Right Control and applies its modifier.

    If you tap either Caps Lock or Right Control briefly (<1 second) without pressing any other keys between press and release, it will trigger the normal Caps Lock behavior.

    I chose to use Right Control this way because X11 apparently doesn't recognize separate left- and right- Hyper keys. If you know of a better option that does not change the behavior of the normal control keys at all, please let me know.

Troubleshooting

Sometimes the system seems to lose the keymap. If you're using systemd you can reset like so:

$ systemctl --user restart home-row-control

Otherwise you can serach for the home-row-control xcape process and kill it, then run _home_row_control again.

Useful fact

It might be helpful to know that Ctrl+m replicates the effect of the Enter key when it's temporarily disabled during a home-row-control outage. I would like to know how to make it more resillient, if you have ideas please propose them!

Building packages

You can use the included package script to build your own packages. The packaging dependencies are:

  • ruby
  • fpm (installed as a ruby gem)
  • bash
  • debuild and rpmbuild

Running the packaging script

  1. in the project directory, run bundle install
  2. run bundle exec ./package

home-row-control's People

Contributors

ryanprior avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

home-row-control's Issues

Install script

Find out the appropriate mechanism to execute a script when starting an X session, then offer that as an "install" option.

Suppress remapped key event

Is there a way for xcape to eat the remapped key event and make other processes ignore it? Some finicky programs (like Emacs) are sensitive to the keypress and behave differently than when a real control key is pressed, which is undesirable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.