-
-
Notifications
You must be signed in to change notification settings - Fork 40.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Userspace and keymap addition (#20522)
Co-authored-by: Drashna Jaelre <drashna@live.com>
- Loading branch information
1 parent
06a3682
commit 5bc282e
Showing
19 changed files
with
1,503 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/config.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com> | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
|
||
#pragma once | ||
|
||
# define TAPPING_TERM 160 | ||
# define TAPPING_TERM_PER_KEY | ||
# define HOLD_ON_OTHER_KEY_PRESS | ||
# define QUICK_TAP_TERM TAPPING_TERM / 2 | ||
# define QUICK_TAP_TERM_PER_KEY | ||
|
||
|
||
|
290 changes: 290 additions & 0 deletions
290
keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/keymap.c
Large diffs are not rendered by default.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/rules.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Common feature for all keyboards | ||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
EXTRAKEY_ENABLE = yes # Audio control and System control | ||
TAP_DANCE_ENABLE = yes # Tap Dance keys | ||
NKRO_ENABLE = yes # Enable N-Key Rollover | ||
MACROS_ENABLED = yes | ||
|
||
|
||
# Keyboard specific | ||
AUTO_SHIFT_ENABLE = no | ||
CONSOLE_ENABLE = no # Console for debug | ||
COMMAND_ENABLE = no # Commands for debug and configuration | ||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
AUDIO_ENABLE = no # Audio output | ||
MOUSEKEY_ENABLE = no # Mouse keys | ||
|
||
LEADER_ENABLE = yes | ||
RGB_MATRIX_ENABLE = yes | ||
RGB_MATRIX_DRIVER = WS2812 | ||
WS2812_DRIVER = vendor | ||
ENCODER_ENABLE = yes | ||
ENCODER_MAP_ENABLE = yes | ||
OLED_ENABLE = yes | ||
OLED_DRIVER = SSD1306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com> | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
|
||
#pragma once | ||
|
||
# define TAPPING_TERM 160 | ||
# define TAPPING_TERM_PER_KEY | ||
# define HOLD_ON_OTHER_KEY_PRESS | ||
# define QUICK_TAP_TERM TAPPING_TERM / 2 | ||
# define QUICK_TAP_TERM_PER_KEY | ||
|
||
# define CIRQUE_PINNACLE_TAP_ENABLE | ||
# define CIRQUE_PINNACLE_SECONDARY_TAP_ENABLE | ||
# define CIRQUE_PINNACLE_ATTENUATION_4X | ||
# define CIRQUE_PINNACLE_POSITION_MODE CIRQUE_PINNACLE_RELATIVE_MODE | ||
//# define CIRQUE_DEVICE_GESTURES_SCROLL_ENABLE |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Common feature for all keyboards | ||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
EXTRAKEY_ENABLE = yes # Audio control and System control | ||
TAP_DANCE_ENABLE = yes # Tap Dance keys | ||
NKRO_ENABLE = yes # Enable N-Key Rollover | ||
MACROS_ENABLED = yes | ||
|
||
# Keyboard specific | ||
MOUSEKEY_ENABLE = yes # Mouse keys | ||
CAPS_WORD_ENABLE = yes | ||
KEY_OVERRIDE_ENABLE = yes | ||
LEADER_ENABLE = yes | ||
|
||
|
||
LTO_ENABLE = no # Enabled this causes longer build time, but smaller file. | ||
AUTO_SHIFT_ENABLE = no | ||
UNICODE_ENABLE = no # Unicode | ||
CONSOLE_ENABLE = no # Console for debug | ||
COMMAND_ENABLE = no # Commands for debug and configuration | ||
RGBLIGHT_ENABLE = no | ||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend (it uses the same timer as BACKLIGHT_ENABLE) | ||
AUDIO_ENABLE = no # Audio output on port C6 | ||
MIDI_ENABLE = no # MIDI support | ||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
GRAVE_ESC_ENABLE = no | ||
SPACE_CADET_ENABLE = no | ||
COMBO_ENABLE = no | ||
OLED_ENABLE = no | ||
ENCODER_ENABLE = no | ||
ENCODER_MAP_ENABLE = no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com> | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
|
||
#pragma once | ||
|
||
# define TAPPING_TERM 160 | ||
# define TAPPING_TERM_PER_KEY | ||
# define HOLD_ON_OTHER_KEY_PRESS | ||
# define QUICK_TAP_TERM TAPPING_TERM / 2 | ||
# define QUICK_TAP_TERM_PER_KEY |
221 changes: 221 additions & 0 deletions
221
keyboards/mechwild/bde/rev2/keymaps/miketronic/keymap.c
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
EXTRAKEY_ENABLE = yes # Audio control and System control | ||
TAP_DANCE_ENABLE = yes # Tap Dance keys | ||
NKRO_ENABLE = yes # Enable N-Key Rollover | ||
MACROS_ENABLED = yes | ||
LEADER_ENABLE = yes | ||
|
||
ENCODER_ENABLE = yes | ||
ENCODER_MAP_ENABLE = yes | ||
OLED_ENABLE = yes # Enable OLED Screen | ||
OLED_DRIVER = SSD1306 # Set OLED Driver | ||
|
||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com> | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
|
||
#pragma once | ||
|
||
#define DEBOUNCE 10 | ||
#if defined(TAP_DANCE_ENABLE) | ||
# define TAP_CODE_DELAY 5 | ||
# define TAP_HOLD_CAPS_DELAY 25 | ||
#endif | ||
#define MACRO_TIMER 5 | ||
#define ENABLE_COMPILE_KEYCODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com> | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
|
||
#include "miketronic.h" | ||
|
||
|
||
__attribute__ ((weak)) void keyboard_post_init_keymap(void) { } | ||
|
||
// Init effect for RGB boards only | ||
void keyboard_post_init_user(void) { | ||
#ifdef RGB_MATRIX_ENABLE | ||
rgblight_enable_noeeprom(); // enables Rgb, without saving settings | ||
rgblight_sethsv_noeeprom(HSV_ORANGE); // sets the color without saving | ||
rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR); | ||
#endif | ||
keyboard_post_init_keymap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com> | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
|
||
#pragma once | ||
#include QMK_KEYBOARD_H | ||
|
||
#include "quantum.h" | ||
#include "wrappers.h" | ||
#include "action.h" | ||
#include "version.h" | ||
#include "process_records.h" | ||
#ifdef TAP_DANCE_ENABLE | ||
# include "tapdances.h" | ||
#endif | ||
|
||
enum layer_names { | ||
_WM, | ||
_QW, | ||
_LOWER, | ||
_RAISE, | ||
_EX, | ||
_FN, | ||
_SYMB | ||
}; | ||
|
||
|
||
// Layer macros | ||
#define LOWER MO(_LOWER) | ||
#define RAISE MO(_RAISE) | ||
#define FN MO(_FN) | ||
#define EX MO(_EX) | ||
#define TEX LT(_EX, KC_T) // Tap for "T", hold for Extras layer | ||
#define BSYM LT(_SYMB, KC_B) // Tap for "B", hold for Symbols layer | ||
#define JSYM LT(_SYMB, KC_J) // Tap for "J", hold for Symbols layer | ||
#define FNZ LT(_FN, KC_Z) // Tap for "Z", hold for FN layer | ||
#define VLOWER LT(_LOWER, KC_V) // Tap for "V", hold for Lower layer | ||
#define KRAISE LT(_RAISE, KC_K) // Tap for "K", hold for Raise layer | ||
|
||
// Mod Tap | ||
//#define ASFT MT(MOD_LSFT, KC_A) // Tap for "A", hold for Shift | ||
#define ASFT SFT_T(KC_A) // Tap for "A", hold for Shift | ||
#define GGUI MT(MOD_LGUI, KC_G) // Tap for "G", hold for OS Key | ||
#define MGUI MT(MOD_LGUI, KC_M) // Tap for "M", hold for OS Key | ||
#define CTRLX MT(MOD_LCTL, KC_X) // Tap for "X", hold for Ctrl | ||
#define CALT MT(MOD_LALT, KC_C) // Tap for "C", hold for Alt | ||
#define L_ALT MT(MOD_RALT, KC_L) // Tap for "L", hold for Alt | ||
#define TBSHFT MT(MOD_LSFT, KC_TAB) // Tap for Tab, hold for Shift | ||
#define SLSHFT MT(MOD_RSFT, KC_SLSH) // Tap for Slash, hold for Shift | ||
#define SFT_ENT RSFT_T(KC_ENT) // Tap for Enter, hold for Shift | ||
#define OSSFT OSM(MOD_LSFT) // One shot left Shift | ||
|
||
// MISC | ||
#define CALTDEL LCTL(LALT(KC_DEL)) // Ctrl Alt Del | ||
#define TSKMGR LCTL(LSFT(KC_ESC)) // Task Manager | ||
#define CLIP LCTL(LALT(KC_Q)) // Clipboard (Ditto) | ||
#define SS LCTL(LALT(KC_G)) // Greenshot region | ||
#define NUM LSFT(KC_3) | ||
#define AT LSFT(KC_2) | ||
#define COPY LCTL(KC_C) | ||
#define PASTE LCTL(KC_V) | ||
#define ____ KC_TRNS | ||
#define XXXX KC_NO | ||
#define XXXXXXX KC_NO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com> | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
|
||
#include "miketronic.h" | ||
#include "process_records.h" | ||
|
||
__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
return true; | ||
} | ||
|
||
__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { | ||
return true; | ||
} | ||
|
||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
|
||
switch (keycode) { | ||
case VERSION: | ||
if (!record->event.pressed) { | ||
send_string_with_delay_P(PSTR(QMK_KEYBOARD ":" QMK_KEYMAP "\nVersion:" QMK_VERSION ", built: " QMK_BUILDDATE "\n"), MACRO_TIMER); | ||
} | ||
break; | ||
|
||
case M01: | ||
if (record->event.pressed) { | ||
SEND_STRING("//a11"); | ||
} | ||
break; | ||
|
||
case M02: | ||
if (record->event.pressed) { | ||
SEND_STRING("//a12"); | ||
} | ||
break; | ||
|
||
case M03: | ||
if (record->event.pressed) { | ||
SEND_STRING("//a08"); | ||
} | ||
break; | ||
|
||
case M04: | ||
if (record->event.pressed) { | ||
SEND_STRING("//a09"); | ||
} | ||
break; | ||
|
||
case M05: | ||
if (record->event.pressed) { | ||
SEND_STRING("//th"); | ||
} | ||
break; | ||
|
||
case M06: | ||
if (record->event.pressed) { | ||
SEND_STRING("//re"); | ||
} | ||
break; | ||
|
||
case M07: | ||
if (record->event.pressed) { | ||
SEND_STRING("//yw"); | ||
} | ||
break; | ||
|
||
case M08: | ||
if (record->event.pressed) { | ||
tap_random_base64(); | ||
} | ||
break; | ||
|
||
case CCCV: // One key copy/paste | ||
if (record->event.pressed) { | ||
copy_paste_timer = timer_read(); | ||
} else { | ||
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy | ||
tap_code16(LCTL(KC_C)); | ||
} else { // Tap, paste | ||
tap_code16(LCTL(KC_V)); | ||
} | ||
} | ||
break; | ||
|
||
case IENTER: // Tap for letter "i", slight hold for "enter" | ||
if (record->event.pressed) { | ||
copy_paste_timer = timer_read(); | ||
} else { | ||
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, enter | ||
tap_code16(KC_ENT); | ||
} else { // Tap, "i" | ||
tap_code16(KC_I); | ||
} | ||
} | ||
break; | ||
|
||
case PRN: | ||
if (record->event.pressed) { | ||
SEND_STRING("()"); | ||
tap_code(KC_LEFT); | ||
} | ||
break; | ||
|
||
case BRACES: | ||
if (record->event.pressed) { | ||
uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); | ||
if (shifted) { | ||
unregister_code(KC_LSFT); | ||
unregister_code(KC_RSFT); | ||
SEND_STRING("<>"SS_TAP(X_LEFT)); | ||
} | ||
else { | ||
SEND_STRING("[]"SS_TAP(X_LEFT)); | ||
} | ||
} | ||
break; | ||
|
||
#if defined(RGBLIGHT_ENABLE) | ||
case RGB1: | ||
if (record->event.pressed) { | ||
rgblight_sethsv_noeeprom(HSV_BLUE); | ||
} | ||
break; | ||
|
||
case RGB2: | ||
if (record->event.pressed) { | ||
rgblight_sethsv_noeeprom(HSV_RED); | ||
} | ||
break; | ||
|
||
case RGB3: | ||
if (record->event.pressed) { | ||
rgblight_sethsv_noeeprom(HSV_ORANGE); | ||
} | ||
break; | ||
|
||
case RGB4: | ||
if (record->event.pressed) { | ||
rgblight_sethsv_noeeprom(HSV_WHITE); | ||
} | ||
break; | ||
|
||
case RGB5: | ||
if (record->event.pressed) { | ||
rgblight_sethsv_noeeprom(HSV_GREEN); | ||
} | ||
break; | ||
#endif | ||
} | ||
return process_record_keymap(keycode, record) && process_record_secrets(keycode, record); | ||
} |
Oops, something went wrong.