diff options
Diffstat (limited to 'keyboards/atreus')
35 files changed, 645 insertions, 449 deletions
diff --git a/keyboards/atreus/astar/astar.c b/keyboards/atreus/astar/astar.c new file mode 100644 index 0000000000..19490deb99 --- /dev/null +++ b/keyboards/atreus/astar/astar.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 "atreus.h" diff --git a/keyboards/atreus/astar/astar.h b/keyboards/atreus/astar/astar.h new file mode 100644 index 0000000000..bf74ceb17f --- /dev/null +++ b/keyboards/atreus/astar/astar.h @@ -0,0 +1,17 @@ +/* Copyright 2019 + * + * 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 diff --git a/keyboards/atreus/astar/config.h b/keyboards/atreus/astar/config.h new file mode 100644 index 0000000000..a925c6fb1c --- /dev/null +++ b/keyboards/atreus/astar/config.h @@ -0,0 +1,40 @@ +/* Copyright 2019 + * + * 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 + +#include "config_common.h" + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D3, D2 } +#if defined(PCBDOWN) + #define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } +#else + #define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } +#endif +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/astar/rules.mk b/keyboards/atreus/astar/rules.mk new file mode 100644 index 0000000000..e6fef51727 --- /dev/null +++ b/keyboards/atreus/astar/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina diff --git a/keyboards/atreus/astar_mirrored/astar_mirrored.c b/keyboards/atreus/astar_mirrored/astar_mirrored.c new file mode 100644 index 0000000000..b8eacded63 --- /dev/null +++ b/keyboards/atreus/astar_mirrored/astar_mirrored.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 "astar_mirrored.h" diff --git a/keyboards/atreus/astar_mirrored/astar_mirrored.h b/keyboards/atreus/astar_mirrored/astar_mirrored.h new file mode 100644 index 0000000000..bf74ceb17f --- /dev/null +++ b/keyboards/atreus/astar_mirrored/astar_mirrored.h @@ -0,0 +1,17 @@ +/* Copyright 2019 + * + * 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 diff --git a/keyboards/atreus/astar_mirrored/config.h b/keyboards/atreus/astar_mirrored/config.h new file mode 100644 index 0000000000..273f23a847 --- /dev/null +++ b/keyboards/atreus/astar_mirrored/config.h @@ -0,0 +1,38 @@ +/* Copyright 2019 + * + * 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 + +#include "config_common.h" + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define PDBDOWN 1 + +#define MATRIX_ROW_PINS { D0, D1, D3, D2 } +#define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/astar_mirrored/rules.mk b/keyboards/atreus/astar_mirrored/rules.mk new file mode 100644 index 0000000000..e6fef51727 --- /dev/null +++ b/keyboards/atreus/astar_mirrored/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina diff --git a/keyboards/atreus/atreus.c b/keyboards/atreus/atreus.c index 263ec87323..33bb5f35ad 100644 --- a/keyboards/atreus/atreus.c +++ b/keyboards/atreus/atreus.c @@ -1 +1,17 @@ -#include "atreus.h"
\ No newline at end of file +/* Copyright 2019 + * + * 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 "atreus.h" diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h index 8e868ecc0e..88dd4d9dc8 100644 --- a/keyboards/atreus/atreus.h +++ b/keyboards/atreus/atreus.h @@ -1,14 +1,36 @@ -#ifndef ATREUS_H -#define ATREUS_H +/* Copyright 2019 + * + * 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 #include "quantum.h" -#include "matrix.h" -#include "backlight.h" -#include <stddef.h> +#define ___ KC_NO + +#ifdef KEYBOARD_atreus_astar + #include "astar.h" +#elif KEYBOARD_atreus_astar_mirrored + #include "astar_mirrored.h" +#elif KEYBOARD_atreus_teensy2 + #include "teensy2.h" +#endif // This a shortcut to help you visually see your layout. -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array +// The first section contains all of the arguments. +// The second converts the arguments into a two-dimensional array. +// In the PCBDOWN case we need to swap the middle two keys: k35 and k36. +#if defined(PCBDOWN) #define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ @@ -18,8 +40,20 @@ { \ { k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \ { k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \ - { k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \ - { k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \ + { k20, k21, k22, k23, k24, k36, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b } \ +} +#else +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, ___, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, ___, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \ } - #endif diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index b1559a29d8..d182014433 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -1,22 +1,20 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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/>. -*/ +/* Copyright 2019 + * + * 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/>. + */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -27,31 +25,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEVICE_VER 0x0008 #define MANUFACTURER Technomancy #define PRODUCT Atreus -#define DESCRIPTION q.m.k. keyboard firmware for Atreus +#define DESCRIPTION QMK keyboard firmware for Atreus /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 11 -// Change this to how you wired your keyboard -// COLS: Left to right, ROWS: Top to bottom -#if defined(ATREUS_ASTAR) -# define MATRIX_ROW_PINS { D0, D1, D3, D2 } -#if defined(PCBDOWN) -# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } -#else -# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } -#endif -# define UNUSED_PINS -#elif defined(ATREUS_TEENSY2) -# define MATRIX_ROW_PINS { D0, D1, D2, D3 } -# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } -# define UNUSED_PINS -#endif - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -83,5 +62,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atreus/keymaps/alphadox/config.h b/keyboards/atreus/keymaps/alphadox/config.h index e998e5edc3..271f48d001 100644 --- a/keyboards/atreus/keymaps/alphadox/config.h +++ b/keyboards/atreus/keymaps/alphadox/config.h @@ -1,75 +1,3 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> +#pragma once -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/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Arbitrary Definitions -#define PRODUCT Planckeus -#define DESCRIPTION q.m.k. keyboard firmware for Planckeus - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 11 - -#define MATRIX_ROW_PINS { D0, D1, D2, D3 } -#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -//#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif +// place overrides here diff --git a/keyboards/atreus/keymaps/classic/keymap.c b/keyboards/atreus/keymaps/classic/keymap.c index dce9dd96de..3feeb97cfb 100644 --- a/keyboards/atreus/keymaps/classic/keymap.c +++ b/keyboards/atreus/keymaps/classic/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12 , KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET ), diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index 631697384b..95207f5c46 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -38,21 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/atreus/keymaps/dvorak_42_key/config.h b/keyboards/atreus/keymaps/dvorak_42_key/config.h index 12a221d7f5..ac5db196d9 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/config.h +++ b/keyboards/atreus/keymaps/dvorak_42_key/config.h @@ -1,24 +1,6 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> +#pragma once -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/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" +// place overrides here // mouse speed @@ -31,69 +13,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MOUSEKEY_WHEEL_DELTA 1 #define MOUSEKEY_WHEEL_MAX_SPEED 1 #define MOUSEKEY_WHEEL_TIME_TO_MAX 100 - -/* USB Device descriptor parameter */ - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Technomancy -#define PRODUCT Atreus -#define DESCRIPTION q.m.k. keyboard firmware for Atreus - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 11 - -// Change this to how you wired your keyboard -// COLS: Left to right, ROWS: Top to bottom -#if defined(ATREUS_ASTAR) -# define MATRIX_ROW_PINS { D0, D1, D3, D2 } -#if defined(PCBDOWN) -# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } -#else -# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } -#endif -# define UNUSED_PINS -#elif defined(ATREUS_TEENSY2) -# define MATRIX_ROW_PINS { D0, D1, D2, D3 } -# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } -# define UNUSED_PINS -#endif - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -//#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h index 4a7ade96ad..aa1d8445c6 100644 --- a/keyboards/atreus/keymaps/erlandsona/config.h +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -1,90 +1,6 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> +#pragma once -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/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" +// place overrides here /* Make Overloaded Keys switch faster */ #define TAPPING_TERM 150 - -/* USB Device descriptor parameter */ - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Technomancy -#define PRODUCT Atreus -#define DESCRIPTION q.m.k. keyboard firmware for Atreus - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 11 - -// Change this to how you wired your keyboard -// COLS: Left to right, ROWS: Top to bottom -#if defined(ATREUS_ASTAR) -# define MATRIX_ROW_PINS { D0, D1, D3, D2 } -#if defined(PCBDOWN) -# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } -#else -# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } -#endif -# define UNUSED_PINS -#elif defined(ATREUS_TEENSY2) -# define MATRIX_ROW_PINS { D0, D1, D2, D3 } -# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } -# define UNUSED_PINS -#endif - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -//#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index e890e7f528..e25f4f089d 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), - KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, MO(NUMS),KC_RALT, KC_SLSH, KC_BSLS ), [NUMS] = LAYOUT( /* Numbers / Arrows / Symbols */ @@ -39,7 +39,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // so that I can get out of mouse mode just by tapping/holding my base layer FN key. const uint16_t PROGMEM fn_actions[] = { [BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0 - [NUMS] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay [MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2 }; diff --git a/keyboards/atreus/keymaps/jeremy/keymap.c b/keyboards/atreus/keymaps/jeremy/keymap.c index baf506b974..e875af3cca 100644 --- a/keyboards/atreus/keymaps/jeremy/keymap.c +++ b/keyboards/atreus/keymaps/jeremy/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS ), [CURS] = LAYOUT( - KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS, + KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PGUP, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_COPY, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS diff --git a/keyboards/atreus/keymaps/nojjan/keymap.c b/keyboards/atreus/keymaps/nojjan/keymap.c index d0aa3b279a..a6872f9952 100644 --- a/keyboards/atreus/keymaps/nojjan/keymap.c +++ b/keyboards/atreus/keymaps/nojjan/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; diff --git a/keyboards/atreus/keymaps/ptillemans/keymap.c b/keyboards/atreus/keymaps/ptillemans/keymap.c index 9019e9a8c0..ea4edeca7d 100644 --- a/keyboards/atreus/keymaps/ptillemans/keymap.c +++ b/keyboards/atreus/keymaps/ptillemans/keymap.c @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, _______, _______, KC_MNXT, _______, _______, _______, TO(_QW), KC_PSCR, KC_SLCK, KC_MPLY ) diff --git a/keyboards/atreus/keymaps/ridingqwerty/config.h b/keyboards/atreus/keymaps/ridingqwerty/config.h new file mode 100644 index 0000000000..349d7b1c49 --- /dev/null +++ b/keyboards/atreus/keymaps/ridingqwerty/config.h @@ -0,0 +1,13 @@ +#pragma once + +#undef MATRIX_ROWS +#define MATRIX_ROWS 8 + +#undef MATRIX_COLS +#define MATRIX_COLS 6 + +#undef MATRIX_ROW_PINS +#define MATRIX_ROW_PINS { A6, A7, A8, A15, B11, B12, A14, A13 } + +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0 } diff --git a/keyboards/atreus/keymaps/ridingqwerty/keymap.c b/keyboards/atreus/keymaps/ridingqwerty/keymap.c new file mode 100644 index 0000000000..336df49730 --- /dev/null +++ b/keyboards/atreus/keymaps/ridingqwerty/keymap.c @@ -0,0 +1,116 @@ +/* Copyright 2019 George Koenig + * + * 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 +#include "ridingqwerty.h" + +/* Atreus + ┏━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┓ ┏━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━┓ + ┃ Q │ W │ E │ R │ T ┃ ┃ Y │ U │ I │ O │ P ┃ + ┠────────┼────────┼────────┼────────┼────────┨ ┠────────┼────────┼────────┼────────┼────────┨ + /┃ ¶ A │ S │ D │ F │ G ┃ ┃ H │ J │ K │ L │ 🔢 ; ┃ + ┠────────┼────────┼────────┼────────┼────────┞━━━━━━━━┳━━━━━━━━┞────────┼────────┼────────┼────────┼────────┨ + /┃ ⇧ Z │ X │ C │ V │ B │ ┃ │ N │ M │ , │ 𝔽 . │ ⇧ / ┃ + ┠────────┼────────┼────────┼────────┼────────┤ ¶ ⎋ ┃ ❦ ⇥ ├────────┼────────┼────────┼────────┼────────┨ + ┃ ⎈ ⎋ │ ⌘ ⇥ │ ⎇ [ │ ⇧ ] │ 🔢 ⌫ │ ┃ │ ★ ␣ │ ⇧ - │ ⎇ = │ ⌘ ' │ ⎈ ↵ ┃ + ┗━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┻━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━┛ + MODS // LAYERS // MODS // +*/ + +#ifdef LAYOUT +#undef LAYOUT +#define LAYOUT( \ + K00, K01, K02, K03, K04, K40, K41, K42, K43, K44, \ + K10, K11, K12, K13, K14, K50, K51, K52, K53, K54, \ + K20, K21, K22, K23, K24, K60, K61, K62, K63, K64, \ + K30, K31, K32, K33, K34, K35, K70, K71, K72, K73, K74, K75 \ +) { \ + { K00, K01, K02, K03, K04, KC_NO }, \ + { K10, K11, K12, K13, K14, KC_NO }, \ + { K20, K21, K22, K23, K24, KC_NO }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K44, K43, K42, K41, K40, KC_NO }, \ + { K54, K53, K52, K51, K50, KC_NO }, \ + { K64, K63, K62, K61, K60, KC_NO }, \ + { K75, K74, K73, K72, K71, K70 } \ +} +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + ED_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NM_SCLN, + LS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, FK_DOT, RS_SLSH, + LC_ESC, LG_TAB, LA_LBRC, LS_RBRC, NM_BSPC, ED_ESC, SC_TAB, SM_SPC, RS_MINS, RA_EQL, RG_QUOT, RC_ENT + ), + [_EDITOR] = LAYOUT( /* ED_A, ED_ESC */ + KC_GRV, _______, KC_END, _______, KC_TAB, _______, _______, KC_INS, _______, KC_PGUP, + KC_HOME, _______, KC_DELT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, + _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, KC_BSLS, + _______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______ + ), + [_NUMBER] = LAYOUT( /* NM_SCLN, NM_BSPC */ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_4, KC_5, KC_6, _______, + _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_BSLS, + _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_0, KC_0, KC_DOT, _______, _______ + ), + [_SYMBOL] = LAYOUT( /* SM_SPC */ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, KC_COLN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, + _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______ + ), + [_F_KEYS] = LAYOUT( /* FK_DOT */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_F11, + KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_SECRET] = LAYOUT( /* shhhh... */ + RESET, _______, _______, RUSTY, FUEL, KC_F13, _______, _______, _______, _______, + AR1ST, SYSNOC, _______, _______, _______, _______, _______, _______, OS_LAB, _______, + CDLOCAL, _______, C0RE, VAXIS, _______, _______, MUNKY, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FINAL] = LAYOUT( /* . */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +// custom tap/hold keys +uint16_t key_timer; +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case RG_QUOT: + if (record->event.pressed) { + key_timer = timer_read(); + layer_on(_NUMBER); + register_mods(MOD_BIT(KC_RGUI)); + } else { + unregister_mods(MOD_BIT(KC_RGUI)); + layer_off(_NUMBER); + if (timer_elapsed(key_timer) < TAPPING_TERM) { + tap_code(KC_QUOT); + } + } + return false; break; + } + return true; +}; diff --git a/keyboards/atreus/keymaps/ridingqwerty/readme.md b/keyboards/atreus/keymaps/ridingqwerty/readme.md new file mode 100644 index 0000000000..936df36099 --- /dev/null +++ b/keyboards/atreus/keymaps/ridingqwerty/readme.md @@ -0,0 +1 @@ +This is a handwired Atreus42 using a Proton C diff --git a/keyboards/atreus/keymaps/ridingqwerty/rules.mk b/keyboards/atreus/keymaps/ridingqwerty/rules.mk new file mode 100644 index 0000000000..95b257f758 --- /dev/null +++ b/keyboards/atreus/keymaps/ridingqwerty/rules.mk @@ -0,0 +1,17 @@ +MCU = STM32F303 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +#MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = no +# SERIAL_LINK_ENABLE = yes +#TAP_DANCE_ENABLE = yes diff --git a/keyboards/atreus/keymaps/workman/README.md b/keyboards/atreus/keymaps/workman/README.md new file mode 100644 index 0000000000..249833a995 --- /dev/null +++ b/keyboards/atreus/keymaps/workman/README.md @@ -0,0 +1,33 @@ +Workman for Atreus +================== + +This is the Workman layout for Atreus. You can get PDF and SVG files +for the keymap from the author's +[website](https://alexschroeder.ch/pdfs/workman/). + +``` + q d r w b || j f u p ; + a s h t g || y n e o i + z x m c v || k l , . / + esc tab super shift bksp ctrl || alt space RS LW ' ret + + +Raised layer (RS) + + ! @ { } | || - 7 8 9 * + # $ ( ) ` || . 4 5 6 + + % ^ [ ] ~ || & 1 2 3 \ + menu caps < > del || _ 0 = + + +Lower layer (LW) + + insert home up end pgup || vol+ F7 F8 F9 F10 + del left down right pgdn || vol- F4 F5 F6 F11 + || mute F1 F2 F3 F12 + || – ¨ reset +``` + +A note on the EN DASH and DIARESIS mappings on the lower layer: these +only work if you set up CAPS as your *Multi Key* because they +effectively send `<CAPS> - - .` and `<CAPS> "`, respectively. diff --git a/keyboards/atreus/keymaps/workman/config.h b/keyboards/atreus/keymaps/workman/config.h new file mode 100644 index 0000000000..cf0b5e2ac5 --- /dev/null +++ b/keyboards/atreus/keymaps/workman/config.h @@ -0,0 +1,3 @@ +#define TAPPING_TOGGLE 1 +#define ONESHOT_TAP_TOGGLE 1 +#define PCBDOWN 1 diff --git a/keyboards/atreus/keymaps/workman/keymap.c b/keyboards/atreus/keymaps/workman/keymap.c new file mode 100644 index 0000000000..aef2c59590 --- /dev/null +++ b/keyboards/atreus/keymaps/workman/keymap.c @@ -0,0 +1,76 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QW 0 +#define _RS 1 +#define _LW 2 + +#define OSM_SFT OSM(MOD_LSFT) + +/* In your system, make sure Caps Lock acts as the Compose Key, also known as the Multi Key. If so, then the quote on + * the lower layer acts as macro to enter ¨ */ +enum custom_keycodes { + DIAERESIS = SAFE_RANGE, + EN_DASH +}; + + /* Basic layer (L0) + * q d r w b || j f u p ; + * a s h t g || y n e o i + * z x m c v || k l , . / + * esc tab super shift bksp ctrl || alt space RS LW ' ret + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT( /* Workman */ + KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, + KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, + KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TAB, KC_LGUI, OSM_SFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), MO(_LW), KC_QUOT, KC_ENT + ), + + /* Raised layer (RS) + * ! @ { } | || - 7 8 9 * + * # $ ( ) ` || . 4 5 6 + + * % ^ [ ] ~ || & 1 2 3 \ + * menu caps < > del || _ 0 = + */ + + [_RS] = LAYOUT( /* [> RAISE <] */ + KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_7, KC_8, KC_9, KC_ASTR, + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOT, KC_4, KC_5, KC_6, KC_PLUS, + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, + KC_MENU, KC_CAPS, KC_LT, KC_GT, KC_DEL, KC_TRNS, KC_TRNS, KC_UNDS, KC_TRNS, KC_TRNS, KC_0, KC_EQL ), + + /* Lower layer (LW) + * insert home up end pgup || vol+ F7 F8 F9 F10 + * del left down right pgdn || vol- F4 F5 F6 F11 + * || mute F1 F2 F3 F12 + * || – ¨ reset + */ + + [_LW] = LAYOUT( /* [> LOWER <] */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_F10, + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_F11, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EN_DASH, KC_TRNS, KC_TRNS, DIAERESIS, RESET ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case DIAERESIS: + // assuming KC_CAPS is your Multi Key + SEND_STRING(SS_TAP(X_CAPSLOCK)"\""); + return false; + case EN_DASH: + // assuming KC_CAPS is your Multi Key + SEND_STRING(SS_TAP(X_CAPSLOCK)"--."); + return false; + } + } + return true; +}; diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index fe1ca295d8..7653206ae5 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -3,8 +3,6 @@ // Preonic keyboards by Jack Humbert. #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -12,13 +10,16 @@ extern keymap_config_t keymap_config; // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _DVORAK 0 -#define _QWERTY 1 -#define _COLEMAK 2 -#define _DVORMAC 3 -#define _LOWER 4 -#define _RAISE 5 -#define _ADJUST 16 + +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _DVORMAC, + _LOWER, + _RAISE, + _ADJUST +}; enum planck_keycodes { DVORAK = SAFE_RANGE, @@ -27,7 +28,7 @@ enum planck_keycodes { DVORMAC, LOWER, RAISE, - BACKLIT + ADJUST }; // Adding macros to make the keymaps below much easier to read. @@ -37,6 +38,9 @@ enum planck_keycodes { #define ALTENT ALT_T(KC_ENT) #define ESCTRL CTL_T(KC_ESC) #define TABALT ALT_T(KC_TAB) +#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak Layer @@ -159,57 +163,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: + case DVORAK: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_DVORAK); } return false; - break; case COLEMAK: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; - break; - case DVORAK: + case QWERTY: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_QWERTY); } return false; - break; case DVORMAC: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORMAC); + set_single_persistent_default_layer(_DVORMAC); } return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; } return true; -}; +}
\ No newline at end of file diff --git a/keyboards/atreus/keymaps/xyverz/readme.md b/keyboards/atreus/keymaps/xyverz/readme.md index ec7d836c17..aa44f01dae 100644 --- a/keyboards/atreus/keymaps/xyverz/readme.md +++ b/keyboards/atreus/keymaps/xyverz/readme.md @@ -9,7 +9,7 @@ to a final go with this. I'm using MOD_TAP quite a bit in this keymap. On all layers, R4 pinky keys use mod-tap and are SHIFT when held and their normal keys when tapped. In addition, ESC and TAB are also set as Ctrl and ALT respectively when held, -and Enter/ALT on the right thumb key for all layers. +and Enter/ALT on the right thumb key for all alpha layers. I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts. @@ -44,7 +44,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' -### Keymap 2: Colemak layer +### Layer 2: Colemak layer ,----------------------------------. ,----------------------------------. | Q | W | F | P | G | | J | L | U | Y | L | @@ -56,7 +56,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' -### Keymap 3: Dvorak for Mac layout +### Layer 3: Dvorak for Mac layer ,----------------------------------. ,----------------------------------. | ' | , | . | P | Y | | F | G | C | R | L | @@ -68,7 +68,7 @@ Control. | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ | `----------------------------------' `----------------------------------' -### Keymap 4: LOWER layer +### Layer 4: LOWER layer ,----------------------------------. ,----------------------------------. | ! | @ | # | $ | % | | ^ | & | * | ( | ) | @@ -81,7 +81,7 @@ Control. `----------------------------------' `----------------------------------' -### Keymap 5: RAISE layer +### Layer 5: RAISE layer ,----------------------------------. ,----------------------------------. | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | @@ -93,7 +93,7 @@ Control. | ` | | | | Del |------'`------| Ins | | | | | `----------------------------------' `----------------------------------' -### Keymap 6: ADJUST layer +### Layer 6: ADJUST layer ,----------------------------------. ,----------------------------------. | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 5cd797da96..0dbd098ca7 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -1,5 +1,6 @@ -Atreus -====== +# Atreus + +![Atreus](https://atreus.technomancy.us/photos/1.jpg) A small mechanical keyboard that is based around the shape of the human hand. @@ -9,16 +10,19 @@ Hardware Availability: https://atreus.technomancy.us These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2 (usually hand-wired), one powered by an A-Star (usually using a PCB). You will need to use different `make` commands depending on the variant you have; see examples below. -A-Star:\ -`make atreus:default:avrdude` +Make example for this keyboard (after setting up your build environment): + + make atreus:default:avrdude + +If you would like to use one of the alternative controllers: + + make atreus/astar:default:avrdude + make atreus/teensy2:default:teensy -Teensy:\ -`make TEENSY2=yes atreus:default:teensy` - If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands, e.g. -`make PCBDOWN=yes atreus:default:avrdude` + make PCBDOWN=yes atreus:default:avrdude *Unlike the TMK firmware, these commands should be run from the root of the repository, not the directory containing this readme.* -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools), then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See 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). diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk index eda77404a0..403b0b0ca2 100644 --- a/keyboards/atreus/rules.mk +++ b/keyboards/atreus/rules.mk @@ -1,75 +1,7 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -ifdef TEENSY2 - BOOTLOADER = halfkay - OPT_DEFS += -DATREUS_TEENSY2 -else - BOOTLOADER = caterina - OPT_DEFS += -DATREUS_ASTAR - ifdef PCBDOWN - OPT_DEFS += -DPCBDOWN - endif -endif - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -77,12 +9,14 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = yes # Unicode +UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +DEFAULT_FOLDER = atreus/astar diff --git a/keyboards/atreus/teensy2/config.h b/keyboards/atreus/teensy2/config.h new file mode 100644 index 0000000000..4130ef9bb7 --- /dev/null +++ b/keyboards/atreus/teensy2/config.h @@ -0,0 +1,36 @@ +/* Copyright 2019 + * + * 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 + +#include "config_common.h" + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/teensy2/rules.mk b/keyboards/atreus/teensy2/rules.mk new file mode 100644 index 0000000000..ae398e2588 --- /dev/null +++ b/keyboards/atreus/teensy2/rules.mk @@ -0,0 +1,12 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay diff --git a/keyboards/atreus/teensy2/teensy2.c b/keyboards/atreus/teensy2/teensy2.c new file mode 100644 index 0000000000..19490deb99 --- /dev/null +++ b/keyboards/atreus/teensy2/teensy2.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 "atreus.h" diff --git a/keyboards/atreus/teensy2/teensy2.h b/keyboards/atreus/teensy2/teensy2.h new file mode 100644 index 0000000000..bf74ceb17f --- /dev/null +++ b/keyboards/atreus/teensy2/teensy2.h @@ -0,0 +1,17 @@ +/* Copyright 2019 + * + * 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 |