summaryrefslogtreecommitdiff
path: root/keyboards/mechwild/mercutio/keymaps/jonavin
diff options
context:
space:
mode:
authorjonavin <71780717+Jonavin@users.noreply.github.com>2021-08-19 13:45:49 -0400
committerGitHub <noreply@github.com>2021-08-19 10:45:49 -0700
commit98af5bc64e6148915cebcfdd607119b9feefe90d (patch)
tree3f7e4e4f3ce67c279a872d31ef62e89f3d0b5a73 /keyboards/mechwild/mercutio/keymaps/jonavin
parent425e1e665dc3c114fc42878f2b6a9d3225e5e6b5 (diff)
[Keymap] Add jonavin user space / common functions (#13876)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Jonavin <=>
Diffstat (limited to 'keyboards/mechwild/mercutio/keymaps/jonavin')
-rwxr-xr-xkeyboards/mechwild/mercutio/keymaps/jonavin/keymap.c47
-rw-r--r--keyboards/mechwild/mercutio/keymaps/jonavin/readme.md7
-rw-r--r--keyboards/mechwild/mercutio/keymaps/jonavin/rules.mk3
3 files changed, 14 insertions, 43 deletions
diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
index ed321e79b9..ddde6d6525 100755
--- a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
@@ -18,35 +18,7 @@
#include QMK_KEYBOARD_H
#include <stdio.h>
-
-enum custom_layers {
- _BASE,
- _FN1,
- _LOWER,
- _RAISE,
-};
-
-enum custom_keycodes {
- ENCFUNC = SAFE_RANGE, // encoder function keys
- KC_WINLCK, //Toggles Win key on and off
-};
-
-// Tap Dance Definitions
-enum custom_tapdance {
- TD_LSFT_CAPSLOCK,
-};
-
-qk_tap_dance_action_t tap_dance_actions[] = {
- // Tap once for shift, twice for Caps Lock
- [TD_LSFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
-};
-
-bool _isWinKeyDisabled = false;
-
-#define KC_LSFTCAPS TD(TD_LSFT_CAPSLOCK)
-#define KC_CAD LALT(LCTL(KC_DEL))
-#define KC_AF4 LALT(KC_F4)
-#define KC_TASK LCTL(LSFT(KC_ESC))
+#include "jonavin.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_all(
@@ -113,13 +85,12 @@ static void set_selectedkey(uint8_t idx) {
}
-void keyboard_post_init_user(void) {
+void keyboard_post_init_keymap(void) {
// Call the keyboard post init code.
- //selectedkey_rec = keyselection[selectedkey_idx];
set_selectedkey(selectedkey_idx);
}
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case ENCFUNC:
if (record->event.pressed) {
@@ -128,16 +99,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// when keycode is released
}
break;
- case KC_WINLCK:
- if (record->event.pressed) {
- _isWinKeyDisabled = !_isWinKeyDisabled; //toggle status
- if(_isWinKeyDisabled) {
- process_magic(GUI_OFF, record);
- } else {
- process_magic(GUI_ON, record);
- }
- } else unregister_code16(keycode);
- break;
}
return true;
};
@@ -274,7 +235,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
default:
oled_write_P(PSTR("Layer ?"), false); // Should never display, here as a catchall
}
- oled_write_P(_isWinKeyDisabled ? PSTR(" WL") : PSTR(" "), false);
+ oled_write_P(keymap_config.no_gui ? PSTR(" WL") : PSTR(" "), false);
oled_set_cursor(8,3);
if (get_highest_layer(layer_state) == selected_layer) {
oled_write_P(PSTR(" "), false);
diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/readme.md b/keyboards/mechwild/mercutio/keymaps/jonavin/readme.md
index 730bee8897..6255dadd05 100644
--- a/keyboards/mechwild/mercutio/keymaps/jonavin/readme.md
+++ b/keyboards/mechwild/mercutio/keymaps/jonavin/readme.md
@@ -38,6 +38,13 @@ Features
While holding Left Alt, media next track or previous track
+rules.mk OPTIONS - Active features from userspace
+STARTUP_NUMLOCK_ON = yes
+ - turns on NUMLOCK by default
+
+TD_LSFT_CAPSLOCK_ENABLE = yes
+ - This will enable double tap on Left Shift to toggle CAPSLOCK when using KC_LSFTCAPS
+
Default Layers
![image](https://user-images.githubusercontent.com/71780717/127014682-3aa05136-6dc7-4a40-9be1-89a5b584848a.png)
diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/rules.mk b/keyboards/mechwild/mercutio/keymaps/jonavin/rules.mk
index 550e84c809..0b76c6e57c 100644
--- a/keyboards/mechwild/mercutio/keymaps/jonavin/rules.mk
+++ b/keyboards/mechwild/mercutio/keymaps/jonavin/rules.mk
@@ -3,3 +3,6 @@ VIA_ENABLE = yes
MOUSEKEY_ENABLE = yes
WPM_ENABLE = yes
TAP_DANCE_ENABLE = yes
+
+TD_LSFT_CAPSLOCK_ENABLE = yes
+STARTUP_NUMLOCK_ON = yes