Added kbd75 layout with working emoji, no capslock LED

This commit is contained in:
Paul Warren 2020-06-19 23:18:57 +10:00
parent d272300fce
commit 360a75aa3a
4 changed files with 240 additions and 0 deletions

102
kbd75/pwarren/keymap.c Normal file
View file

@ -0,0 +1,102 @@
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WINC
#include QMK_KEYBOARD_H
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX);
// startup purple single colour mode
rgblight_setrgb(RGB_PURPLE);
}
enum unicode_names {
BANG,
IRONY,
SNEK,
POOP,
CHEESY,
KISS,
THUU,
THUD,
FROWN,
SMILE,
COFFEE,
WINK,
GRIM,
};
enum custom_keycode {
TFLIP,
FPALM,
};
const uint32_t PROGMEM unicode_map[] = {
[BANG] = 0x203D, // ‽
[IRONY] = 0x2E2E, // ⸮
[SNEK] = 0x1F40D, // 🐍
[POOP] = 0x1F4A9,
[CHEESY]= 0x1F600,
[KISS] = 0x1F618,
[THUU] = 0x1F44D,
[THUD] = 0x1F44E,
[FROWN] = 0x1f641,
[SMILE] = 0x1f642,
[COFFEE] = 0x2615,
[WINK] = 0x1F609,
[GRIM] = 0x1F62C,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_PSCR, MO(2), KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
RESET, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_SLCK, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______,
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,
_______, RGB_MODE_PLAIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_BTN2,
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_U, KC_MS_BTN3,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
),
[2] = LAYOUT(
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, FPALM, TFLIP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______,
_______, _______, _______, _______, _______, X(THUU), _______, _______, _______, _______, X(POOP), _______, _______, _______, _______,
_______, _______, X(SNEK), _______, _______, X(THUD), X(WINK), X(GRIM), X(KISS), X(CHEESY), X(FROWN), X(SMILE), _______, _______,
_______, _______, _______, _______, X(COFFEE), _______, _______,_______, _______, UC_MOD, UC_RMOD, X(BANG), _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
case TFLIP:
if(record->event.pressed) {
send_unicode_hex_string("0028 256F 00B0 25A1 00B0 0029 256F 0020 FE35 0020 253B 2501 253B");
}
return false;
break;
case FPALM:
if(record->event.pressed) {
send_unicode_hex_string("1F926 200D 2640 FE0F 000A");
}
return false;
break;
}
}
return true;
}

View file

@ -0,0 +1,41 @@
#include QMK_KEYBOARD_H
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _FL 3
#define _CL 4
enum planck_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK
};
// Custom macros
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt)
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_PSCR, MO(1), KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______,
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};

95
kbd75/pwarren/keymap.c~ Normal file
View file

@ -0,0 +1,95 @@
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WINC
#include QMK_KEYBOARD_H
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX);
// startup purple single colour mode
rgblight_setrgb(RGB_PURPLE);
}
enum unicode_names {
BANG,
IRONY,
SNEK,
POOP,
CHEESY,
KISS,
THUU,
THUD,
FROWN,
SMILE,
};
enum custom_keycode {
TFLIP,
FPALM,
};
const uint32_t PROGMEM unicode_map[] = {
[BANG] = 0x203D, // ‽
[IRONY] = 0x2E2E, // ⸮
[SNEK] = 0x1F40D, // 🐍
[POOP] = 0x1F4A9,
[CHEESY]= 0x1F600,
[KISS] = 0x1F619,
[THUU] = 0x1F44D,
[THUD] = 0x1F44E,
[FROWN] = 0x2639,
[SMILE] = 0x263a
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_PSCR, MO(2), KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
RESET, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_SLCK, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______,
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,
_______, RGB_MODE_PLAIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_BTN2,
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_U, KC_MS_BTN3,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
),
[2] = LAYOUT(
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, FPALM, TFLIP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______,
_______, _______, _______, _______, _______, X(THUU), _______, _______, _______, _______, X(POOP), _______, _______, _______, _______,
_______, _______, X(SNEK), _______, _______, X(THUD), _______, _______, X(KISS), X(CHEESY), X(FROWN), X(SMILE), _______, _______,
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, UC_MOD, UC_RMOD, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
case TFLIP:
if(record->event.pressed) {
send_unicode_hex_string("0028 256F 00B0 25A1 00B0 0029 256F 0020 FE35 0020 253B 2501 253B");
}
return false;
break;
case FPALM:
if(record->event.pressed) {
send_unicode_hex_string("1F926 200D 2640 FE0F 000A");
}
return false;
break;
}
}
return true;
}

2
kbd75/pwarren/rules.mk Normal file
View file

@ -0,0 +1,2 @@
UNICODEMAP_ENABLE=yes