From 3752ed7b6eaf9838036c2e6d1486d683be973e05 Mon Sep 17 00:00:00 2001 From: Frederik Baerentsen Date: Wed, 27 May 2020 17:11:25 +0200 Subject: [PATCH] added unicode test --- keyboards/kyria/keymaps/frederik/keymap.c | 14 ++++++------ keyboards/kyria/keymaps/frederik/rules.mk | 1 + users/frederik/frederik.h | 28 +++++++++++------------ 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/keyboards/kyria/keymaps/frederik/keymap.c b/keyboards/kyria/keymaps/frederik/keymap.c index f05de1f9..c723e2ed 100644 --- a/keyboards/kyria/keymaps/frederik/keymap.c +++ b/keyboards/kyria/keymaps/frederik/keymap.c @@ -75,17 +75,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| |------+------+------+------+------+--------| * | | # | $ | [ | ] | ` | | + | - | / | * | % | ' " | * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | % | ^ | { | } | ~ | | | | | | & | = | , | . | / ? | - _ | + * | | % | ^ | { | } | ~ | | | | æ | ø | & | = | , | . | / ? | - _ | * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' * | | | | | | | | | | | | - * | | | Lower| | | | | Nav | Raise| | | + * | | | Lower| | | | å | Nav | Raise| | | * `----------------------------------' `----------------------------------' */ [_RAISE] = LAYOUT( _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_UNDS, ALGR(KC_5),_______,KC_BSLS,_______, _______, KC_HASH, KC_DLR, KC_LBRC, KC_RBRC, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, - _______, KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, u_ae , u_oe , KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + _______, _______, _______, _______, _______, u_aa , _______, _______, _______, _______ ), /* * Navigation Layer @@ -111,11 +111,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Adjust Layer * * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | RGB | F7 | F8 | F9 | F10 | | + * | | | | | | | | RGB | F7 | F8 | F9 | F10 | æ | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | SAI | HUI | VAI | | | | F4 | F5 | F6 | F11 | | + * | | | SAI | HUI | VAI | | | | F4 | F5 | F6 | F11 | ø | * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | SAD | HUD | VAD | | | | | | | | F1 | F2 | F3 | F12 | | + * | | | SAD | HUD | VAD | | | | | | | | F1 | F2 | F3 | F12 | å | * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' * | | | | | | | | | | | | * | | | | | | | | | | | | diff --git a/keyboards/kyria/keymaps/frederik/rules.mk b/keyboards/kyria/keymaps/frederik/rules.mk index 0ff27f5f..c5b94e92 100644 --- a/keyboards/kyria/keymaps/frederik/rules.mk +++ b/keyboards/kyria/keymaps/frederik/rules.mk @@ -7,3 +7,4 @@ LEADER_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control +UNICODEMAP_ENABLE = yes \ No newline at end of file diff --git a/users/frederik/frederik.h b/users/frederik/frederik.h index a188340f..07a00ea3 100644 --- a/users/frederik/frederik.h +++ b/users/frederik/frederik.h @@ -22,9 +22,22 @@ enum custom_keycodes { AE, oe, aa, - ae + ae, }; +enum unicode_names { + u_ae, + u_oe, + u_aa +}; + +const uint32_t PROGMEM unicode_map[] = { + [u_ae] = 0x00E6, + [u_oe] = 0x00F8, + [u_aa] = 0x00E5, +}; + + bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record); void keyboard_post_init_rgb_light(void); void matrix_scan_rgb_light(void); @@ -32,17 +45,4 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state); layer_state_t default_layer_state_set_rgb_light(layer_state_t state); void rgblight_sethsv_default_helper(uint8_t index); -// clang-format off -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - bool is_overwatch :1; - bool nuke_switch :1; - bool swapped_numbers :1; - bool rgb_matrix_idle_anim :1; - }; -} userspace_config_t; -// clang-format on -extern userspace_config_t userspace_config; \ No newline at end of file