summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToni <jeder@mail1a.de>2016-08-16 16:32:42 +0200
committerToni <jeder@mail1a.de>2016-08-16 16:32:42 +0200
commitb1ac91a040a464b595b819417fb1a04c5f9d8926 (patch)
tree3eaceda34de3207a4fab32f2b87b19482304e5e7
parent68005ce60232c487a6b2ff78925c070881c240b5 (diff)
big cleanup and minor refactoring. thanks iFreilicht.
-rw-r--r--keyboards/satan/keymaps/iso_split_rshift/Makefile27
-rw-r--r--keyboards/satan/keymaps/iso_split_rshift/config.h7
-rw-r--r--keyboards/satan/keymaps/iso_split_rshift/keymap.c53
-rw-r--r--keyboards/satan/keymaps/iso_split_rshift/satan.c30
-rw-r--r--keyboards/satan/keymaps/iso_split_rshift/satan.h96
-rw-r--r--keyboards/satan/satan.h27
6 files changed, 77 insertions, 163 deletions
diff --git a/keyboards/satan/keymaps/iso_split_rshift/Makefile b/keyboards/satan/keymaps/iso_split_rshift/Makefile
index e25515b692..9187df44c8 100644
--- a/keyboards/satan/keymaps/iso_split_rshift/Makefile
+++ b/keyboards/satan/keymaps/iso_split_rshift/Makefile
@@ -1,18 +1,15 @@
-# Build Options
-# comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= yes # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
-NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870)
-BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
-MIDI_ENABLE ?= no # MIDI controls
-AUDIO_ENABLE = no
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
+BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
+CONSOLE_ENABLE ?= yes # Console for debug(+400)
+COMMAND_ENABLE ?= yes # Commands for debug and configuration
+NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870)
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150)
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no
+UNICODE_ENABLE ?= no # Unicode
+BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
ifndef QUANTUM_DIR
include ../../../../Makefile
diff --git a/keyboards/satan/keymaps/iso_split_rshift/config.h b/keyboards/satan/keymaps/iso_split_rshift/config.h
index 39eec4b597..5e79e07f51 100644
--- a/keyboards/satan/keymaps/iso_split_rshift/config.h
+++ b/keyboards/satan/keymaps/iso_split_rshift/config.h
@@ -20,12 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../../config.h"
-
+// only change
#define RGB_DI_PIN B2
-#define RGBLIGHT_TIMER
-#define RGBLED_NUM 8 // Number of LEDs
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-#define RGBLIGHT_VAL_STEP 17
#endif
diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c
index 68cc6755e1..f04036d103 100644
--- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c
+++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c
@@ -13,8 +13,29 @@
#define _TAB 2
#define _SFX 3
+// dual-role shortcuts
+#define TABDUAL LT(_TAB, KC_TAB)
+#define CAPSDUAL CTL_T(KC_ESC)
+#define SPACEDUAL LT(_SPC, KC_SPACE)
+#define ENTERDUAL CTL_T(KC_ENT)
+// arrow cluster duality bottom right corner
+#define ARRLEFT ALT_T(KC_LEFT)
+#define ARRDOWN GUI_T(KC_DOWN)
+#define ARRUP SFT_T(KC_UP)
+#define ARRRIGHT CTL_T(KC_RIGHT)
+// german brackets
+#define GER_CUR_L RALT(KC_7) // [
+#define GER_CUR_R RALT(KC_9) // ]
+#define GER_PAR_L LSFT(KC_8) // (
+#define GER_PAR_R LSFT(KC_9) // )
+#define GER_ANG_L KC_NUBS // <
+#define GER_ANG_R LSFT(KC_NUBS) // >
+#define GER_BRC_L RALT(KC_8) // [
+#define GER_BRC_R RALT(KC_9) // ]
+
// increase readability
#define _______ KC_TRNS
+#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _DEF: Default Layer
@@ -31,11 +52,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' LEFT DWN RIGHT
*/
[_DEF] = KEYMAP_ISO_SPLITRSHIFT(
- 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, \
- LT(_TAB,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, \
- CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, CTL_T(KC_ENT), \
- KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TG(_SFX), SFT_T(KC_UP), \
- KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, ALT_T(KC_LEFT), GUI_T(KC_DOWN), CTL_T(KC_RIGHT)),
+ 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, \
+ TABDUAL, 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, \
+ CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TG(_SFX), ARRUP, \
+ KC_LCTL, KC_LGUI, KC_LALT, SPACEDUAL, KC_RALT, ARRLEFT, ARRDOWN, ARRRIGHT),
/* Keymap 1: F-and-vim Layer, modified with Space (by holding space)
* ,-----------------------------------------------------------.
@@ -51,11 +72,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
[_SPC] = KEYMAP_ISO_SPLITRSHIFT(
- KC_PSCR, 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_DEL, \
- _______, KC_PAUS, KC_UP, RALT(KC_8), RALT(KC_9), _______, _______, LSFT(KC_8), LSFT(KC_9), _______, _______, _______, _______, _______, \
- _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \
- _______, _______, _______, _______, KC_NUBS, LSFT(KC_NUBS), KC_SPACE,M(0), _______, _______, _______, _______, _______, KC_VOLU, \
- _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT),
+ KC_PSCR, 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_DEL, \
+ _______, KC_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, _______, \
+ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \
+ _______, _______, _______, _______, GER_ANG_L, GER_ANG_R, KC_SPACE, M(0), _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT),
/* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab)
* ,-----------------------------------------------------------.
@@ -71,11 +92,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
[_TAB] = KEYMAP_ISO_SPLITRSHIFT(
- KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
- _______, _______, _______, _______, _______, _______, _______, RALT(KC_7), RALT(KC_0), _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \
- _______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, _______, KC_PGUP, \
- _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
+ KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
+ _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \
+ _______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, _______, KC_PGUP, \
+ _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
/* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key)
* ,-----------------------------------------------------------.
@@ -93,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_SFX] = KEYMAP_ISO_SPLITRSHIFT(
RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \
_______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \
- _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, KC_NO, KC_ENT, \
+ _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \
_______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, _______, KC_UP, \
_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT),
};
diff --git a/keyboards/satan/keymaps/iso_split_rshift/satan.c b/keyboards/satan/keymaps/iso_split_rshift/satan.c
deleted file mode 100644
index d2c5d5c205..0000000000
--- a/keyboards/satan/keymaps/iso_split_rshift/satan.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "satan.h"
-#include "led.h"
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- matrix_init_user();
- led_init_ports();
-};
-
-void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
- matrix_scan_user();
-};
-
-void led_init_ports(void) {
- // * Set our LED pins as output
- DDRB |= (1<<2);
-}
-
-void led_set_kb(uint8_t usb_led) {
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
- // Turn capslock on
- PORTB &= ~(1<<2);
- } else {
- // Turn capslock off
- PORTB |= (1<<2);
- }
-}
diff --git a/keyboards/satan/keymaps/iso_split_rshift/satan.h b/keyboards/satan/keymaps/iso_split_rshift/satan.h
deleted file mode 100644
index 2ca820c63e..0000000000
--- a/keyboards/satan/keymaps/iso_split_rshift/satan.h
+++ /dev/null
@@ -1,96 +0,0 @@
-#ifndef SATAN_H
-#define SATAN_H
-
-#include "../../../../quantum/quantum.h"
-
-/* Clueboard matrix layout
- * ,-----------------------------------------------------------.
- * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d |
- * |-----------------------------------------------------------|
- * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d |
- * |-----------------------------------------------------------|
- * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d |
- * |-----------------------------------------------------------|
- * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d |
- * |-----------------------------------------------------------|
- * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d |
- * `-----------------------------------------------------------'
- */
-// The first section contains all of the arguments
-// The second converts the arguments into a two-dimensional array
-#define KEYMAP( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
- k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
- k40, k41, k42, k45, k4a, k4b, k4c, k4d \
-) \
-{ \
- {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
- {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
- {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d}, \
- {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d}, \
- {k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d} \
-}
-
-/* Satan HHKB matrix layout
- * ,------------------------------------------------------------.
- * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49 |
- * |------------------------------------------------------------|
- * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d |
- * |------------------------------------------------------------|
- * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d |
- * |------------------------------------------------------------|
- * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d | 3c |
- * |------------------------------------------------------------|
- * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d |
- * `------------------------------------------------------------'
- */
-
-#define KEYMAP_HHKB( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
- k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3c, \
- k40, k41, k42, k45, k4a, k4b, k4c, k4d \
-) \
-{ \
- {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
- {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
- {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d}, \
- {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
- {k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k4a, k4b, k4c, k4d} \
-}
-
-/* ISO w/ split right shift key matrix layout
- * ,-----------------------------------------------------------.
- * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d |
- * |-----------------------------------------------------------|
- * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d |
- * |-----------------------------------------------------------|
- * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c|2d |
- * |-----------------------------------------------------------|
- * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d |
- * |-----------------------------------------------------------|
- * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d |
- * `-----------------------------------------------------------'
- */
-#define KEYMAP_ISO_SPLITRSHIFT( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
- k40, k41, k42, k45, k4a, k4b, k4c, k4d \
-) \
-{ \
- {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
- {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
- {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \
- {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
- {k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d} \
-}
-
-void matrix_init_user(void);
-void matrix_scan_user(void);
-
-#endif
diff --git a/keyboards/satan/satan.h b/keyboards/satan/satan.h
index 513446bf37..cbc8c91bd3 100644
--- a/keyboards/satan/satan.h
+++ b/keyboards/satan/satan.h
@@ -62,6 +62,33 @@
{k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k4a, k4b, k4c, k4d} \
}
+/* ISO w/ split right shift key matrix layout
+ * ,-----------------------------------------------------------.
+ * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d |
+ * |-----------------------------------------------------------|
+ * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d |
+ * |-----------------------------------------------------------|
+ * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c|2d |
+ * |-----------------------------------------------------------|
+ * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d |
+ * |-----------------------------------------------------------|
+ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d |
+ * `-----------------------------------------------------------'
+ */
+#define KEYMAP_ISO_SPLITRSHIFT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
+ k40, k41, k42, k45, k4a, k4b, k4c, k4d \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
+ {k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d} \
+}
void matrix_init_user(void);
void matrix_scan_user(void);