diff options
| author | Danny Nguyen <danny@keeb.io> | 2017-10-31 12:03:31 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-10-31 12:27:49 -0400 |
| commit | f9881793e3c9d521cc8c5e632114261d1be9f421 (patch) | |
| tree | 91f308ddde76f093beef70c9bf86fd61e6a57392 /keyboards/eco | |
| parent | 04b9b62bdc5ed394a06c5c73acdce0b261220e85 (diff) | |
| download | qmk_firmware-f9881793e3c9d521cc8c5e632114261d1be9f421.tar.gz qmk_firmware-f9881793e3c9d521cc8c5e632114261d1be9f421.zip | |
Add hexwire keymap for Eco
Diffstat (limited to 'keyboards/eco')
| -rw-r--r-- | keyboards/eco/eco.h | 17 | ||||
| -rw-r--r-- | keyboards/eco/keymaps/hexwire/keymap.c | 120 | ||||
| -rw-r--r-- | keyboards/eco/keymaps/hexwire/rules.mk | 25 |
3 files changed, 160 insertions, 2 deletions
diff --git a/keyboards/eco/eco.h b/keyboards/eco/eco.h index 4f8cfabd8..2615ac1ae 100644 --- a/keyboards/eco/eco.h +++ b/keyboards/eco/eco.h | |||
| @@ -8,7 +8,20 @@ | |||
| 8 | #include "rev2.h" | 8 | #include "rev2.h" |
| 9 | #endif | 9 | #endif |
| 10 | 10 | ||
| 11 | |||
| 12 | #include "quantum.h" | 11 | #include "quantum.h" |
| 13 | 12 | ||
| 14 | #endif \ No newline at end of file | 13 | // Used to create a keymap using only KC_ prefixed keys |
| 14 | #define KC_KEYMAP( \ | ||
| 15 | k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ | ||
| 16 | k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ | ||
| 17 | k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ | ||
| 18 | k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ | ||
| 19 | ) \ | ||
| 20 | { \ | ||
| 21 | { KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k010, KC_##k011, KC_##k012, KC_##k013, KC_##k014 }, \ | ||
| 22 | { KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k110, KC_##k111, KC_##k112, KC_##k113, KC_##k114 }, \ | ||
| 23 | { KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k210, KC_##k211, KC_##k212, KC_##k213, KC_##k214 }, \ | ||
| 24 | { KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k310, KC_##k311, KC_##k312, KC_##k313, KC_##k314 } \ | ||
| 25 | } | ||
| 26 | |||
| 27 | #endif | ||
diff --git a/keyboards/eco/keymaps/hexwire/keymap.c b/keyboards/eco/keymaps/hexwire/keymap.c new file mode 100644 index 000000000..c20d45c2b --- /dev/null +++ b/keyboards/eco/keymaps/hexwire/keymap.c | |||
| @@ -0,0 +1,120 @@ | |||
| 1 | |||
| 2 | // Default ECO Layout | ||
| 3 | // KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 | ||
| 4 | |||
| 5 | #include "eco.h" | ||
| 6 | #include "action_layer.h" | ||
| 7 | #include "eeconfig.h" | ||
| 8 | |||
| 9 | extern keymap_config_t keymap_config; | ||
| 10 | |||
| 11 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 12 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 13 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 14 | // entirely and just use numbers. | ||
| 15 | #define _QWERTY 0 | ||
| 16 | #define _LOWER 1 | ||
| 17 | #define _RAISE 2 | ||
| 18 | #define _FN3 3 | ||
| 19 | |||
| 20 | enum eco_keycodes { | ||
| 21 | QWERTY = SAFE_RANGE, | ||
| 22 | LOWER, | ||
| 23 | RAISE, | ||
| 24 | }; | ||
| 25 | |||
| 26 | // Fillers to make layering more clear | ||
| 27 | #define KC_ KC_TRNS | ||
| 28 | #define _______ KC_TRNS | ||
| 29 | #define XXXXXXX KC_NO | ||
| 30 | |||
| 31 | #define KC_RST RESET | ||
| 32 | #define KC_DBUG DEBUG | ||
| 33 | #define KC_LOWR MO(_LOWER) | ||
| 34 | #define KC_RASE MO(_RAISE) | ||
| 35 | #define KC_ENTS MT(MOD_LSFT, KC_ENT) | ||
| 36 | #define KC_ESCC MT(MOD_LCTL, KC_ESC) | ||
| 37 | #define KC_GRVF LT(_FN3, KC_GRV) | ||
| 38 | #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen | ||
| 39 | #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen | ||
| 40 | #define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen | ||
| 41 | #define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen | ||
| 42 | #define KC_RTOG RGB_TOG | ||
| 43 | #define KC_RMOD RGB_MOD | ||
| 44 | #define KC_RHUI RGB_HUI | ||
| 45 | #define KC_RHUD RGB_HUD | ||
| 46 | #define KC_RSAI RGB_SAI | ||
| 47 | #define KC_RSAD RGB_SAD | ||
| 48 | #define KC_RVAI RGB_VAI | ||
| 49 | #define KC_RVAD RGB_VAD | ||
| 50 | |||
| 51 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 52 | |||
| 53 | [_QWERTY] = KC_KEYMAP( | ||
| 54 | //,----+----+----+----+----+----+----+----+----+----+----+----+----+----. | ||
| 55 | TAB , Q , W , E , R , T ,LPRN,RPRN, Y , U , I , O , P ,MINS, | ||
| 56 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 57 | ESCC, A , S , D , F , G ,LBRC,RBRC, H , J , K , L ,SCLN,QUOT, | ||
| 58 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 59 | LSFT, Z , X , C , V , B ,LCBR,RCBR, N , M ,COMM,DOT ,SLSH,ENTS, | ||
| 60 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 61 | GRVF,LCTL,LALT,LGUI,LOWR,SPC ,SPC ,BSPC,BSPC,RASE,LEFT,DOWN, UP ,RGHT | ||
| 62 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 63 | ), | ||
| 64 | |||
| 65 | |||
| 66 | [_LOWER] = KC_KEYMAP( | ||
| 67 | //,----+----+----+----+----+----+----+----+----+----+----+----+----+----. | ||
| 68 | , 1 , 2 , 3 , 4 , 5 ,LPRN,RPRN, 6 , 7 , 8 , 9 , 0 , , | ||
| 69 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 70 | DEL ,CAPP,LEFT,RGHT, UP ,LBRC,LBRC,RBRC,RBRC, P4 , P5 , P6 ,PLUS,PIPE, | ||
| 71 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 72 | ,CPYP, , ,DOWN,LCBR,LCBR,RCBR,RCBR, P1 , P2 , P3 ,MINS, , | ||
| 73 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 74 | , , , , , , ,DEL ,DEL , , P0 ,PDOT, , | ||
| 75 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 76 | ), | ||
| 77 | |||
| 78 | [_RAISE] = KC_KEYMAP( | ||
| 79 | //,----+----+----+----+----+----+----+----+----+----+----+----+----+----. | ||
| 80 | ,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN, , | ||
| 81 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 82 | DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, , ,EQL ,HOME, , , ,BSLS, | ||
| 83 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 84 | MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , , | ||
| 85 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 86 | , , , , , , , , , , , , , | ||
| 87 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 88 | ), | ||
| 89 | |||
| 90 | [_FN3] = KC_KEYMAP( | ||
| 91 | //,----+----+----+----+----+----+----+----+----+----+----+----+----+----. | ||
| 92 | F12 , F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 ,F10 ,F11 , | ||
| 93 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 94 | RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , , , , | ||
| 95 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 96 | RST ,DBUG,RHUD,RSAD,RVAD, , , , , , , , , , | ||
| 97 | //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| | ||
| 98 | , , , , , , , , , , , , , | ||
| 99 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 100 | ), | ||
| 101 | |||
| 102 | }; | ||
| 103 | |||
| 104 | void persistant_default_layer_set(uint16_t default_layer) { | ||
| 105 | eeconfig_update_default_layer(default_layer); | ||
| 106 | default_layer_set(default_layer); | ||
| 107 | } | ||
| 108 | |||
| 109 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 110 | switch (keycode) { | ||
| 111 | case QWERTY: | ||
| 112 | if (record->event.pressed) { | ||
| 113 | persistant_default_layer_set(1UL<<_QWERTY); | ||
| 114 | } | ||
| 115 | return false; | ||
| 116 | break; | ||
| 117 | } | ||
| 118 | return true; | ||
| 119 | } | ||
| 120 | |||
diff --git a/keyboards/eco/keymaps/hexwire/rules.mk b/keyboards/eco/keymaps/hexwire/rules.mk new file mode 100644 index 000000000..7dab97942 --- /dev/null +++ b/keyboards/eco/keymaps/hexwire/rules.mk | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | |||
| 2 | |||
| 3 | # Build Options | ||
| 4 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 5 | # the appropriate keymap folder that will get included automatically | ||
| 6 | # | ||
| 7 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 8 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 9 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 10 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 11 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 12 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 13 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 14 | MIDI_ENABLE = no # MIDI controls | ||
| 15 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 16 | UNICODE_ENABLE = no # Unicode | ||
| 17 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 18 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 19 | |||
| 20 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 21 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 22 | |||
| 23 | ifndef QUANTUM_DIR | ||
| 24 | include ../../../../Makefile | ||
| 25 | endif | ||
