Skip to content

Commit

Permalink
Merge pull request qmk#10 from Salicylic-acid3/nrf52
Browse files Browse the repository at this point in the history
Keymap Update
  • Loading branch information
sekigon-gonnoc authored May 31, 2019
2 parents 1ecc2c1 + 731811a commit 63fe8a0
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 82 deletions.
27 changes: 27 additions & 0 deletions keyboards/naked60_ble/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)

#define TAPPING_TERM 200
#define PREVENT_STUCK_MODIFIERS
#define IGNORE_MOD_TAP_INTERRUPT

#define MK_3_SPEED

#undef MOUSEKEY_INTERVAL
#define MOUSEKEY_INTERVAL 0

#undef MOUSEKEY_TIME_TO_MAX
#define MOUSEKEY_TIME_TO_MAX 150

#undef MOUSEKEY_MAX_SPEED
#define MOUSEKEY_MAX_SPEED 3

#undef MOUSEKEY_MOVE_DELTA
#define MOUSEKEY_MOVE_DELTA 5

#undef MOUSEKEY_DELAY
#define MOUSEKEY_DELAY 0

#undef MOUSEKEY_WHEEL_MAX_SPEED
#define MOUSEKEY_WHEEL_MAX_SPEED 1

#undef MOUSEKEY_WHEEL_TIME_TO_MAX
#define MOUSEKEY_WHEEL_TIME_TO_MAX 0

//#define RGBLIGHT_ANIMATIONS
//#define RGB_DI_PIN 8 // The pin the LED strip is connected to
//#define RGBLED_NUM 5 // Number of LEDs in your strip
Expand Down
37 changes: 33 additions & 4 deletions keyboards/naked60_ble/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ extern uint8_t is_master;

enum layer_number {
_QWERTY = 0,
_FLOCK,
_LOWER,
_RAISE,
_ADJUST,
};

enum custom_keycodes {
QWERTY = SAFE_RANGE,
FLOCK,
LOWER,
RAISE,
ADJUST,
Expand All @@ -71,6 +73,11 @@ enum custom_keycodes {
ENT_SLP, /* Deep sleep mode */
};

enum tapdances{
TD_ESFL = 0,
TD_ESQW,
};

//extern keymap_config_t keymap_config;

// Fillers to make layering more clear
Expand Down Expand Up @@ -117,11 +124,18 @@ enum custom_keycodes {
#define KC_CAD LCA(KC_DEL)
#define KC_APSCR LALT(KC_PSCR)

#define KC_ESFL TD(TD_ESFL)
#define KC_ESQW TD(TD_ESQW)

qk_tap_dance_action_t tap_dance_actions[] = {
[TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK),
[TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY),
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_kc( \
//,-----------------------------------------| |-----------------------------------------.
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\
ESFL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
TAB, Q, W, E, R, T, Y, U, I, O, P, BSLS,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
Expand All @@ -134,9 +148,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),


[_FLOCK] = LAYOUT_kc( \
//,-----------------------------------------| |-----------------------------------------.
ESQW, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, _____,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,\
//|------+------+------+------+------+------|------+------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ \
//`----------------------------------------------------------------------------------'
),


[_LOWER] = LAYOUT_kc( \
//,-----------------------------------------| |-----------------------------------------.
F11, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F12,\
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
TILD, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
Expand All @@ -151,7 +180,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_RAISE] = LAYOUT_kc( \
//,-----------------------------------------| |-----------------------------------------.
F11, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F12,\
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
TILD, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
Expand All @@ -166,7 +195,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_ADJUST] = LAYOUT_kc( /* Base */
//,-----------------------------------------| |-----------------------------------------.
F11, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F12,\
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
_____, BATT, KNRM, KSWP, XXXXX, XXXXX, XXXXX, BTN1, MS_U, BTN2, XXXXX, CAD,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
Expand Down
2 changes: 2 additions & 0 deletions keyboards/naked60_ble/keymaps/default/rule.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

TAP_DANCE_ENABLE = yes
39 changes: 34 additions & 5 deletions keyboards/naked60_ble/keymaps/salicylic/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

enum layer_number {
_QWERTY = 0,
_FLOCK,
_LOWER,
_RAISE,
_ADJUST,
Expand All @@ -26,7 +27,8 @@ enum layer_number {
enum custom_keycodes {
// QWERTY = SAFE_RANGE,
// LOWER,
LOWER = SAFE_RANGE,
FLOCK = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
KANJI,
Expand All @@ -52,6 +54,11 @@ enum custom_keycodes {
ENT_SLP, /* Deep sleep mode */
};

enum tapdances{
TD_ESFL = 0,
TD_ESQW,
};

// Layer Mode aliases
#define KC_MLAD MO(_ADJUST)

Expand Down Expand Up @@ -116,11 +123,18 @@ enum custom_keycodes {
#define KC_CAD LCA(KC_DEL)
#define KC_APSCR LALT(KC_PSCR)

#define KC_ESFL TD(TD_ESFL)
#define KC_ESQW TD(TD_ESQW)

qk_tap_dance_action_t tap_dance_actions[] = {
[TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK),
[TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY),
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_kc( \
//,-----------------------------------------| |-----------------------------------------.
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\
ESFL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
TAB, Q, W, E, R, T, Y, U, I, O, P, JLBRC,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
Expand All @@ -133,9 +147,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),


[_FLOCK] = LAYOUT_kc( \
//,-----------------------------------------| |-----------------------------------------.
ESQW, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,\
//|------+------+------+------+------+------|------+------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ \
//`----------------------------------------------------------------------------------'
),


[_LOWER] = LAYOUT_kc( \
//,-----------------------------------------| |-----------------------------------------.
F11, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F12,\
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
QUOT, EXLM, JQUES, JLBRC, JRBRC, JTILD, P6, P7, P8, P9, JASTR, SLSH,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
Expand All @@ -150,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_RAISE] = LAYOUT_kc( \
//,-----------------------------------------| |-----------------------------------------.
F11, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F12,\
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
ESC, 1, 2, 3, 4, 5, 6, XXXXX, UP, XXXXX, PGUP, BSPC,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
Expand All @@ -165,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_ADJUST] = LAYOUT_kc(
//,-----------------------------------------| |-----------------------------------------.
F11, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F12,\
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
ESC, BATT, KNRM, KSWP, XXXXX, XXXXX, XXXXX, BTN1, MS_U, BTN2, XXXXX, CAD,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
Expand Down
2 changes: 2 additions & 0 deletions keyboards/naked60_ble/keymaps/salicylic/rule.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

TAP_DANCE_ENABLE = yes
73 changes: 0 additions & 73 deletions keyboards/naked60_ble/rev1/rev1.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,76 +69,3 @@
)

#endif /* KEYBOARDS_naked60_BLE_REV1_REV1_H_ */
/*
#define LAYOUT_With_Setta21( \
L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, R30, R32, R34, R35, \
L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \
) \
{ \
{ L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B,KC_NO,KC_NO }, \
{ L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B,KC_NO,KC_NO }, \
{ L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B,KC_NO,KC_NO }, \
{ L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B,KC_NO,KC_NO }, \
{ L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B,KC_NO,KC_NO }, \
{ R00, R01, R02, R03, R04, R05,KC_NO,KC_NO,KC_NO, R11, R12, R13, R14, R15 }, \
{ R20, R21, R22, R23, R24, R25,KC_NO,KC_NO, R30,KC_NO, R32,KC_NO, R34, R35 }, \
{KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \
{KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \
{KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \
}
#define LAYOUT_With_Setta21_kc( \
L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, R30, R32, R34, R35, \
L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \
) \
LAYOUT_With_Setta21( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##L07, KC_##L08, KC_##L09, KC_##L0A, KC_##L0B, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##L17, KC_##L18, KC_##L19, KC_##L1A, KC_##L1B, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##L27, KC_##L28, KC_##L29, KC_##L2A, KC_##L2B, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##L37, KC_##L38, KC_##L39, KC_##L3A, KC_##L3B, KC_##R30, KC_##R32, KC_##R34, KC_##R35, \
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##L47, KC_##L48, KC_##L49, KC_##L4A, KC_##L4B \
)
#define LAYOUT_With_Nafuda( \
L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R01, \
L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R10, R11, R12, \
L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, \
L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, \
L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \
) \
{ \
{ L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B,KC_NO,KC_NO }, \
{ L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B,KC_NO,KC_NO }, \
{ L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B,KC_NO,KC_NO }, \
{ L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B,KC_NO,KC_NO }, \
{ L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B,KC_NO,KC_NO }, \
{KC_NO, R01,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, R10, R11, R12,KC_NO,KC_NO,KC_NO }, \
{ R20, R21, R22,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \
{KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \
{KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \
{KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO } \
}
#define LAYOUT_With_Nafuda_kc( \
L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, L0B, R01, \
L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L1A, L1B, R10, R11, R12, \
L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L2A, L2B, R20, R21, R22, \
L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L3A, L3B, \
L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, L4B \
) \
LAYOUT_With_Nafuda( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##L07, KC_##L08, KC_##L09, KC_##L0A, KC_##L0B, KC_##R01, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##L17, KC_##L18, KC_##L19, KC_##L1A, KC_##L1B, KC_##R10, KC_##R11, KC_##R12, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##L27, KC_##L28, KC_##L29, KC_##L2A, KC_##L2B, KC_##R20, KC_##R21, KC_##R22, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##L37, KC_##L38, KC_##L39, KC_##L3A, KC_##L3B, \
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##L47, KC_##L48, KC_##L49, KC_##L4A, KC_##L4B \
)
*/
1 change: 1 addition & 0 deletions keyboards/naked60_ble/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = no # USB Nkey Rollover
CUSTOM_MATRIX = yes # This flag should be on for nrf52
TAP_DANCE_ENABLE = yes

## chip/board settings
MCU_FAMILY = NRF52
Expand Down

0 comments on commit 63fe8a0

Please sign in to comment.