From 73883425a55f23a319eb1522c2e3ce52b8e2f042 Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 8 Nov 2018 23:17:41 +0000 Subject: relocate 40percent.club boards to new parent folder (#4380) * Initial move of 40percent.club boards to common parent folder. * Refactor readme files to be consistent * Refactor readme files to be consistent - fix make command examples. * Refactor readme files to be consistent - align readme filenames. * Refactor readme files to be consistent - fix repo url. * Disable Community keymap builds as they are currently failing due to missing functionality * Move more of 40percent.club boards to common parent folder. * Refactor readme files to be consistent - align readme filenames. * Refactor readme files to be consistent - fix make command examples. --- .../gherkin/keymaps/itsaferbie/config.h | 15 ++ .../gherkin/keymaps/itsaferbie/keymap.c | 152 +++++++++++++++++++++ .../gherkin/keymaps/itsaferbie/rules.mk | 7 + 3 files changed, 174 insertions(+) create mode 100644 keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h create mode 100644 keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk (limited to 'keyboards/40percentclub/gherkin/keymaps/itsaferbie') diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h new file mode 100644 index 000000000..71c0cb8b5 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h @@ -0,0 +1,15 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#undef RGB_DI_PIN +#undef RGBLED_NUM +#define RGB_DI_PIN D2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c new file mode 100644 index 000000000..580b041c9 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c @@ -0,0 +1,152 @@ +#include QMK_KEYBOARD_H + +extern rgblight_config_t rgblight_config; +extern keymap_config_t keymap_config; + +#define _PS 0 // This is the Photoshop Layer +#define _AI 1 // This is the Illustrator Layer +#define _PR 2 // This is the Premier Layer +#define _XD 3 // This is the Experience Design Layer + +enum custom_keycodes { + PS = SAFE_RANGE, + AI, + PR, +}; + +#define _______ KC_TRNS + +#define PS TO(0) +#define AI TO(1) +#define PR TO(2) +#define XD TO(3) + +// Mix of Photoshop, Illustrator, Premiere, and Experience Design shortcuts. +#define SAVE LCTL(KC_S) +#define OPEN LCTL(KC_O) +#define COPY LCTL(KC_C) +#define PAST LCTL(KC_V) +#define CUNDO LCTL(LALT(KC_Z)) +#define INVERT LCTL(LSFT(KC_I)) +#define NLAYER LSFT(LCTL(KC_N)) +#define UNDO LCTL(KC_Z) +#define TRANS LCTL(KC_T) +#define ALIGNL LCTL(LSFT(KC_L)) +#define ALIGNC LCTL(LSFT(KC_C)) +#define ALIGNR LCTL(LSFT(KC_R)) +#define BRINGF LCTL(KC_RBRC) +#define BRINGB LCTL(KC_LBRC) + +// Illustrator layer shortcuts. +#define SHAPE LSFT(KC_M) +#define RULER LCTL(LALT(KC_R)) + +// Premiere layer shortcuts. +#define REDO LCTL(LSFT(KC_Z)) +#define EXPORT LCTL(KC_M) +#define IMPORT LCTL(KC_I) +#define PCOPY LCTL(KC_V) +#define PPASTE LCTL(LSFT(KC_V)) + +// Experience Design layer shortcuts. (can be used with others too.) +#define NEW LCTL(KC_N) +#define LOCK LCTL(KC_L) +#define SYMB LCTL(KC_K) +#define HIDE LCTL(KC_SCLN) +#define REPEAT LCTL(KC_R) +#define MASK LCTL(LSFT(KC_M)) +#define GROUP LCTL(KC_G) +#define UNGRP LCTL(LSFT(KC_G)) +#define VIEW LCTL(KC_TAB) +#define HORZ LSFT(KC_C) +#define VERT LSFT(KC_M) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Photoshop layer + [_PS] = LAYOUT_ortho_3x10( + SAVE, KC_W, KC_E, KC_T, KC_U, KC_I, KC_P, INVERT, CUNDO, NLAYER, + UNDO, KC_H, KC_L, TRANS, ALIGNL, ALIGNC, ALIGNR, BRINGB, BRINGF, OPEN, + KC_LSFT, COPY, PAST, KC_Z, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, AI + ), + + // Illustrator layer + [_AI] = LAYOUT_ortho_3x10( + _______, M(0), RULER, _______, KC_G, _______, _______, KC_Q, KC_MINS, KC_PLUS, + _______, _______, _______, KC_E, _______, _______, _______, SHAPE, KC_O, OPEN, + _______, _______, _______, _______, _______, _______, _______, KC_M, KC_SLSH, PR + ), + + // Premiere layer + [_PR] = LAYOUT_ortho_3x10( + _______, KC_Q, KC_W, KC_I, KC_O, KC_P, IMPORT, EXPORT, KC_MINS, KC_EQL, + _______, REDO, KC_D, KC_F, KC_H, KC_M, KC_ENT, KC_LBRC, KC_RBRC, OPEN, + _______, PCOPY, PPASTE, KC_SPC, KC_Z, KC_C, KC_V, KC_LEFT, KC_RIGHT, XD + ), + + // Experience Design layer + [_XD] = LAYOUT_ortho_3x10( + _______, KC_E, KC_R, KC_T, KC_P, KC_A, KC_L, KC_V, KC_DEL, NEW, + _______, REDO, GROUP, UNGRP, VIEW, HORZ, VERT, KC_Z, KC_ENT, OPEN, + _______, KC_LCTL, COPY, PAST, SYMB, LOCK, MASK, HIDE, REPEAT, PS + ), + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +void matrix_init_user(void) { + rgblight_enable(); +} + +void matrix_scan_user(void) { + #ifdef RGBLIGHT_ENABLE + + static uint8_t old_layer = 255; + uint8_t new_layer = biton32(layer_state); + + // Color of the Icons. + if (old_layer != new_layer) { + switch (new_layer) { + case _PS: + // #31C5F0 + rgblight_setrgb(49, 197, 240); + break; + case _AI: + // #FF8011 + rgblight_setrgb(255, 128, 17); + break; + case _PR: + // #E788FF + rgblight_setrgb(231, 136, 255); + break; + case _XD: + // #FF2BC2 + rgblight_setrgb(255, 43, 194); + break; + } + old_layer = new_layer; + } + #endif +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + keyevent_t event = record->event; + (void)event; + + switch (id) { + case 0: + // Save for Web Macro. + return MACRO(D(LSFT), D(LALT), D(LCTL), T(S), U(LCTL), U(LALT), U(LSFT), END); + } + return MACRO_NONE; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + } + return true; +} diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk new file mode 100644 index 000000000..ed0af7b8b --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk @@ -0,0 +1,7 @@ +BACKLIGHT_ENABLE = yes +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file -- cgit v1.2.3-24-g4f1b From b173c05cc25e9394c6e50081c1af707443950104 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 12 Nov 2018 20:02:28 +0000 Subject: Tidy 40percentclub boards (#4403) * Remove unnecessary re-definitions for XXXXXXX and _______ * Update 6lit to use KC_NO in layout macros * Update rules.mk to follow current template * Remove use of deprecated function action_get_macro - unused and contents were from old template * Remove use of deprecated function action_get_macro - all code was commented out * Remove use of deprecated function action_get_macro - convert macro to use process_record_user * Convert keymap to consistent use of _______ * fix use of old style header guards * Swap KC_NO for XXXXXXX macro since the swap to the macro for KC_TRANS * Resolve use of ?= in rules.mk files * Remove duplication of rules.mk and config.h in gherkin mjt keymap * Remove unnecessary #includes * Align layout macros so foobar can use gherkin keymaps * Align 6lit layout macros with foobar * Remove ifndef QUANTUM_DIR from keymaps --- .../gherkin/keymaps/itsaferbie/config.h | 7 +---- .../gherkin/keymaps/itsaferbie/keymap.c | 31 +++++++++------------- .../gherkin/keymaps/itsaferbie/rules.mk | 4 --- 3 files changed, 13 insertions(+), 29 deletions(-) (limited to 'keyboards/40percentclub/gherkin/keymaps/itsaferbie') diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h index 71c0cb8b5..6849bbdd2 100644 --- a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h @@ -1,7 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #undef RGB_DI_PIN #undef RGBLED_NUM @@ -11,5 +8,3 @@ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c index 580b041c9..950b6e86b 100644 --- a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c @@ -12,10 +12,9 @@ enum custom_keycodes { PS = SAFE_RANGE, AI, PR, + MACRO_0, }; -#define _______ KC_TRNS - #define PS TO(0) #define AI TO(1) #define PR TO(2) @@ -72,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Illustrator layer [_AI] = LAYOUT_ortho_3x10( - _______, M(0), RULER, _______, KC_G, _______, _______, KC_Q, KC_MINS, KC_PLUS, + _______, MACRO_0, RULER, _______, KC_G, _______, _______, KC_Q, KC_MINS, KC_PLUS, _______, _______, _______, KC_E, _______, _______, _______, SHAPE, KC_O, OPEN, _______, _______, _______, _______, _______, _______, _______, KC_M, KC_SLSH, PR ), @@ -133,20 +132,14 @@ void matrix_scan_user(void) { #endif } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; - (void)event; - - switch (id) { - case 0: - // Save for Web Macro. - return MACRO(D(LSFT), D(LALT), D(LCTL), T(S), U(LCTL), U(LALT), U(LSFT), END); - } - return MACRO_NONE; -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - } - return true; -} + if (record->event.pressed) { + switch(keycode) { + case MACRO_0: + // Save for Web Macro. + SEND_STRING(SS_LSFT(SS_LALT(SS_LCTRL("s")))); + return false; + } + } + return true; +}; diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk index ed0af7b8b..b359ca287 100644 --- a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk @@ -1,7 +1,3 @@ BACKLIGHT_ENABLE = yes AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file -- cgit v1.2.3-24-g4f1b