Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 1.79 KB

README.md

File metadata and controls

72 lines (50 loc) · 1.79 KB

Keyboard usage logger

Description

Utility to log all of the keypresses categorized into ngrams. while using nvim, mostly things that happen outside of insert mode. This will be used as part of a corpus to create a keyboard layout that is personalized and tailored to my kind of usage.

Currently supports genkey. Support for other analyzers to come.

Installation

This was written in python 3.12 so make sure you have python 3.12 installed. To start just clone the repo and cd into the project folder.

git clone https://github.com/ammon134/vim-usage-logger
cd vim-usage-logger

Optional but recommended: start an virtual env so that this script is contained in this workspace only.

python3.12 -m venv .venv
source .venv/bin/activate

In the project root folder install the script.

pip install .

Usage

In the project root folder run

key-logger

To stop the script the current hard-coded behavior is to use command .end in the terminal where the script is running.

Command: .end

Expect logger.db created in the root of the project folder that contains logged usage.

Notes

In MacOS, you will have to give the terminal appropriate access. See other limitations here.

Features

  • Logs all keypresses and outputs to a local database, save every 60 seconds.
  • All keypresses are logged into unigrams, diagrams, trigrams and skipgrams. (Skipgrams in genkey's logic for now).
  • View command to peak at the logged stats so far.
  • Save command to output corpus json file in genkey format.
  • Logging are saved into sessions.

TODO

  • Connects with neovim and only collects keypresses in Normal mode
  • Auto starts on OS start.