Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jhelvy/jKeyboard

Files for creating my custom keyboard, including my Karabiner-Elements settings and WASD Keyboard layout files
https://github.com/jhelvy/jKeyboard

Last synced: 4 days ago
JSON representation

Files for creating my custom keyboard, including my Karabiner-Elements settings and WASD Keyboard layout files

Awesome Lists containing this project

README

        

# jKeyboard
If you were a professional guitarist, wouldn't you play on a premium guitar?

If you were a chef, wouldn't you invest in a premium chef knife?

Well, as someone who types literally [millions](http://whatpulse.org/jhelvy) of keystrokes a year for my profession, I decided to invest in a premium keyboard by combining [Karabiner-Elements](https://pqrs.org/osx/karabiner/) with a customized [WASD Keyboard](http://www.wasdkeyboards.com/). This repository contains the files for creating my custom keyboard:
- The `karabiner` folder contains the json files for my [Karabiner-Elements](https://pqrs.org/osx/karabiner/) settings.
- The `wasd_files` folder contains the Adobe Illustrator file used to make my customized [WASD keyboard](http://www.wasdkeyboards.com/).

My [Karabiner-Elements](https://pqrs.org/osx/karabiner/) settings enable all sorts of keyboard modifications, including:
- Use J / I / K / L as arrow keys for [navigating the cursor](#navigation) and [selecting text](#selecting-text).
- Create more convenient and comfortable shortcuts for [common commands](#common-shortcuts), like `cut`, `copy`, `paste`, `delete`, `backspace`, `undo`, `redo`, `find`, and `escape`.
- [Launch applications](#other-shortcuts) like `Google Chrome` or `Terminal` with a single hotkey.
- Open `Google Chrome` to a webpage (e.g. gmail) with a single hotkey
- Type my email send off (`"Cheers, John"`) with a single hotkey.

# Table of Contents
- [Customized WASD Keyboard](#customized-wasd-keyboard)
- [Karabiner-Elements Settings](#karabiner-elements-settings)
- [Installation (mac)](#installation-mac)
- [Caps_lock Keyboard](#caps_lock-keyboard)
- [Navigation](#navigation)
- [Selecting Text](#selecting-text)
- [Common Shortcuts](#common-shortcuts)
- [Other Shortcuts](#other-shortcuts)
- [Custom Function Keys](#custom-function-keys)
- [Other Commands](#other-commands)
- [Example json Settings](#example-json-settings)
- [License](#license)

# Customized WASD Keyboard
My [WASD keyboard](http://www.wasdkeyboards.com/) looks like this:
![alt text](https://raw.github.com/jhelvy/jKeyboard/master/wasd_files/keyboard_preview.jpg "Keyboard Layout")

All I did to create this was edit the Adobe Illustrator keyboard file (`./wasd_files/keyboard_layout_104.ai`). In addition to adding a bunch of customized icons (e.g. the function keys), I changed the caps lock key to a blue hyper key that when held down (with the help of [Karabiner-Elements](https://pqrs.org/osx/karabiner/)) essentially creates another keyboard with an entirely different functionality (indicated by the small blue icons in the lower-right corners of each key).

For those curious, the Chinese text on the spacebar is the idiom "晴耕雨读", which literally means "Sunny farm rain read." The meaning is to farm on sunny days and read on rainy days. In other words, work hard, life a simple life, and enjoy each present moment.

# Karabiner-Elements Settings
The [Karabiner-Elements](https://pqrs.org/osx/karabiner/) json settings are found in `./karabiner/jKeyboard.json`. These particular settings include three separate "profiles" that you can select in the Karabiner preference window: 1) jKeyboard-Apple, 2) jKeyboard-WASD, and 3) jKeyboard-CM. The main profile is "jKeyboard-Apple," which is configured for a standard Apple keyboard and includes all the settings described on this page. The other two profiles have additional functionality that is specific to my [WASD keyboard](http://www.wasdkeyboards.com/) and another keyboard by Cooler Master, which I use on different Mac machines.

## Installation (mac)
1. Download [Karabiner-Elements](https://pqrs.org/osx/karabiner/) and Install.
2. Open the `karabiner.json` configuration file. To find it, open Terminal.app and type `open ~/.config`, which will open the hidden .config directory in a new Finder window. There you can navigate to `karabiner/karabiner.json` and open/edit that file.
3. Copy-paste the settings in one of the json files in the `./karabiner/` folder in this repo to overwrite the default karabiner.json file.

## Caps_lock Keyboard
One of the primary things my `jKeyboard` settings does is modify the caps lock key such that when held down it essentially creates another keyboard with an entirely different functionality. Here is a summary of the current settings:

### Navigation
| Key Combination | Maps to | Description |
|:-------------------|:--------------|:---------------|
| caps lock | Nothing | Trigger for "hyper" keyboard |
| caps lock + J / I / K / L | / / / | Arrow Keys |
|caps lock + command + I / K | command + / | Home / End |
|caps lock + command + J / L | command + / | Go to Start / End of Line |
|caps lock + U / O | command + / | Go to Start / End of Line |
|caps lock + spacebar | control | Control key |
|caps lock + spacebar + I / K | / | Page Up / Page Down |
|caps lock + spacebar + J / L | control + / | Go to Start / End of Next Word |

### Selecting Text
| Key Combination | Maps to | Description |
|:-------------------|:--------------|:---------------|
|caps lock + A | shift | Shift key |
|caps lock + A + J / I / K / L | shift + / / / | Select Text |
|caps lock + A + command + I / K | command + shift + / | Select all to top / bottom |
|caps lock + A + command + J / L | command + shift + / | Select until Start / End of Line |
|caps lock + A + U / O | command + shift + / | Select until Start / End of Line |
|caps lock + A + , / . | control + shift + / | Select until Start / End of Next Word |
|caps lock + A + [ / ] | option + shift + / | Select until Start / End of Paragraph |

### Common Shortcuts
| Key Combination | Maps to | Description |
|:-------------------|:--------------|:---------------|
|caps lock + N | backspace | Backspace / Delete |
|caps lock + H | del | Forward Delete |
|caps lock + S | command + X | Cut |
|caps lock + D | command + C | Copy |
|caps lock + F | command + V | Paste |
|caps lock + R | command + Z | Undo |
|caps lock + T | command + Y | Redo |
|caps lock + M | command + F | Find |
|caps lock + . | command + G | Find Next |
|caps lock + , | command + shift + G | Find Previous |
|caps lock + E | Esc | Escape |

### Other Shortcuts
| Key Combination | Action |
|:------------------------|:-------------|
|caps lock + C | Open `Google Chrome` |
|caps lock + Z | Open the file `'foo.txt'` in my Dropbox Folder |
|caps lock + Quote (') | Open my `Dropbox` folder |
|caps lock + / | Open my `Downloads` folder |
|caps lock + P | Open my `pCloud Drive` folder |
|caps lock + A + P | Open my `pCloud Sync` folder |
|caps lock + 8 | Open `Terminal` |
|caps lock + 2 | command + control + 2 (my Sublime Text shortcut to split into two windows)|
|caps lock + G | Type my email send off ("`Cheers, John`") |
|caps lock + Y |control + Y (my Sublime Text shortcut to send selected text to a REPL) |
|caps lock + 9 |control + 9 (my Sublime Text shortcut to shift focus to the LEFT panel) |
|caps lock + 0 |control + 0 (my Sublime Text shortcut to shift focus to the RIGHT panel) |

## Custom Function Keys
I also changed my function keys to do certain things. While f1 to f4 and f10 to f12 are the standard mac settings, the keys f5 to f8 open specific web pages, and f9 takes a screen shot:

| Key | Action |
|:-------------|:-------------|
| f1 | Brightness Decrease |
| f2 | Brightness Increase |
| f3 | Mission Control |
| f4 | Dashboard |
| f5 | Open `Gmail` in Google Chrome |
| f6 | Open `Google Calendar` in Google Chrome |
| f7 | Open `Facebook` in Google Chrome |
| f8 | Open `Intellicast Weather` in Google Chrome |
| f9 | command + shift + 3 (Save screen shot to Desktop) |
| f10 | Mute |
| f11 | Volume Decrease |
| f12 | Volume Increase |

## Other Commands
These are a few other tricks that I find particularly useful:

| Key | Action |
|:-------------|:-------------|
| Tap Left shift | ( |
| Tap Right shift | ) |
| Hold Esc | command + W (Close Window) |

# Example json Settings
I learned a lot about how to write json settings to get Karabiner-Elements to do different things. I included the following examples in the `./karabiner/json_examples` folder.

| File | Description |
|:--------------|:------------------|
| caps_lock_arrows.json | Hold the caps lock key to turn the J / I / K / L keys into the / / / keys |
| launch_application.json | Launch an Application (in this case Google Chrome) by typing right option + C |
| open_browser_to_page.json | Open Google Chrome to www.google.com by typing right option + C |
| tap_shift_keys_for_parentheses.json | Tap left_shift / right_shift to get ( / ) |

# License
GPL-3

📣 Shout-out to [@jasonrudolph](https://github.com/jasonrudolph/keyboard), [@Vonng](https://github.com/Vonng/Capslock), and the [Karabiner Vi Mode Setting](https://pqrs.org/osx/karabiner/complex_modifications/#vi_mode) for inspiration - I learned a lot by copying a lot of their json code!