Quickstart¶
Install the project using Cargo. This will place the built binaries in the
~/.cargodirectory.1
cargo install --git https://github.com/andrew-hardin/virtual-space-cadet.git
Verify the binaries are findable. If this fails, the
~/.cargodirectory needs to be added to the$PATH.1 2
which spacecadet spacecadet --help
Download the demo matrix and layer files. The matrix file maps event codes to matrix locations. The layer file converts matrix locations to behaviors.
1 2
wget https://github.com/andrew-hardin/virtual-space-cadet/raw/master/keyboards/vim_cursor/layers.json wget https://github.com/andrew-hardin/virtual-space-cadet/raw/master/keyboards/vim_cursor/matrix.json
Find your physical keyboard device under
/dev/input. This isn’t always easy task. Runningevtestcan sometimes be helpful in determining which device is your keyboard.Attach the
spacecadetdriver to your keyboard device and remap the keys using the demo matrix and layer files.1 2 3
spacecadet --device /dev/input/your-device \ --layer layers.json \ --matrix matrix.json
Tip
You may encounter permissions problems. The path of least resistance is to run the application as root.
An alternative long-term fix involves modifying permissions such that you can read the
/dev/input/your-deviceand write to/dev/uinput.With the
spacecadetdriver running, try typing on your physical keyboard - it should react normally. However, holding the space bar for longer than 150 milliseconds temporarily switches to a cursor layer. With space held, usehjklto move the cursor left, down, up and right.For more information on this particular layout, read about the Vim Cursor layout.