f77: Add jackhill's layout jackhill
authorJack Hill <jackhill@jackhill.us>
Thu, 9 Sep 2021 04:02:17 +0000 (00:02 -0400)
committerJack Hill <jackhill@jackhill.us>
Thu, 9 Sep 2021 04:11:06 +0000 (00:11 -0400)
* keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/: Add a personal
layout for jackhill's f77 Brand New Model F keyboard.
* Makefile: Do not look for qmk utility to allow installing requirements
via Guix.
* guix-readme.md: Document Guix procedures.

Makefile
guix-readme.md [new file with mode: 0644]
keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/config.h [new file with mode: 0644]
keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/keymap.c [new file with mode: 0644]
keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/readme.md [new file with mode: 0644]

index 9478c14..08665ba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,16 @@ $(info QMK Firmware $(QMK_VERSION))
 endif
 endif
 
+# Determine which qmk cli to use
+ifeq (,$(shell which qmk))
+    QMK_BIN = true
+else
+    QMK_BIN = true
+endif
+
+# avoid 'Entering|Leaving directory' messages
+MAKEFLAGS += --no-print-directory
+
 ON_ERROR := error_occurred=1
 
 BREAK_ON_ERRORS = no
diff --git a/guix-readme.md b/guix-readme.md
new file mode 100644 (file)
index 0000000..0966eed
--- /dev/null
@@ -0,0 +1,19 @@
+The following command produces an environment suitable for building
+firmware for AVR keyboards.
+
+TODO: make this an actual manifest, or better yet put the whole build
+process into Guix ðŸ˜€
+
+```
+guix environment -C --ad-hoc coreutils make avr-toolchain \
+python python-appdirs python-argcomplete python-colorama \
+python-nose2 python-flake8 python-pep8 findutils sed grep \
+diffutils bash which gawk
+```
+
+To install the fimrware:
+* `guix environment --ad-hoc dfu-programmer`
+* both shifts and B to enter bootloader
+* `sudo dfu-programmer atmega32u2 erase`
+* `sudo dfu-programmer atmega32u2 flash FILENAME.hex`
+
diff --git a/keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/config.h b/keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/config.h
new file mode 100644 (file)
index 0000000..c58310f
--- /dev/null
@@ -0,0 +1,19 @@
+/* Copyright 2020 Purdea Andrei
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/keymap.c b/keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/keymap.c
new file mode 100644 (file)
index 0000000..c62df7c
--- /dev/null
@@ -0,0 +1,90 @@
+/* Copyright 2020 Purdea Andrei
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+    _BASE,
+    _FN,
+    _FN2
+};
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+    QMKBEST = SAFE_RANGE,
+    QMKURL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    /* Base */
+    [_BASE] = LAYOUT_ansi_nonhhkb_split_shift_regular_backspace(
+        KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,            KC_PSCR,   KC_SLCK,   KC_PAUS,
+        KC_TAB,    KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,        KC_INSERT,   KC_HOME,   KC_PGUP,
+        KC_CAPS,     KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,            KC_DELETE,   KC_END,   KC_PGDN,
+        KC_LSFT,         KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN),   KC_ESC,   KC_UP,   KC_MUTE,
+        KC_LCTRL, KC_LGUI, KC_LALT,                      KC_SPC,                  KC_RALT, KC_RGUI, KC_RCTRL,     KC_LEFT, KC_DOWN, KC_RIGHT
+    ),
+    [_FN] = LAYOUT_ansi_nonhhkb_split_shift_regular_backspace(
+        KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,   KC_F9, KC_F10,    KC_F11, KC_F12, KC_INS,            KC_HOME,   KC_UP,   KC_PGUP,
+        KC_NO,      KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_NO, KC_DEL,          KC_LEFT,   KC_NO,   KC_RIGHT,
+        _______,     KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_NO, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_NO,  KC_END,    KC_DOWN, KC_PGDN,
+        _______,         KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______,      KC_VOLD,    KC_EJCT,   KC_VOLU,
+        _______, KC_NO, _______,                             MO(_FN2),                           _______, KC_NO, _______,      KC_BRIGHTNESS_DOWN,     KC_NO,   KC_BRIGHTNESS_UP
+    ),
+    [_FN2] = LAYOUT_ansi_nonhhkb_split_shift_regular_backspace(
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER,             _______, _______, _______,
+        _______,     _______, _______, EEPROM_RESET, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______,      _______, _______, _______,
+        _______,         _______, _______, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______,                _______, _______, _______,
+        _______,             _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,          _______, _______, _______,
+        _______, _______, _______,                             _______,                                       _______, _______, _______,          _______, _______, _______
+    )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+    switch (keycode) {
+        case QMKBEST:
+            if (record->event.pressed) {
+                // when keycode QMKBEST is pressed
+                SEND_STRING("QMK is the best thing ever!");
+            } else {
+                // when keycode QMKBEST is released
+            }
+            break;
+        case QMKURL:
+            if (record->event.pressed) {
+                // when keycode QMKURL is pressed
+                SEND_STRING("https://qmk.fm/\n");
+            } else {
+                // when keycode QMKURL is released
+            }
+            break;
+    }
+    return true;
+}
+
+/*
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool led_update_user(led_t led_state) {
+    return true;
+}
+*/
diff --git a/keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/readme.md b/keyboards/xwhatsit/brand_new_model_f/f77/keymaps/jackhill/readme.md
new file mode 100644 (file)
index 0000000..bc39609
--- /dev/null
@@ -0,0 +1,10 @@
+# A  keymap for xwhatsit/brand_new_model_f/f77/$(CONTROLLER)
+
+This is the default keymap for the HHKB Split Shift and Split Backspace, and it has 0-9 and cursor keys on the right side block
+
+make command for this layout is:
+
+```
+make xwhatsit/brand_new_model_f/f77:jackhill
+```
+