From be204f9cddce6d1a795481c4cee51188eadaf181 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 30 May 2017 13:23:09 -0400 Subject: [PATCH] Update readme --- keyboards/nyquist/keymaps/hexwire/README.md | 68 +++++++++++-------- keyboards/nyquist/keymaps/hexwire/keymap.c | 2 +- .../keymaps/hexwire/keymap_converter.py | 39 +++++++++++ .../keymaps/hexwire/keymap_to_readme.rb | 2 +- keyboards/nyquist/readme.md | 43 ++++-------- 5 files changed, 93 insertions(+), 61 deletions(-) create mode 100755 keyboards/nyquist/keymaps/hexwire/keymap_converter.py diff --git a/keyboards/nyquist/keymaps/hexwire/README.md b/keyboards/nyquist/keymaps/hexwire/README.md index edf2b6627..137bdead8 100644 --- a/keyboards/nyquist/keymaps/hexwire/README.md +++ b/keyboards/nyquist/keymaps/hexwire/README.md @@ -1,4 +1,4 @@ -Hexwire's Let's Split Layout +Hexwire's Nyquist Layout ============================ ### Changes from default layout @@ -23,73 +23,79 @@ Hexwire's Let's Split Layout ## Layouts -### Qwerty +### QWERTY ``` ,----+----+----+----+----+----. ,----+----+----+----+----+----. - TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, +|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC| |----+----+----+----+----+----| |----+----+----+----+----+----| - X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, +|TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS| |----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 , +| X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT| |----+----+----+----+----+----| |----+----+----+----+----+----| - X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT +|LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT| `----+----+----+----+----+----' `----+----+----+----+----+----' ``` ### Colemak - ``` ,----+----+----+----+----+----. ,----+----+----+----+----+----. - TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, +|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC| +|----+----+----+----+----+----| |----+----+----+----+----+----| +|TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS| |----+----+----+----+----+----| |----+----+----+----+----+----| - X0 , A , R , S , T , D , H , N , E , I , O ,QUOT, +| X0 , A , R , S , T , D , H , N , E , I , O ,QUOT| |----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 , +|LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 | |----+----+----+----+----+----| |----+----+----+----+----+----| - X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT +| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT| `----+----+----+----+----+----' `----+----+----+----+----+----' ``` ### Dvorak - ``` ,----+----+----+----+----+----. ,----+----+----+----+----+----. - TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, +|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC| +|----+----+----+----+----+----| |----+----+----+----+----+----| +|TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS| |----+----+----+----+----+----| |----+----+----+----+----+----| - X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, +| X0 , A , O , E , U , I , D , H , R , N , S ,SLSH| |----+----+----+----+----+----| |----+----+----+----+----+----| - LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , +|LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 | |----+----+----+----+----+----| |----+----+----+----+----+----| - X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT +| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT| `----+----+----+----+----+----' `----+----+----+----+----+----' ``` ### Lower - ``` ,----+----+----+----+----+----. ,----+----+----+----+----+----. - , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , +|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC| +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , | |----+----+----+----+----+----| |----+----+----+----+----+----| - DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, +|DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE| |----+----+----+----+----+----| |----+----+----+----+----+----| - ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , +| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, | |----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , DEL , , P0 ,PDOT, , +| , , , , , , DEL , , P0 ,PDOT, , | `----+----+----+----+----+----' `----+----+----+----+----+----' ``` ### Raise - ``` ,----+----+----+----+----+----. ,----+----+----+----+----+----. - ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , +|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC| |----+----+----+----+----+----| |----+----+----+----+----+----| - DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, +| ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, | |----+----+----+----+----+----| |----+----+----+----+----+----| - MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , , +|DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS| |----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , +|MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , , , , , , , , , , , | `----+----+----+----+----+----' `----+----+----+----+----+----' ``` @@ -97,12 +103,14 @@ Hexwire's Let's Split Layout ``` ,----+----+----+----+----+----. ,----+----+----+----+----+----. - F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , +|F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 | +|----+----+----+----+----+----| |----+----+----+----+----+----| +| , , , , , , , , , , , | |----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , , +| , , , , , , , , , , , | |----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , , +| , , , , , , , , , , , | |----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , +| , , , , , , , , , , , | `----+----+----+----+----+----' `----+----+----+----+----+----' ``` diff --git a/keyboards/nyquist/keymaps/hexwire/keymap.c b/keyboards/nyquist/keymaps/hexwire/keymap.c index ba8f96930..1c578ac80 100644 --- a/keyboards/nyquist/keymaps/hexwire/keymap.c +++ b/keyboards/nyquist/keymaps/hexwire/keymap.c @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| , , , , , , , , , , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , + , , , , , , , , , , , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_converter.py b/keyboards/nyquist/keymaps/hexwire/keymap_converter.py new file mode 100755 index 000000000..683f64da4 --- /dev/null +++ b/keyboards/nyquist/keymaps/hexwire/keymap_converter.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +import re + +class KeymapConverter: + + def __init__(self, filename): + self.filename = filename + + def read_keymaps(self): + with open(self.filename) as f: + lines = f.readlines() + + mode = 0 + for line in lines: + line = line[:-1] + if mode == 0: + if "KC_KEYMAP" in line: + matches = re.match(r'.*\[(.*)\] = .*', line) + if matches: + layer_name = matches.group(1) + layer_name = layer_name[1:].capitalize() + print '###', layer_name + print '```' + mode = 1 + elif mode == 1: + if "//" in line: + print line[4:] + elif ")" in line: + mode = 0 + print '```' + print + elif line[-1] == ',': + print "|" + line[5:-1] + "|" + else: + print "|" + line[5:] + "|" + +converter = KeymapConverter('keymap.c') +converter.read_keymaps() diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb b/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb index 158e02647..7285b008a 100755 --- a/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb +++ b/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb @@ -15,7 +15,7 @@ class KeymapConverter def parse_line(line) case @mode when :search - if line =~ /COMPACT_KEYMAP/ + if line =~ /KC_KEYMAP/ puts "### #{line}" puts "```" @mode = :parse diff --git a/keyboards/nyquist/readme.md b/keyboards/nyquist/readme.md index 7e5a54602..b2bf01389 100644 --- a/keyboards/nyquist/readme.md +++ b/keyboards/nyquist/readme.md @@ -1,51 +1,44 @@ -Let's Split -====== +The Nyquist Keyboard +==================== -This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ - -Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 -based boards. +The Nyquist is a 60% split ortholinear board by [Keebio](https://keeb.io). It has been designed in a similar manner to the Let's Split v2 by /u/wootpatoot. Each half of the keyboard is arranged in a 5x6 grid. There is an option to use a 2u key with PCB mounted MX stablizers, in place of the two innermost 1u keys on the bottom row. ## Build Guide -A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide) +Since the design is very similar to the Let's Split v2, the build guide for that can be used while the build guide for the Nyquist is being fully developed. A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide) There is additional information there about flashing and adding RGB underglow. ## First Time Setup -Download or clone the whole firmware and navigate to the keyboards/lets_split directory. Once your dev env is setup, you'll be able to generate the default .hex using: +Download or clone the whole firmware and navigate to the keyboards/nyquist directory. Once your development environment is setup, you'll be able to generate the default .hex using: ``` -$ make rev2 +$ make serial ``` -You will see a lot of output and if everything worked correctly you will see the built hex files: +You will see a lot of output and if everything worked correctly you will see the built hex file: ``` -lets_split_rev2_serial.hex -lets_split_rev2_i2c.hex +nyquist_rev1_serial.hex ``` If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so: ``` -$ make rev2-YOUR_KEYMAP_NAME +$ make YOUR_KEYMAP_NAME ``` If everything worked correctly you will see a file: ``` -lets_split_rev2_YOUR_KEYMAP_NAME.hex +nyquist_rev1_YOUR_KEYMAP_NAME.hex ``` For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. -### Let's split 1.0 -If you have a first generation Let's Split you will need to use the revision 1 code. To do so, use `rev1` in all your commands instead. - Features -------- @@ -61,6 +54,9 @@ Some features supported by the firmware: reason you require a faster connection between the two halves. Note this requires an extra wire between halves and pull-up resistors on the data lines. +### 2u Support +In place of the two innermost 1u keys on the bottom row, a single 2u key can be used. If you choose to use this option, then in your keymap, set the innermost key on the bottom row to what you want the 2u key to be. For example, if using the 2u key on the left half of the board, set the keycode for the lower right key. + Required Hardware ----------------- @@ -100,21 +96,10 @@ The pull-up resistors may be placed on either half. It is also possible to use 4 resistors and have the pull-ups in both halves, but this is unnecessary in simple use cases. -Notes on Software Configuration -------------------------------- - -Configuring the firmware is similar to any other QMK project. One thing -to note is that `MATIX_ROWS` in `config.h` is the total number of rows between -the two halves, i.e. if your split keyboard has 4 rows in each half, then -`MATRIX_ROWS=8`. - -Also the current implementation assumes a maximum of 8 columns, but it would -not be very difficult to adapt it to support more if required. - Flashing ------- From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. -Example: `make rev2-serial-avrdude` +Example: `make rev1-serial-avrdude` Choosing which board to plug the USB cable into (choosing Master) -- 2.39.2