From 7150efceacc860a9efac265ba08d95f39f2f9885 Mon Sep 17 00:00:00 2001 From: Sadek Baroudi Date: Thu, 22 Dec 2022 14:38:22 -0800 Subject: [PATCH] finalize klor firmware --- .../fingerpunch/personal/klor/2040/config.h | 2 - .../fingerpunch/personal/klor/2040/rules.mk | 2 +- .../klor/keymaps/sadekbaroudi/config.h | 71 ++++ .../klor/keymaps/sadekbaroudi/keymap.c | 362 ++++++++++++++++++ .../klor/keymaps/sadekbaroudi/rules.mk | 11 + keyboards/fingerpunch/personal/klor/klor.h | 4 +- users/sadekbaroudi/combos.c | 6 +- users/sadekbaroudi/process_records.c | 16 +- users/sadekbaroudi/wrappers.h | 9 +- 9 files changed, 466 insertions(+), 17 deletions(-) create mode 100644 keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/config.h create mode 100644 keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/keymap.c create mode 100644 keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/rules.mk diff --git a/keyboards/fingerpunch/personal/klor/2040/config.h b/keyboards/fingerpunch/personal/klor/2040/config.h index 8fdf4d6d85..c3c566e1cd 100644 --- a/keyboards/fingerpunch/personal/klor/2040/config.h +++ b/keyboards/fingerpunch/personal/klor/2040/config.h @@ -12,5 +12,3 @@ #define AUDIO_PWM_DRIVER PWMD4 #define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_B #define AUDIO_STATE_TIMER GPTD4 - -#define RP2040_FLASH_GENERIC_03H \ No newline at end of file diff --git a/keyboards/fingerpunch/personal/klor/2040/rules.mk b/keyboards/fingerpunch/personal/klor/2040/rules.mk index 7ee48e4daa..870cfd1f1b 100644 --- a/keyboards/fingerpunch/personal/klor/2040/rules.mk +++ b/keyboards/fingerpunch/personal/klor/2040/rules.mk @@ -21,5 +21,5 @@ CONVERT_TO = promicro_rp2040 #CONVERT_TO = elite_pi # AUDIO -AUDIO_ENABLE = yes +AUDIO_ENABLE = no AUDIO_DRIVER = pwm_hardware diff --git a/keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/config.h b/keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/config.h new file mode 100644 index 0000000000..bcfae65096 --- /dev/null +++ b/keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/config.h @@ -0,0 +1,71 @@ +#pragma once + +/* The way how "handedness" is decided (which half is which), +see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness +for more options. +*/ + +#define MASTER_LEFT +// #define MASTER_RIGHT + +// Sadek: I added this because the splinkies I got were using a substituted flash, so changed to match my flash module per this: +// https://github.com/qmk/qmk_firmware/blob/master/docs/platformdev_rp2040.md#rp2040-second-stage-bootloader-selection +#define RP2040_FLASH_GENERIC_03H + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +// RGB matrix support +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effect + +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_SOLID_COLOR +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined ├─────────────────────────────┐ +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined ├────────────┐ +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/keymap.c b/keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/keymap.c new file mode 100644 index 0000000000..692e715ce7 --- /dev/null +++ b/keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/keymap.c @@ -0,0 +1,362 @@ +/* + + █ █ █ ▄▄▄▀▀▀▀▀▀▄▄▄ █▀▀▀▀▀▀▀▀▀▀█ + █ █ █ ▄▀ ▀▄ █ █ + █ █ █ ▄▀ ▀▄ █ █ + █ █ █ █ █ █ █ + █ █ █ █ █ █ █ + █ █ █ █ █ █▄▄▄▄▄▄▄▄▄▄█ + █ █ █ █ █ █ █ █ + █ █ █ █ █ █ █ █ + █ █ █ █ ▀▄ ▄▀ █ █ + ██ █ █ ▀▄ ▄▀ █ █ + █ █ █▄▄▄▄▄▄▄▄ ▀▀▀▄▄▄▄▄▄▀▀▀ █ █ + + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + D E F A U L T + +*/ +#include "sadekbaroudi.h" +#include QMK_KEYBOARD_H +#include +#include +#include "klor.h" +#ifdef HAPTIC_ENABLE +#include "drivers/haptic/DRV2605L.h" +#endif //HAPTIC ENABLE + +// clang-format off +#define LAYOUT_klor_base( \ + K00, K10, K20, K30, K40, K44, K34, K24, K14, K04, \ + K01, K11, K21, K31, K41, K45, K35, K25, K15, K05, \ + K02, K12, K22, K32, K42, K46, K36, K26, K16, K06, \ + K23, K33, K43, K47, K37, K27 \ + ) \ + LAYOUT_wrapper( \ + K00, K10, K20, LT(_FUNCTION, K30), K40, K44, LT(_FUNCTION, K34), K24, K14, K04, \ + _______, LCTL_T(K01), LGUI_T(K11), LALT_T(K21), LSFT_T(K31), K41, LT(_MOUSE, K45), RSFT_T(K35), RALT_T(K25), RGUI_T(K15), RCTL_T(K05), _______, \ + _______, K02, K12, K22, K32, K42, _______, _______, K46, K36, K26, K16, K06, _______, \ + K23, LT(_NAVIGATION,K33), LT(_FUNCTION,K43), _______, _______, LT(_MEDIA,K47), LT(_SYMBOLS,K37), K27 \ + ) + +/* Re-pass though to allow templates to be used */ +#define LAYOUT_klor_base_wrapper(...) LAYOUT_klor_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_ALPHA_ALT] = LAYOUT_klor_base_wrapper( + _________________ALPHA_ALT_L1_________________, _________________ALPHA_ALT_R1_________________, + _________________ALPHA_ALT_L2_________________, _________________ALPHA_ALT_R2_________________, + _________________ALPHA_ALT_L3_________________, _________________ALPHA_ALT_R3_________________, + __ALPHA_ALT_THUMBS_6__ + ), + + [_ALPHA] = LAYOUT_klor_base_wrapper( + __________________ALPHA_L1____________________, __________________ALPHA_R1____________________, + __________________ALPHA_L2____________________, __________________ALPHA_R2____________________, + __________________ALPHA_L3____________________, __________________ALPHA_R3____________________, + __ALPHA_THUMBS_6__ + ), + + [_NAVIGATION] = LAYOUT_wrapper( + ________________NAVIGATION_1_______________, _________________NUMPAD_1__________________, + _______, ________________NAVIGATION_2_______________, _________________NUMPAD_2__________________, _______, + _______, ________________NAVIGATION_3_______________, _______, _______, _________________NUMPAD_3__________________, _______, + _______, _______, KC_TAB, _______, _______, KC_BSPC, KC_SPACE, KC_DOT + ), + + [_SYMBOLS] = LAYOUT_wrapper( + ________________SYMBOLS_L1_________________, ________________SYMBOLS_R1_________________, + _______, ________________SYMBOLS_L2_________________, ________________SYMBOLS_R2_________________, _______, + _______, ________________SYMBOLS_L3_________________, _______, _______, ________________SYMBOLS_R3_________________, _______, + _______, KC_ENT, KC_DEL, _______, _______, KC_BSPC, _______, _______ + ), + + [_FUNCTION] = LAYOUT_wrapper( + ________________SHIFTNAV_1_________________, ________________FUNCTION_1_________________, + _______, ________________SHIFTNAV_2_________________, ________________FUNCTION_2_________________, _______, + _______, ________________SHIFTNAV_3_________________, _______, _______, ________________FUNCTION_3_________________, _______, + _______, _______, _______, _______, _______, N_DEL_LINE, KC_SPACE, _______ + ), + + [_MEDIA] = LAYOUT_wrapper( + ___________________RGB_1___________________, _________________MACROS_1__________________, + _______, ___________________RGB_2___________________, _________________MACROS_2__________________, _______, + _______, ___________________RGB_3___________________, _______, _______, _________________MACROS_3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_MOUSE] = LAYOUT_wrapper( + _______________AUTO_MOUSE_1________________, ___________________BLANK___________________, + _______, _______________AUTO_MOUSE_2________________, ___________________BLANK___________________, _______, + _______, _______________AUTO_MOUSE_3________________, _______, _______, ___________________BLANK___________________, _______, + _______, KC_MS_BTN1, KC_MS_BTN3, _______, _______, KC_MS_BTN3, KC_MS_BTN2, _______ + ) +}; + + +// What I kept from original KLOR firmware + +// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// │ O L E D │ +// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘ + +#ifdef OLED_ENABLE + +// ┌───────────────────────────────────────────────────────────┐ +// │ d y n a m i c m a c r o │ +// └───────────────────────────────────────────────────────────┘ + +char layer_state_str[24]; +char o_text[24] = ""; +int dmacro_num = 0; + +#ifdef DYNAMIC_MACRO_ENABLE + char dmacro_text[4][24] = { "", "RECORDING", "STOP RECORDING", "PLAY RECORDING"}; + static uint16_t dmacro_timer; + const char PROGMEM rec_ico[] = {0xD1, 0xE1, 0}; + const char PROGMEM stop_ico[] = {0xD3, 0xE1, 0}; + const char PROGMEM play_ico[] = {0xD2, 0xE1, 0}; + + + // DYNMACRO RECORD ├─────────────────────────────────────────────────────────────┐ + void dynamic_macro_record_start_user(void) { + dmacro_num = 1; + return; + } + + // DYNMACRO STOP RECORDING ├─────────────────────────────────────────────────────┐ + void dynamic_macro_record_end_user(int8_t direction) { + dmacro_num = 2; + dmacro_timer = timer_read(); + return; + } + + // DYNMACRO PLAY RECORDING ├─────────────────────────────────────────────────────┐ + void dynamic_macro_play_user(int8_t direction) { + dmacro_num = 3; + dmacro_timer = timer_read(); + return; + } +#endif //DYNAMIC_MACRO_ENABLE + + +void matrix_scan_keymap(void) { + #ifdef DYNAMIC_MACRO_ENABLE + // DynMacroTimer + if(dmacro_num > 0){ + if (timer_elapsed(dmacro_timer) < 3000) { + strcpy ( o_text, dmacro_text[dmacro_num] ); + } + else { + if (dmacro_num == 1) { + strcpy ( o_text, dmacro_text[1] ); + } + else { + strcpy ( o_text, layer_state_str ); + dmacro_num = 0; + } + } + } + #endif //DYNAMIC_MACRO_ENABLE +} + + +// ┌───────────────────────────────────────────────────────────┐ +// │ o l e d g r a p h i c s │ +// └───────────────────────────────────────────────────────────┘ + +void render_os_lock_status(void) { + static const char PROGMEM sep_v[] = {0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0}; + static const char PROGMEM sep_h1[] = {0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0}; + static const char PROGMEM sep_h2[] = {0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0}; + static const char PROGMEM face_1[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0xE1, 0}; + static const char PROGMEM face_2[] = {0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xE1, 0}; + static const char PROGMEM os_m_1[] = {0x95, 0x96, 0}; + static const char PROGMEM os_m_2[] = {0xB5, 0xB6, 0}; + static const char PROGMEM os_w_1[] = {0x97, 0x98, 0}; + static const char PROGMEM os_w_2[] = {0xB7, 0xB8, 0}; + static const char PROGMEM s_lock[] = {0x8F, 0x90, 0}; + static const char PROGMEM n_lock[] = {0x91, 0x92, 0}; + static const char PROGMEM c_lock[] = {0x93, 0x94, 0}; + static const char PROGMEM b_lock[] = {0xE1, 0xE1, 0}; + #ifdef AUDIO_ENABLE + static const char PROGMEM aud_en[] = {0xAF, 0xB0, 0}; + static const char PROGMEM aud_di[] = {0xCF, 0xD0, 0}; + #endif + #ifdef HAPTIC_ENABLE + static const char PROGMEM hap_en[] = {0xB1, 0xB2, 0}; + #endif + +// os mode status ────────────────────────────────────────┐ + + oled_write_ln_P(sep_v, false); + + if (keymap_config.swap_lctl_lgui) { + oled_write_P(os_m_1, false); // ──── MAC + } else { + oled_write_P(os_w_1, false); // ──── WIN + } + + oled_write_P(sep_h1, false); + oled_write_P(face_1, false); + + if (keymap_config.swap_lctl_lgui) { + oled_write_P(os_m_2, false); // ──── MAC + } else { + oled_write_P(os_w_2, false); // ──── WIN + } + + oled_write_P(sep_h1, false); + oled_write_P(face_2, false); + oled_write_ln_P(sep_v, false); + + +// lock key layer status ─────────────────────────────────┐ + + led_t led_usb_state = host_keyboard_led_state(); + + if (led_usb_state.num_lock) { + oled_write_P(n_lock, false); // ──── NUMLOCK + } else { + oled_write_P(b_lock, false); + } + if (led_usb_state.caps_lock) { + oled_write_P(c_lock, false); // ─── CAPSLOCK + } else { + oled_write_P(b_lock, false); + } + if (led_usb_state.scroll_lock) { // ─ SCROLLLOCK + oled_write_P(s_lock, false); + } else { + oled_write_P(b_lock, false); + } + +// hardware feature status ──────────────────────────────┐ + + oled_write_P(sep_h2, false); + + #ifndef AUDIO_ENABLE + oled_write_P(b_lock, false); + #endif + #ifndef HAPTIC_ENABLE + oled_write_P(b_lock, false); + #endif + + #ifdef AUDIO_ENABLE // ────────────────── AUDIO + if (is_audio_on()) { + oled_write_P(aud_en, false); + } else { + oled_write_P(aud_di, false); + } + #endif // AUDIO ENABLE + + #ifdef HAPTIC_ENABLE // ─────────────── HAPTIC + oled_write_P(hap_en, false); + #endif // HAPTIC ENABLE +} + + +// layer status ──────────────────────────────────────────┐ + +int layerstate = 0; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + switch (get_highest_layer(layer_state | default_layer_state)) { + case 0: + strcpy ( layer_state_str, "ALPHA ALT"); + break; + case 1: + strcpy ( layer_state_str, "COLEMAK"); + break; + case 2: + strcpy ( layer_state_str, "NAVIGATION"); + break; + case 3: + strcpy ( layer_state_str, "SYMBOLS"); + break; + case 4: + strcpy ( layer_state_str, "FUNCTION"); + break; + case 5: + strcpy ( layer_state_str, "MEDIA"); + break; + case 6: + strcpy ( layer_state_str, "MOUSE"); + break; + default: + strcpy ( layer_state_str, "XXXXXX"); + } + if (dmacro_num < 1) { + strcpy ( o_text, layer_state_str ); + } + + return state; +} + + +// ┌───────────────────────────────────────────────────────────┐ +// │ w r i t e t o o l e d │ +// └───────────────────────────────────────────────────────────┘ + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + if (is_keyboard_master()) { // ────────────────────────── PRIMARY SIDE + + // layer status ──────────────────────────────────────────────────┐ + #ifdef DYNAMIC_MACRO_ENABLE + if(dmacro_num == 1){ oled_write_P(rec_ico, false); } + if(dmacro_num == 2){ oled_write_P(stop_ico, false); } + if(dmacro_num == 3){ oled_write_P(play_ico, false); } + #endif //DYNAMIC_MACRO_ENABLE + + oled_write_ln(o_text, false); + render_os_lock_status(); + + } else { // ─────────────────────────────────────────── SECONDARY SIDE + + // KLOR face ─────────────────────────────────────────────────────┐ + + static const char PROGMEM klor_face[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(klor_face, sizeof(klor_face)); + } + return false; +} +#endif // OLED_ENABLE + diff --git a/keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/rules.mk b/keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/rules.mk new file mode 100644 index 0000000000..706f350dd9 --- /dev/null +++ b/keyboards/fingerpunch/personal/klor/keymaps/sadekbaroudi/rules.mk @@ -0,0 +1,11 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +ENCODER_ENABLE = yes +AUDIO_ENABLE = yes +MUSIC_ENABLE = yes + +#HAPTIC FEEBACK +HAPTIC_ENABLE = no + +#PER KEY RGB +RGB_MATRIX_ENABLE = yes diff --git a/keyboards/fingerpunch/personal/klor/klor.h b/keyboards/fingerpunch/personal/klor/klor.h index 023331ca2e..46910cc43a 100644 --- a/keyboards/fingerpunch/personal/klor/klor.h +++ b/keyboards/fingerpunch/personal/klor/klor.h @@ -103,4 +103,6 @@ } -#define LAYOUT LAYOUT_polydactyl \ No newline at end of file +#define LAYOUT LAYOUT_polydactyl + +#include "keyboards/fingerpunch/fp.h" \ No newline at end of file diff --git a/users/sadekbaroudi/combos.c b/users/sadekbaroudi/combos.c index 03631c57d3..28a32c76cc 100644 --- a/users/sadekbaroudi/combos.c +++ b/users/sadekbaroudi/combos.c @@ -130,12 +130,12 @@ void process_combo_event(uint16_t combo_index, bool pressed) { break; case SEMICOLON: if (pressed) { - tap_code16(KC_SCOLON); + tap_code16(KC_COLON); } break; case LBRACKET: if (pressed) { - tap_code16(KC_LBRACKET); + tap_code16(LBRACKET); } break; case LCURLY: @@ -170,7 +170,7 @@ void process_combo_event(uint16_t combo_index, bool pressed) { break; case RBRACKET: if (pressed) { - tap_code16(KC_RBRACKET); + tap_code16(RBRACKET); } break; } diff --git a/users/sadekbaroudi/process_records.c b/users/sadekbaroudi/process_records.c index 9e15758605..20a61078f8 100755 --- a/users/sadekbaroudi/process_records.c +++ b/users/sadekbaroudi/process_records.c @@ -223,9 +223,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case N_DEL_LINE: if (record->event.pressed) { SEND_STRING(SS_TAP(X_END)); - register_code(KC_LSHIFT); + register_code(KC_LSFT); SEND_STRING(SS_TAP(X_HOME)); - unregister_code(KC_LSHIFT); + unregister_code(KC_LSFT); } else { // when keycode is released } @@ -233,9 +233,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case N_SEL_LINE: if (record->event.pressed) { SEND_STRING(SS_TAP(X_END)); - register_code(KC_LSHIFT); + register_code(KC_LSFT); SEND_STRING(SS_TAP(X_HOME)); - unregister_code(KC_LSHIFT); + unregister_code(KC_LSFT); } break; case P_ANGBRKT: @@ -289,9 +289,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case G_GOD_ON: if (record->event.pressed) { - register_code(KC_LSHIFT); + register_code(KC_LSFT); SEND_STRING(SS_TAP(X_ENTER)); - unregister_code(KC_LSHIFT); + unregister_code(KC_LSFT); SEND_STRING("GOD MODE ENGAGED"SS_TAP(X_ENTER)); } else { // when keycode is released @@ -299,9 +299,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case G_GOD_OFF: if (record->event.pressed) { - register_code(KC_LSHIFT); + register_code(KC_LSFT); SEND_STRING(SS_TAP(X_ENTER)); - unregister_code(KC_LSHIFT); + unregister_code(KC_LSFT); SEND_STRING("GOD MODE DISENGAGED"SS_TAP(X_ENTER)); } else { // when keycode is released diff --git a/users/sadekbaroudi/wrappers.h b/users/sadekbaroudi/wrappers.h index 2b0a75381c..64904168ea 100755 --- a/users/sadekbaroudi/wrappers.h +++ b/users/sadekbaroudi/wrappers.h @@ -131,6 +131,11 @@ expanded before being used as arguments to the LAYOUT_xxx macro. # define LAYOUT LAYOUT_fflx #endif +// Since KLOR uses the name LAYOUT_polydactyl instead of LAYOUT +#if (!defined(LAYOUT) && defined(LAYOUT_polydactyl)) +# define LAYOUT LAYOUT_polydactyl +#endif + // clang-format off #define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) @@ -348,7 +353,7 @@ NOTE: These are all the same length. If you do a search/replace #define __SHIFTNAV_1_K2__ LSFT(KC_PGUP) #define __SHIFTNAV_1_K3__ LSFT(KC_UP) #define __SHIFTNAV_1_K4__ LSFT(KC_PGDN) -#define __SHIFTNAV_1_K5__ EEP_RST +#define __SHIFTNAV_1_K5__ EE_CLR #define __SHIFTNAV_2_K1__ LSFT(KC_HOME) #define __SHIFTNAV_2_K2__ LSFT(KC_LEFT) @@ -476,7 +481,7 @@ NOTE: These are all the same length. If you do a search/replace #define __AMOUSE_2_K4_ KC_BTN1 #define __AMOUSE_2_K5_ KC_MS_WH_RIGHT -#define __AMOUSE_3_K1_ EEP_RST +#define __AMOUSE_3_K1_ EE_CLR #define __AMOUSE_3_K2_ KC_MS_WH_UP #define __AMOUSE_3_K3_ KC_MS_WH_DOWN #define __AMOUSE_3_K4_ KC_MS_ACCEL1