From 1a353e316941eac55f44b0b64939120ac04b51d6 Mon Sep 17 00:00:00 2001 From: mechmerlin Date: Mon, 1 Jan 2018 12:53:24 -0800 Subject: [PATCH] Add code submitted by profanum429 - Add HHKB style top row to v2.h - Modify read_rows function to take into accout the caps lock firmware key - Modify default keymap to match the new v2.h - Adjust readmes --- keyboards/eagle_viper/readme.md | 1 + keyboards/eagle_viper/v2/keymaps/default/keymap.c | 4 ++-- keyboards/eagle_viper/v2/matrix.c | 6 +++--- keyboards/eagle_viper/v2/readme.md | 2 ++ keyboards/eagle_viper/v2/v2.h | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/keyboards/eagle_viper/readme.md b/keyboards/eagle_viper/readme.md index e1e8f544b8..642b30a72a 100644 --- a/keyboards/eagle_viper/readme.md +++ b/keyboards/eagle_viper/readme.md @@ -9,3 +9,4 @@ Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127) Make example for this keyboard (after setting up your build environment): make octagon/v2:default + diff --git a/keyboards/eagle_viper/v2/keymaps/default/keymap.c b/keyboards/eagle_viper/v2/keymaps/default/keymap.c index a2d832aaba..eb5d3064e3 100644 --- a/keyboards/eagle_viper/v2/keymaps/default/keymap.c +++ b/keyboards/eagle_viper/v2/keymaps/default/keymap.c @@ -18,14 +18,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ [0] = KEYMAP(\ - 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_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_NO, KC_BSPC, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL, KC_NO), [1] = KEYMAP(\ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/eagle_viper/v2/matrix.c b/keyboards/eagle_viper/v2/matrix.c index e113e50772..5e04ee98aa 100644 --- a/keyboards/eagle_viper/v2/matrix.c +++ b/keyboards/eagle_viper/v2/matrix.c @@ -147,8 +147,8 @@ static void init_rows(void) { } static uint8_t read_rows(uint8_t col) { - if (col == 16) { - return PINE&(1<<2) ? 0 : (1<<0); + if (col == 0) { + return PINE&(1<<2) ? 0 : (1<<2); } else { return (PIND&(1<<0) ? (1<<0) : 0) | (PIND&(1<<1) ? (1<<1) : 0) | @@ -161,7 +161,7 @@ static uint8_t read_rows(uint8_t col) { uint8_t read_fwkey(void) { - return PINE&(1<<2) ? 0 : (1<<0); + return PINE&(1<<2) ? 0 : (1<<2); } /* Columns 0 - 15 diff --git a/keyboards/eagle_viper/v2/readme.md b/keyboards/eagle_viper/v2/readme.md index f5df38dd51..4dc320a5ef 100644 --- a/keyboards/eagle_viper/v2/readme.md +++ b/keyboards/eagle_viper/v2/readme.md @@ -26,3 +26,5 @@ The Duck Eagle/Viper V2 PCB consists of: Thanks to Ralf Schmitt for previous implementations in his [TMK fork](https://github.com/xauser/tmk_keyboard/tree/xauser/) and few helping words. Based heavily on Rasmus Schults [Duck Lightsaver QMK Port](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lightsaver) + +Special thanks to profanum429 for debugging help and contributions to getting my Eagle code to work for the Viper. diff --git a/keyboards/eagle_viper/v2/v2.h b/keyboards/eagle_viper/v2/v2.h index bd3fb537d0..db4d09007a 100644 --- a/keyboards/eagle_viper/v2/v2.h +++ b/keyboards/eagle_viper/v2/v2.h @@ -19,13 +19,13 @@ #include "../eagle_viper.h" #define KEYMAP( \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, \ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, \ K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2O, \ K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1M, K1N, K1O, \ K0A, K0B, K0C, K0J, K0K, K0L, K0M, K0N, K0O \ ) { \ - { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, KC_NO, K4O, }, \ + { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, }, \ { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, KC_NO, K3O, }, \ { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, KC_NO, K2O, }, \ { K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, K1O, }, \