Skip to content

Instantly share code, notes, and snippets.

Karabiner layouts for symbols and navigation

Gavin Sinclair, January 2022

Introduction

I use Karabiner (configured with Gosu) to make advanced key mappings on my Apple computer. Karabiner allows you to create “layers”, perhaps simulating those on a programmable mechanical keyboard. I make good use of these layers to give me easy access (home-row or nearby) to all symbols and navigational controls, and even a numpad.

The motivation is to keep hand movement to a minimum. Decades of coding on standard keyboards has unfortunately left me with hand and wrist pain. I will soon enough own a small split keyboard which will force me to use layers to access symbols etc., so this Karabiner solution, which has evolved over months, is a training run for that.

Technical details for https://stackoverflow.com/a/44169445/6730571

Details of investigation:

On a base system, /usr/bin/java is a symlink that points to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java, which is an Apple wrapper tool that locates and executes the actual java.

(Do not touch anything in those 2 system directories. It should actually be impossible due to "System Integrity Protection" anyway.)

If you don't have Java installed, attempting to execute java will open a dialog that invites you to install it.

@nucatus
nucatus / moskowitz.sh
Created June 11, 2021 07:41 — forked from romen/moskowitz.sh
Ed25519 PKI script
#!/bin/bash
# from https://tools.ietf.org/html/draft-moskowitz-ecdsa-pki-03 (adapted for EdDSA)
# Workdir is set to $1, $workdir or $PWD (in this order of precedence)
workdir=${1:-${workdir:-$PWD}}
OPENSSL=${OPENSSL:-$(which openssl)}
OSSL_APPS_OPT="-engine libsuola"
#OSSL_ENCRYPT_OPT="-aes256"
@nucatus
nucatus / wiegand-gpio.c
Created April 19, 2020 12:56 — forked from gabirx/wiegand-gpio.c
Gpio read module
/* wiegand-gpio.c.
*.
* Wiegand test driver using GPIO an interrupts..
*
*/
/* Standard headers for LKMs */
#include <linux/module.h><----->/* Needed by all modules */
#include <linux/kernel.h><----->/* Needed for KERN_INFO */
#include <linux/kobject.h>
@nucatus
nucatus / AssertTimeTests.java
Created July 15, 2019 11:17
Asserting times
package spcx.octopus.test;
import org.apache.commons.lang3.StringUtils;
import org.assertj.core.api.Assertions;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import java.time.Instant;
@nucatus
nucatus / AssertTimeTests.java
Created July 15, 2019 11:03
Compare assertion times
package spcx.octopus.test;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.slf4j.Logger;
import java.time.Instant;
import static org.slf4j.LoggerFactory.getLogger;
@nucatus
nucatus / TestCase.java
Created August 23, 2018 01:38
Java 8 compiler failure
import java.util.Collection;
import java.util.stream.Collectors;
public class TestCase
{
Class clazz;
Collection<Target> targets;
public Collection<Target> getTargets()
{
@nucatus
nucatus / add-custom-certificate.sh
Created August 24, 2016 11:33 — forked from markthebault/add-custom-certificate.sh
inject custom certificate to docker-for-mac beta (1.12.0-rc4-beta20 build:10404)
#!/bin/bash
if [ "$#" -ne 2 ] || ! [ -d "$1" ]; then
echo "Usage: $0 /Path/To/Certificate CERT_NAME" >&2
exit 1
fi
# This assumes the cert is in the same directory as the script
source="$( cd $1 && pwd )"
# ca-certificate of the VM
### Keybase proof
I hereby claim:
* I am nucatus on github.
* I am nucatus (https://keybase.io/nucatus) on keybase.
* I have a public key whose fingerprint is C1EB 157A 9E1A 47E5 E878 CC77 C49B 78A1 1B71 0526
To claim this, I am signing this object: