Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jotix ortho_4x12_layout #6458

Merged
merged 2 commits into from Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 30 additions & 14 deletions layouts/community/ortho_4x12/jotix/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@

enum layers {
_QWERTY,
_FN,
_LOWER,
_RAISE,
_UNI_LCK
_UNICODE
};

#define FN MO(_FN)
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define UNI_LCK MO(_UNI_LCK)
#define UNICODE MO(_UNICODE)
#define TGLOWER TG(_LOWER)
#define TGRAISE TG(_RAISE)
#define SHRAISE LM(_RAISE, MOD_LSFT)

static bool is_ctl_pressed;
static bool is_esc_pressed;
Expand All @@ -29,43 +30,55 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM, KC_DOT, KC_UP ,KC_SLSH,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
KC_LCTL,KC_LGUI,KC_LALT,UNI_LCK, LOWER , KC_SPC, KC_SPC, RAISE ,SHRAISE,KC_LEFT,KC_DOWN,KC_RGHT
KC_LCTL,KC_LGUI,KC_LALT, FN , LOWER , KC_SPC, KC_SPC, RAISE ,UNICODE,KC_LEFT,KC_DOWN,KC_RGHT
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
),

[_FN] = LAYOUT_ortho_4x12 (
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
_______, KC_F1 , KC_F2 , KC_F3 , KC_F4 ,_______,_______,_______,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______, KC_F5 , KC_F6 , KC_F7 , KC_F8 ,_______,_______,_______,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______, KC_F9 , KC_F10, KC_F11, KC_F12,_______,_______,_______,_______,_______,KC_PGUP,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,TGLOWER,_______,_______,TGRAISE,_______,KC_HOME,KC_PGDN, KC_END
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
),

[_LOWER] = LAYOUT_ortho_4x12 (
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
_______, KC_F1 , KC_F2 , KC_F3 , KC_F4 ,_______, KC_INS, KC_P7 , KC_P8 , KC_P9 ,KC_PMNS,_______,
_______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______, KC_F5 , KC_F6 , KC_F7 , KC_F8 ,KC_HOME,KC_PGUP, KC_P4 , KC_P5 , KC_P6 ,KC_PPLS,KC_PENT,
_______,KC_VOLD,KC_MUTE,KC_VOLU,KC_HOME,KC_PGUP,KC_LBRC,KC_RBRC,KC_BSLS,KC_QUOT,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______, KC_F9 , KC_F10, KC_F11, KC_F12, KC_END,KC_PGDN, KC_P1 , KC_P2 , KC_P3 ,KC_PAST,KC_PSLS,
_______,KC_MPRV,KC_MPLY,KC_MNXT, KC_END,KC_PGDN,KC_MINS, KC_EQL,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,_______,_______,_______, KC_P0 ,KC_PDOT,KC_LPRN,KC_RPRN
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
),

[_RAISE] = LAYOUT_ortho_4x12 (
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
KC_GRV, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
KC_CAPS,_______,_______,_______,_______,_______,KC_LBRC,KC_RBRC,KC_BSLS,KC_QUOT,_______,_______,
_______,_______,_______,_______,_______,_______,KC_LBRC,KC_RBRC,KC_BSLS,KC_QUOT,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,_______,KC_MINS, KC_EQL,_______,_______,KC_VOLU,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_VOLD,KC_MUTE
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
),

[_UNI_LCK] = LAYOUT_ortho_4x12 (
[_UNICODE] = LAYOUT_ortho_4x12 (
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
UN_ESC, UN_Q , UN_W , UN_E , UN_R , UN_T , UN_Y , UN_U , UN_I , UN_O , UN_P ,_______,
UN_ESC, UN_Q , UN_W , UN_E , UN_R , UN_T , UN_Y , UN_U , UN_I , UN_O , UN_P ,UN_BSPC,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______, UN_A , UN_S , UN_D , UN_F , UN_G , UN_H , UN_J , UN_K , UN_L ,UN_SCLN,_______,
UN_TAB, UN_A , UN_S , UN_D , UN_F , UN_G , UN_H , UN_J , UN_K , UN_L ,UN_SCLN, UN_ENT,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______, UN_Z , UN_X , UN_C , UN_V , UN_B , UN_N , UN_M ,UN_COMM, UN_DOT, UN_UP ,UN_SLSH,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
UC_M_LN,UC_M_WI,UC_M_OS,_______,TGLOWER,_______,_______,TGRAISE,_______,UN_LEFT,UN_DOWN,UN_RGHT
UC_M_LN,UC_M_WI,UC_M_OS,_______,_______,_______,_______,_______,_______,UN_DOWN, UN_UP ,UN_RGHT
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
),

Expand All @@ -82,7 +95,7 @@ uint32_t layer_state_set_user(uint32_t state) {
writePinLow(JOTANCK_LED1);
writePinHigh(JOTANCK_LED2);
break;
case _UNI_LCK:
case _FN:
writePinHigh(JOTANCK_LED1);
writePinHigh(JOTANCK_LED2);
break;
Expand All @@ -95,11 +108,13 @@ uint32_t layer_state_set_user(uint32_t state) {
return state;
}

/*
void led_set_user(uint8_t usb_led) {
if (!(IS_LED_ON(usb_led, USB_LED_NUM_LOCK))) {
tap_code(KC_NUMLOCK);
}
}
*/

void keyboard_post_init_user(void) {
set_unicode_input_mode(UC_LNX);
Expand All @@ -119,6 +134,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
return true;
}

void matrix_scan_user(void) {
if (is_ctl_pressed && is_esc_pressed && is_bspc_pressed) {
reset_keyboard();
Expand Down
23 changes: 19 additions & 4 deletions layouts/community/ortho_4x12/jotix/unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ enum unicode_names {
TREBOL_SUIT,
HEART_SUIT,
DIAMOND_SUIT,
NARRAY_SUM,
INFINIT_SYMBOL,
DIAMOND_BULLET,
CIRCLE_BULLET,
SMILE_FACE,
SAD_FACE
};

const uint32_t PROGMEM unicode_map[] = {
Expand Down Expand Up @@ -142,10 +148,16 @@ const uint32_t PROGMEM unicode_map[] = {
[DIVISION] = 0x00F7,
[SQUARE_ROOT] = 0x221A,
[CUBE_ROOT] = 0x221B,
[SPADE_SUIT] = 0x2660,
[SPADE_SUIT] = 0x2660,
[TREBOL_SUIT] = 0x2663,
[HEART_SUIT] = 0x2664,
[DIAMOND_SUIT] = 0x2665
[DIAMOND_SUIT] = 0x2665,
[NARRAY_SUM] = 0x2211,
[INFINIT_SYMBOL]= 0x221E,
[DIAMOND_BULLET]= 0x2B25,
[CIRCLE_BULLET] = 0x2981,
[SMILE_FACE] = 0x263A,
[SAD_FACE] = 0x2639
};

#define UN_ESC XP(DEGREE, DEGREE_CELCIUS)
Expand All @@ -159,6 +171,8 @@ const uint32_t PROGMEM unicode_map[] = {
#define UN_I XP(I_ACUTE, I_ACUTEC)
#define UN_O XP(O_ACUTE, O_ACUTEC)
#define UN_P XP(POUND, PILCROW)
#define UN_BSPC XP(BOX_CROSS, DBOX_CROSS)
#define UN_TAB XP(DIAMOND_BULLET, CIRCLE_BULLET)
#define UN_A XP(A_ACUTE, A_ACUTEC)
#define UN_S XP(BOX_CORNER_1, DBOX_CORNER_1)
#define UN_D XP(BOX_CORNER_2, DBOX_CORNER_2)
Expand All @@ -169,8 +183,9 @@ const uint32_t PROGMEM unicode_map[] = {
#define UN_K XP(BOX_UNION_3, DBOX_UNION_3)
#define UN_L XP(BOX_UNION_4, DBOX_UNION_4)
#define UN_SCLN XP(BOX_HORIZONTAL, DBOX_HORIZONT)
#define UN_Z XP(BOX_VERTICAL, DBOX_VERTICAL)
#define UN_X XP(BOX_CROSS, DBOX_CROSS)
#define UN_ENT XP(BOX_VERTICAL, DBOX_VERTICAL)
#define UN_Z XP(NARRAY_SUM, INFINIT_SYMBOL)
#define UN_X XP(SMILE_FACE, SAD_FACE)
#define UN_C XP(COPYRIGHT, REGISTERED)
#define UN_V XP(SPADE_SUIT, TREBOL_SUIT)
#define UN_B XP(HEART_SUIT, DIAMOND_SUIT)
Expand Down