aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAquaCylinder <56627792+AquaCylinder@users.noreply.github.com>2021-08-19 17:41:05 +0200
committerGitHub <noreply@github.com>2021-08-19 16:41:05 +0100
commit468661280ba2a57e8c834d5ef1df98bc6cb8354a (patch)
tree881b49ff7fbad7526eccc0b8d1501b8e2e7bdad2
parent068ab2800cd4eccc30b312f25d2959e23f31e9fb (diff)
downloadqmk_firmware-468661280ba2a57e8c834d5ef1df98bc6cb8354a.tar.gz
qmk_firmware-468661280ba2a57e8c834d5ef1df98bc6cb8354a.zip
emi20 update (#14013)
* Update keymap & readme -Keymap.c: Key combinations removed for resetting and added a new way to reset. Also removed unused timer code. -config.h & rules.mk: Removed on kemap level (these were there for the key combo's) -Readme.md: Changed the preview image and changed the description to reset the keyboard. Also added what connector type is used. * Update readme.md Better wording on how to get the keyboard in bootloader mode * Update keymap.c Switched + and - around, same with / and *.
-rw-r--r--keyboards/emi20/keymaps/default/config.h19
-rw-r--r--keyboards/emi20/keymaps/default/keymap.c82
-rw-r--r--keyboards/emi20/keymaps/default/rules.mk1
-rw-r--r--keyboards/emi20/readme.md5
4 files changed, 35 insertions, 72 deletions
diff --git a/keyboards/emi20/keymaps/default/config.h b/keyboards/emi20/keymaps/default/config.h
deleted file mode 100644
index 02638312a..000000000
--- a/keyboards/emi20/keymaps/default/config.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* Copyright 2021 Aquacylinder
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#define COMBO_COUNT 1
diff --git a/keyboards/emi20/keymaps/default/keymap.c b/keyboards/emi20/keymaps/default/keymap.c
index 4c33ee85e..b0400108f 100644
--- a/keyboards/emi20/keymaps/default/keymap.c
+++ b/keyboards/emi20/keymaps/default/keymap.c
@@ -1,58 +1,51 @@
1/* Copyright 2021 Aquacylinder 1/* Copyright 2021 Aquacylinder
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or 5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version. 6 * (at your option) any later version.
7 * 7 *
8 * This program is distributed in the hope that it will be useful, 8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 * 12 *
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#include QMK_KEYBOARD_H 17#include QMK_KEYBOARD_H
18bool is_ERESET_active = false; 18
19uint16_t ERESET_timer = 0;
20 19
21enum custom_keycodes { 20enum custom_keycodes {
22 MACRO1 = SAFE_RANGE, //MACRO1 can be anything you want see the qmk documentation 21 MACRO1 = SAFE_RANGE, //MACRO1 can be anything you want see the qmk documentation
23 MACRO2, //MACRO2 Same thing, you can add as many as you like 22 MACRO2, //MACRO2 Same thing, you can add as many as you like
24}; 23};
25 24
26//Reset combo key naming
27enum combo_events {
28 ENLCK_reset,
29};
30
31//Reset combo key setting the keys
32const uint16_t PROGMEM reset_combo[] = {KC_NLCK, KC_MPLY, COMBO_END};
33
34 25
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36 //Macro's are mentioned here allong with the keycodes 27 //Macro's are mentioned here allong with the keycodes
37 LAYOUT_ortho_5x4( //Base layer (0) 28 LAYOUT_ortho_5x4( //Base layer (0)
38 TG(1), KC_VOLD, KC_VOLU, KC_BSPC, 29 TG(1), KC_VOLD, KC_VOLU, KC_BSPC,
39 KC_P7, KC_P8, KC_P9, KC_PSLS, 30 KC_P7, KC_P8, KC_P9, KC_PAST,
40 KC_P4, KC_P5, KC_P6, KC_PAST, 31 KC_P4, KC_P5, KC_P6, KC_PSLS,
41 KC_P1, KC_P2, KC_P3, KC_PMNS, 32 KC_P1, KC_P2, KC_P3, KC_PPLS,
42 KC_P0, KC_PDOT, KC_PENT, KC_PPLS), 33 KC_P0, KC_PDOT, KC_PENT, KC_PMNS),
43 34
44 LAYOUT_ortho_5x4( //Layer 1 35 LAYOUT_ortho_5x4( //Layer 1
45 KC_TRNS, KC_VOLD, KC_VOLU, KC_CALC, 36 KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC,
46 KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, 37 KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT,
47 KC_NO, KC_NO, KC_NO, KC_NO, 38 KC_NO, KC_NO, KC_NO, KC_NO,
48 KC_NO, KC_NO, KC_UP, KC_NO, 39 KC_NO, KC_NO, KC_UP, KC_NO,
49 KC_NLCK, KC_LEFT, KC_DOWN, KC_RGHT), 40 MO(2), KC_LEFT, KC_DOWN, KC_RGHT),
50 //Copy any layer and edit it for more layers, be sure to add a key to go to that layer
51};
52 41
53//Reset combo key setting 42 LAYOUT_ortho_5x4( //Layer 2
54combo_t key_combos[COMBO_COUNT] = { 43 KC_NO, KC_NO, KC_NO, KC_NO,
55 [ENLCK_reset] = COMBO_ACTION(reset_combo), 44 KC_NO, KC_NO, KC_NO, RESET,
45 KC_NO, KC_NO, KC_NO, KC_NO,
46 KC_NO, KC_NO, KC_NO, KC_NO,
47 KC_TRNS, KC_NLCK, KC_NO, KC_NO),
48 //Copy any layer and edit it for more layers, be sure to add a key to go to that layer
56}; 49};
57 50
58bool process_record_user(uint16_t keycode, keyrecord_t *record) { 51bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@@ -66,7 +59,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
66 SEND_STRING("for being you <3"); 59 SEND_STRING("for being you <3");
67 } 60 }
68 break; 61 break;
69 62
70 case MACRO2: 63 case MACRO2:
71 if (record->event.pressed) { 64 if (record->event.pressed) {
72 // when keycode MACRO2 is pressed 65 // when keycode MACRO2 is pressed
@@ -79,14 +72,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
79 } 72 }
80 return true; 73 return true;
81} 74}
82
83//Reset key combo and a example to make our own, more complex, macro's
84void process_combo_event(uint16_t combo_index, bool pressed) {
85 switch(combo_index) {
86 case ENLCK_reset:
87 if (pressed) {
88 reset_keyboard();
89 }
90 break;
91 }
92}
diff --git a/keyboards/emi20/keymaps/default/rules.mk b/keyboards/emi20/keymaps/default/rules.mk
deleted file mode 100644
index ff681299e..000000000
--- a/keyboards/emi20/keymaps/default/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
1COMBO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/emi20/readme.md b/keyboards/emi20/readme.md
index 839503635..54c27aa6a 100644
--- a/keyboards/emi20/readme.md
+++ b/keyboards/emi20/readme.md
@@ -1,17 +1,18 @@
1# Emi20 1# Emi20
2 2
3![Emi20](https://i.imgur.com/Tt9ogmWl.jpg) 3![Emi20](https://i.imgur.com/Mc84fLGl.jpg)
4 4
5A compact 4x5 ortholinear keyboard made by Project Aqua and sold by Evil-cables. 5A compact 4x5 ortholinear keyboard made by Project Aqua and sold by Evil-cables.
6 6
7* Keyboard Maintainer: [AquaCylinder](https://github.com/AquaCylinder) 7* Keyboard Maintainer: [AquaCylinder](https://github.com/AquaCylinder)
8* Hardware Supported: PCB, Atmega32u4 8* Hardware Supported: PCB, Atmega32u4
9* Connector: USB mini B
9 10
10Make example for this keyboard (after setting up your build environment): 11Make example for this keyboard (after setting up your build environment):
11 12
12 make emi20:default 13 make emi20:default
13 14
14To reset the board into bootloader mode, press the physical reset button on the back of the PCB or use the keycombo (on layer 1) with the bottom left key and the second key from the top right diagonally. 15To reset the board into bootloader mode, press the physical reset button on the back of the PCB or press the bottom most left key to momentarily switch to layer 2 (on layer 1) and then press the key from the top right down one.
15 16
16The default keymap.c file has comments to help you on your journey, 17The default keymap.c file has comments to help you on your journey,
17See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). 18See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).