Skip to content

Logs keypress into ngrams while using vim as part of a corpus for my personalized keyboard layout.

Notifications You must be signed in to change notification settings

quangd42/vim-usage-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Logs keypress into ngrams while using vim as part of a corpus for my personalized keyboard layout.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages