diff options
Diffstat (limited to 'quantum')
170 files changed, 6107 insertions, 5742 deletions
diff --git a/quantum/action.c b/quantum/action.c index abf9834d2f..72f132eaa8 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -16,12 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <limits.h> -#ifdef DEBUG_ACTION -# include "debug.h" -#else -# include "nodebug.h" -#endif - #include "host.h" #include "keycode.h" #include "keyboard.h" @@ -55,8 +49,8 @@ int retro_tapping_counter = 0; # include "process_auto_shift.h" #endif -#ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY -__attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { +#ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY +__attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { return false; } #endif @@ -76,11 +70,11 @@ __attribute__((weak)) bool pre_process_record_quantum(keyrecord_t *record) { * FIXME: Needs documentation. */ void action_exec(keyevent_t event) { - if (!IS_NOEVENT(event)) { - dprint("\n---- action_exec: start -----\n"); - dprint("EVENT: "); + if (IS_EVENT(event)) { + ac_dprintf("\n---- action_exec: start -----\n"); + ac_dprintf("EVENT: "); debug_event(event); - dprintln(); + ac_dprintf("\n"); #if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) retro_tapping_counter++; #endif @@ -93,7 +87,7 @@ void action_exec(keyevent_t event) { #ifdef SWAP_HANDS_ENABLE // Swap hands handles both keys and encoders, if ENCODER_MAP_ENABLE is defined. - if (!IS_NOEVENT(event)) { + if (IS_EVENT(event)) { process_hand_swap(&event); } #endif @@ -131,8 +125,8 @@ void action_exec(keyevent_t event) { if (IS_NOEVENT(record.event) || pre_process_record_quantum(&record)) { process_record(&record); } - if (!IS_NOEVENT(record.event)) { - dprint("processed: "); + if (IS_EVENT(record.event)) { + ac_dprintf("processed: "); debug_record(record); dprintln(); } @@ -280,15 +274,15 @@ void process_record_handler(keyrecord_t *record) { #else action_t action = store_or_get_action(record->event.pressed, record->event.key); #endif - dprint("ACTION: "); + ac_dprintf("ACTION: "); debug_action(action); #ifndef NO_ACTION_LAYER - dprint(" layer_state: "); + ac_dprintf(" layer_state: "); layer_debug(); - dprint(" default_layer_state: "); + ac_dprintf(" default_layer_state: "); default_layer_debug(); #endif - dprintln(); + ac_dprintf("\n"); process_action(record, action); } @@ -356,7 +350,12 @@ void process_action(keyrecord_t *record, action_t action) { #ifndef NO_ACTION_ONESHOT bool do_release_oneshot = false; // notice we only clear the one shot layer if the pressed key is not a modifier. - if (is_oneshot_layer_active() && event.pressed && (action.kind.id == ACT_USAGE || !IS_MOD(action.key.code)) + if (is_oneshot_layer_active() && event.pressed && + (action.kind.id == ACT_USAGE || !(IS_MODIFIER_KEYCODE(action.key.code) +# ifndef NO_ACTION_TAPPING + || (tap_count == 0 && (action.kind.id == ACT_LMODS_TAP || action.kind.id == ACT_RMODS_TAP)) +# endif + )) # ifdef SWAP_HANDS_ENABLE && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT) # endif @@ -373,7 +372,7 @@ void process_action(keyrecord_t *record, action_t action) { uint8_t mods = (action.kind.id == ACT_LMODS) ? action.key.mods : action.key.mods << 4; if (event.pressed) { if (mods) { - if (IS_MOD(action.key.code) || action.key.code == KC_NO) { + if (IS_MODIFIER_KEYCODE(action.key.code) || action.key.code == KC_NO) { // e.g. LSFT(KC_LEFT_GUI): we don't want the LSFT to be weak as it would make it useless. // This also makes LSFT(KC_LEFT_GUI) behave exactly the same as LGUI(KC_LEFT_SHIFT). // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). @@ -387,7 +386,7 @@ void process_action(keyrecord_t *record, action_t action) { } else { unregister_code(action.key.code); if (mods) { - if (IS_MOD(action.key.code) || action.key.code == KC_NO) { + if (IS_MODIFIER_KEYCODE(action.key.code) || action.key.code == KC_NO) { del_mods(mods); } else { del_weak_mods(mods); @@ -407,7 +406,7 @@ void process_action(keyrecord_t *record, action_t action) { if (!keymap_config.oneshot_enable) { if (event.pressed) { if (mods) { - if (IS_MOD(action.key.code) || action.key.code == KC_NO) { + if (IS_MODIFIER_KEYCODE(action.key.code) || action.key.code == KC_NO) { // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT). // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). @@ -421,7 +420,7 @@ void process_action(keyrecord_t *record, action_t action) { } else { unregister_code(action.key.code); if (mods) { - if (IS_MOD(action.key.code) || action.key.code == KC_NO) { + if (IS_MODIFIER_KEYCODE(action.key.code) || action.key.code == KC_NO) { del_mods(mods); } else { del_weak_mods(mods); @@ -432,14 +431,14 @@ void process_action(keyrecord_t *record, action_t action) { } else { if (event.pressed) { if (tap_count == 0) { - dprint("MODS_TAP: Oneshot: 0\n"); + ac_dprintf("MODS_TAP: Oneshot: 0\n"); register_mods(mods | get_oneshot_mods()); } else if (tap_count == 1) { - dprint("MODS_TAP: Oneshot: start\n"); + ac_dprintf("MODS_TAP: Oneshot: start\n"); set_oneshot_mods(mods | get_oneshot_mods()); # if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 } else if (tap_count == ONESHOT_TAP_TOGGLE) { - dprint("MODS_TAP: Toggling oneshot"); + ac_dprintf("MODS_TAP: Toggling oneshot"); register_mods(mods); clear_oneshot_mods(); set_oneshot_locked_mods(mods | get_oneshot_locked_mods()); @@ -484,29 +483,29 @@ void process_action(keyrecord_t *record, action_t action) { default: if (event.pressed) { if (tap_count > 0) { -# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) +# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) if ( -# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY - !get_ignore_mod_tap_interrupt(get_event_keycode(record->event, false), record) && +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY + get_hold_on_other_key_press(get_event_keycode(record->event, false), record) && # endif record->tap.interrupted) { - dprint("mods_tap: tap: cancel: add_mods\n"); + ac_dprintf("mods_tap: tap: cancel: add_mods\n"); // ad hoc: set 0 to cancel tap record->tap.count = 0; register_mods(mods); } else # endif { - dprint("MODS_TAP: Tap: register_code\n"); + ac_dprintf("MODS_TAP: Tap: register_code\n"); register_code(action.key.code); } } else { - dprint("MODS_TAP: No tap: add_mods\n"); + ac_dprintf("MODS_TAP: No tap: add_mods\n"); register_mods(mods); } } else { if (tap_count > 0) { - dprint("MODS_TAP: Tap: unregister_code\n"); + ac_dprintf("MODS_TAP: Tap: unregister_code\n"); if (action.layer_tap.code == KC_CAPS_LOCK) { wait_ms(TAP_HOLD_CAPS_DELAY); } else { @@ -514,7 +513,7 @@ void process_action(keyrecord_t *record, action_t action) { } unregister_code(action.key.code); } else { - dprint("MODS_TAP: No tap: add_mods\n"); + ac_dprintf("MODS_TAP: No tap: add_mods\n"); unregister_mods(mods); } } @@ -666,15 +665,15 @@ void process_action(keyrecord_t *record, action_t action) { /* tap key */ if (event.pressed) { if (tap_count > 0) { - dprint("KEYMAP_TAP_KEY: Tap: register_code\n"); + ac_dprintf("KEYMAP_TAP_KEY: Tap: register_code\n"); register_code(action.layer_tap.code); } else { - dprint("KEYMAP_TAP_KEY: No tap: On on press\n"); + ac_dprintf("KEYMAP_TAP_KEY: No tap: On on press\n"); layer_on(action.layer_tap.val); } } else { if (tap_count > 0) { - dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); + ac_dprintf("KEYMAP_TAP_KEY: Tap: unregister_code\n"); if (action.layer_tap.code == KC_CAPS_LOCK) { wait_ms(TAP_HOLD_CAPS_DELAY); } else { @@ -682,7 +681,7 @@ void process_action(keyrecord_t *record, action_t action) { } unregister_code(action.layer_tap.code); } else { - dprint("KEYMAP_TAP_KEY: No tap: Off on release\n"); + ac_dprintf("KEYMAP_TAP_KEY: No tap: Off on release\n"); layer_off(action.layer_tap.val); } } @@ -878,37 +877,20 @@ __attribute__((weak)) void register_code(uint8_t code) { send_keyboard_report(); #endif - } else if IS_KEY (code) { + } else if IS_BASIC_KEYCODE (code) { // TODO: should push command_proc out of this block? if (command_proc(code)) return; -#ifndef NO_ACTION_ONESHOT -/* TODO: remove - if (oneshot_state.mods && !oneshot_state.disabled) { - uint8_t tmp_mods = get_mods(); - add_mods(oneshot_state.mods); - - add_key(code); - send_keyboard_report(); - - set_mods(tmp_mods); - send_keyboard_report(); - oneshot_cancel(); - } else -*/ -#endif - { - // Force a new key press if the key is already pressed - // without this, keys with the same keycode, but different - // modifiers will be reported incorrectly, see issue #1708 - if (is_key_pressed(keyboard_report, code)) { - del_key(code); - send_keyboard_report(); - } - add_key(code); + // Force a new key press if the key is already pressed + // without this, keys with the same keycode, but different + // modifiers will be reported incorrectly, see issue #1708 + if (is_key_pressed(keyboard_report, code)) { + del_key(code); send_keyboard_report(); } - } else if IS_MOD (code) { + add_key(code); + send_keyboard_report(); + } else if IS_MODIFIER_KEYCODE (code) { add_mods(MOD_BIT(code)); send_keyboard_report(); @@ -962,10 +944,10 @@ __attribute__((weak)) void unregister_code(uint8_t code) { send_keyboard_report(); #endif - } else if IS_KEY (code) { + } else if IS_BASIC_KEYCODE (code) { del_key(code); send_keyboard_report(); - } else if IS_MOD (code) { + } else if IS_MODIFIER_KEYCODE (code) { del_mods(MOD_BIT(code)); send_keyboard_report(); @@ -1068,7 +1050,7 @@ void clear_keyboard_but_mods(void) { * * FIXME: Needs documentation. */ -void clear_keyboard_but_mods_and_keys() { +void clear_keyboard_but_mods_and_keys(void) { #ifdef EXTRAKEY_ENABLE host_system_send(0); host_consumer_send(0); @@ -1139,7 +1121,7 @@ bool is_tap_action(action_t action) { * FIXME: Needs documentation. */ void debug_event(keyevent_t event) { - dprintf("%04X%c(%u)", (event.key.row << 8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); + ac_dprintf("%04X%c(%u)", (event.key.row << 8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); } /** \brief Debug print (FIXME: Needs better description) * @@ -1148,7 +1130,7 @@ void debug_event(keyevent_t event) { void debug_record(keyrecord_t record) { debug_event(record.event); #ifndef NO_ACTION_TAPPING - dprintf(":%u%c", record.tap.count, (record.tap.interrupted ? '-' : ' ')); + ac_dprintf(":%u%c", record.tap.count, (record.tap.interrupted ? '-' : ' ')); #endif } @@ -1159,41 +1141,41 @@ void debug_record(keyrecord_t record) { void debug_action(action_t action) { switch (action.kind.id) { case ACT_LMODS: - dprint("ACT_LMODS"); + ac_dprintf("ACT_LMODS"); break; case ACT_RMODS: - dprint("ACT_RMODS"); + ac_dprintf("ACT_RMODS"); break; case ACT_LMODS_TAP: - dprint("ACT_LMODS_TAP"); + ac_dprintf("ACT_LMODS_TAP"); break; case ACT_RMODS_TAP: - dprint("ACT_RMODS_TAP"); + ac_dprintf("ACT_RMODS_TAP"); break; case ACT_USAGE: - dprint("ACT_USAGE"); + ac_dprintf("ACT_USAGE"); break; case ACT_MOUSEKEY: - dprint("ACT_MOUSEKEY"); + ac_dprintf("ACT_MOUSEKEY"); break; case ACT_LAYER: - dprint("ACT_LAYER"); + ac_dprintf("ACT_LAYER"); break; case ACT_LAYER_MODS: - dprint("ACT_LAYER_MODS"); + ac_dprintf("ACT_LAYER_MODS"); break; case ACT_LAYER_TAP: - dprint("ACT_LAYER_TAP"); + ac_dprintf("ACT_LAYER_TAP"); break; case ACT_LAYER_TAP_EXT: - dprint("ACT_LAYER_TAP_EXT"); + ac_dprintf("ACT_LAYER_TAP_EXT"); break; case ACT_SWAP_HANDS: - dprint("ACT_SWAP_HANDS"); + ac_dprintf("ACT_SWAP_HANDS"); break; default: - dprint("UNKNOWN"); + ac_dprintf("UNKNOWN"); break; } - dprintf("[%X:%02X]", action.kind.param >> 8, action.kind.param & 0xff); + ac_dprintf("[%X:%02X]", action.kind.param >> 8, action.kind.param & 0xff); } diff --git a/quantum/action.h b/quantum/action.h index 2bc46429b2..e4d28ba947 100644 --- a/quantum/action.h +++ b/quantum/action.h @@ -112,7 +112,19 @@ bool is_tap_action(action_t action); void process_record_tap_hint(keyrecord_t *record); #endif -/* debug */ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Helpers + +#ifdef ACTION_DEBUG +# include "debug.h" +# include "print.h" +# define ac_dprintf(...) dprintf(__VA_ARGS__) +#else +# define ac_dprintf(...) \ + do { \ + } while (0) +#endif + void debug_event(keyevent_t event); void debug_record(keyrecord_t record); void debug_action(action_t action); diff --git a/quantum/action_layer.c b/quantum/action_layer.c index 31cfdfe13a..789a7fddeb 100644 --- a/quantum/action_layer.c +++ b/quantum/action_layer.c @@ -1,12 +1,6 @@ #include <limits.h> #include <stdint.h> -#ifdef DEBUG_ACTION -# include "debug.h" -#else -# include "nodebug.h" -#endif - #include "keyboard.h" #include "keymap.h" #include "action.h" @@ -39,12 +33,12 @@ __attribute__((weak)) layer_state_t default_layer_state_set_kb(layer_state_t sta */ static void default_layer_state_set(layer_state_t state) { state = default_layer_state_set_kb(state); - debug("default_layer_state: "); + ac_dprintf("default_layer_state: "); default_layer_debug(); - debug(" to "); + ac_dprintf(" to "); default_layer_state = state; default_layer_debug(); - debug("\n"); + ac_dprintf("\n"); #if defined(STRICT_LAYER_RELEASE) clear_keyboard_but_mods(); // To avoid stuck keys #elif defined(SEMI_STRICT_LAYER_RELEASE) @@ -57,7 +51,7 @@ static void default_layer_state_set(layer_state_t state) { * Print out the hex value of the 32-bit default layer state, as well as the value of the highest bit. */ void default_layer_debug(void) { - dprintf("%08lX(%u)", default_layer_state, get_highest_layer(default_layer_state)); + ac_dprintf("%08hX(%u)", default_layer_state, get_highest_layer(default_layer_state)); } /** \brief Default Layer Set @@ -119,12 +113,12 @@ __attribute__((weak)) layer_state_t layer_state_set_kb(layer_state_t state) { */ void layer_state_set(layer_state_t state) { state = layer_state_set_kb(state); - dprint("layer_state: "); + ac_dprintf("layer_state: "); layer_debug(); - dprint(" to "); + ac_dprintf(" to "); layer_state = state; layer_debug(); - dprintln(); + ac_dprintf("\n"); # if defined(STRICT_LAYER_RELEASE) clear_keyboard_but_mods(); // To avoid stuck keys # elif defined(SEMI_STRICT_LAYER_RELEASE) @@ -218,7 +212,7 @@ void layer_xor(layer_state_t state) { * Print out the hex value of the 32-bit layer state, as well as the value of the highest bit. */ void layer_debug(void) { - dprintf("%08lX(%u)", layer_state, get_highest_layer(layer_state)); + ac_dprintf("%08hX(%u)", layer_state, get_highest_layer(layer_state)); } #endif @@ -355,3 +349,15 @@ uint8_t layer_switch_get_layer(keypos_t key) { action_t layer_switch_get_action(keypos_t key) { return action_for_key(layer_switch_get_layer(key), key); } + +#ifndef NO_ACTION_LAYER +layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + layer_state_t mask12 = ((layer_state_t)1 << layer1) | ((layer_state_t)1 << layer2); + layer_state_t mask3 = (layer_state_t)1 << layer3; + return (state & mask12) == mask12 ? (state | mask3) : (state & ~mask3); +} + +void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + layer_state_set(update_tri_layer_state(layer_state, layer1, layer2, layer3)); +} +#endif diff --git a/quantum/action_layer.h b/quantum/action_layer.h index bd1085a70f..ff783bb3e7 100644 --- a/quantum/action_layer.h +++ b/quantum/action_layer.h @@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # ifndef DYNAMIC_KEYMAP_LAYER_COUNT # define DYNAMIC_KEYMAP_LAYER_COUNT 4 # endif +# define MAX_LAYER DYNAMIC_KEYMAP_LAYER_COUNT # if DYNAMIC_KEYMAP_LAYER_COUNT <= 8 # ifndef LAYER_STATE_8BIT # define LAYER_STATE_8BIT @@ -112,6 +113,25 @@ void layer_and(layer_state_t state); void layer_xor(layer_state_t state); layer_state_t layer_state_set_user(layer_state_t state); layer_state_t layer_state_set_kb(layer_state_t state); + +/** + * @brief Applies the tri layer to global layer state. Not be used in layer_state_set_(kb|user) functions. + * + * @param layer1 First layer to check for tri layer + * @param layer2 Second layer to check for tri layer + * @param layer3 Layer to activate if both other layers are enabled + */ +void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); +/** + * @brief Applies the tri layer behavior to supplied layer bitmask, without using layer functions. + * + * @param state Original layer bitmask to check and modify + * @param layer1 First layer to check for tri layer + * @param layer2 Second layer to check for tri layer + * @param layer3 Layer to activate if both other layers are enabled + * @return layer_state_t returns a modified layer bitmask with tri layer modifications applied + */ +layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3); #else # define layer_state 0 @@ -130,6 +150,8 @@ layer_state_t layer_state_set_kb(layer_state_t state); # define layer_xor(state) (void)state # define layer_state_set_kb(state) (void)state # define layer_state_set_user(state) (void)state +# define update_tri_layer(layer1, layer2, layer3) +# define update_tri_layer_state(state, layer1, layer2, layer3) (void)state #endif /* pressed actions cache */ diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index df3317ac05..60c7ed4973 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -1,12 +1,6 @@ #include <stdint.h> #include <stdbool.h> -#ifdef DEBUG_ACTION -# include "debug.h" -#else -# include "nodebug.h" -#endif - #include "action.h" #include "action_layer.h" #include "action_tapping.h" @@ -15,7 +9,15 @@ #ifndef NO_ACTION_TAPPING -# define IS_TAPPING() !IS_NOEVENT(tapping_key.event) +# if defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) +# error "IGNORE_MOD_TAP_INTERRUPT_PER_KEY has been removed; the code needs to be ported to use HOLD_ON_OTHER_KEY_PRESS_PER_KEY instead." +# elif !defined(IGNORE_MOD_TAP_INTERRUPT) +# if !defined(PERMISSIVE_HOLD) && !defined(PERMISSIVE_HOLD_PER_KEY) && !defined(HOLD_ON_OTHER_KEY_PRESS) && !defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# pragma message "The default behavior of mod-taps will change to mimic IGNORE_MOD_TAP_INTERRUPT in the future.\nIf you wish to keep the old default behavior of mod-taps, please use HOLD_ON_OTHER_KEY_PRESS." +# endif +# endif + +# define IS_TAPPING() IS_EVENT(tapping_key.event) # define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed) # define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) # define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k))) @@ -25,6 +27,7 @@ # define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key)) && tapping_key.keycode == r->keycode) # endif # define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < GET_TAPPING_TERM(get_record_keycode(&tapping_key, false), &tapping_key)) +# define WITHIN_QUICK_TAP_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < GET_QUICK_TAP_TERM(get_record_keycode(&tapping_key, false), &tapping_key)) # ifdef DYNAMIC_TAPPING_TERM_ENABLE uint16_t g_tapping_term = TAPPING_TERM; @@ -40,9 +43,9 @@ __attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *r } # endif -# ifdef TAPPING_FORCE_HOLD_PER_KEY -__attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { - return false; +# ifdef QUICK_TAP_TERM_PER_KEY +__attribute__((weak)) uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) { + return QUICK_TAP_TERM; } # endif @@ -82,15 +85,15 @@ static void debug_waiting_buffer(void); */ void action_tapping_process(keyrecord_t record) { if (process_tapping(&record)) { - if (!IS_NOEVENT(record.event)) { - debug("processed: "); + if (IS_EVENT(record.event)) { + ac_dprintf("processed: "); debug_record(record); - debug("\n"); + ac_dprintf("\n"); } } else { if (!waiting_buffer_enq(record)) { // clear all in case of overflow. - debug("OVERFLOW: CLEAR ALL STATES\n"); + ac_dprintf("OVERFLOW: CLEAR ALL STATES\n"); clear_keyboard(); waiting_buffer_clear(); tapping_key = (keyrecord_t){}; @@ -98,25 +101,73 @@ void action_tapping_process(keyrecord_t record) { } // process waiting_buffer - if (!IS_NOEVENT(record.event) && waiting_buffer_head != waiting_buffer_tail) { - debug("---- action_exec: process waiting_buffer -----\n"); + if (IS_EVENT(record.event) && waiting_buffer_head != waiting_buffer_tail) { + ac_dprintf("---- action_exec: process waiting_buffer -----\n"); } for (; waiting_buffer_tail != waiting_buffer_head; waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE) { if (process_tapping(&waiting_buffer[waiting_buffer_tail])) { - debug("processed: waiting_buffer["); - debug_dec(waiting_buffer_tail); - debug("] = "); + ac_dprintf("processed: waiting_buffer[%u] =", waiting_buffer_tail); debug_record(waiting_buffer[waiting_buffer_tail]); - debug("\n\n"); + ac_dprintf("\n\n"); } else { break; } } - if (!IS_NOEVENT(record.event)) { - debug("\n"); + if (IS_EVENT(record.event)) { + ac_dprintf("\n"); } } +/* Some conditionally defined helper macros to keep process_tapping more + * readable. The conditional definition of tapping_keycode and all the + * conditional uses of it are hidden inside macros named TAP_... + */ +# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(QUICK_TAP_TERM_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# define TAP_DEFINE_KEYCODE uint16_t tapping_keycode = get_record_keycode(&tapping_key, false) +# else +# define TAP_DEFINE_KEYCODE +# endif + +# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) +# ifdef RETRO_TAPPING_PER_KEY +# define TAP_GET_RETRO_TAPPING get_retro_tapping(tapping_keycode, &tapping_key) +# else +# define TAP_GET_RETRO_TAPPING true +# endif +# define MAYBE_RETRO_SHIFTING(ev) (TAP_GET_RETRO_TAPPING && (RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16((ev).time, tapping_key.event.time) < (RETRO_SHIFT + 0)) +# define TAP_IS_LT IS_QK_LAYER_TAP(tapping_keycode) +# define TAP_IS_MT IS_QK_MOD_TAP(tapping_keycode) +# define TAP_IS_RETRO IS_RETRO(tapping_keycode) +# else +# define TAP_GET_RETRO_TAPPING false +# define MAYBE_RETRO_SHIFTING(ev) false +# define TAP_IS_LT false +# define TAP_IS_MT false +# define TAP_IS_RETRO false +# endif + +# ifdef PERMISSIVE_HOLD_PER_KEY +# define TAP_GET_PERMISSIVE_HOLD get_permissive_hold(tapping_keycode, &tapping_key) +# elif defined(PERMISSIVE_HOLD) +# define TAP_GET_PERMISSIVE_HOLD true +# else +# define TAP_GET_PERMISSIVE_HOLD false +# endif + +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY +# define TAP_GET_HOLD_ON_OTHER_KEY_PRESS get_hold_on_other_key_press(tapping_keycode, &tapping_key) +# elif defined(HOLD_ON_OTHER_KEY_PRESS) +# define TAP_GET_HOLD_ON_OTHER_KEY_PRESS true +# else +# define TAP_GET_HOLD_ON_OTHER_KEY_PRESS false +# endif + +# if defined(IGNORE_MOD_TAP_INTERRUPT) +# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT true +# else +# define TAP_GET_IGNORE_MOD_TAP_INTERRUPT false +# endif + /** \brief Tapping * * Rule: Tap key is typed(pressed and released) within TAPPING_TERM. @@ -125,31 +176,18 @@ void action_tapping_process(keyrecord_t record) { /* return true when key event is processed or consumed. */ bool process_tapping(keyrecord_t *keyp) { keyevent_t event = keyp->event; -# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(TAPPING_FORCE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) - uint16_t tapping_keycode = get_record_keycode(&tapping_key, false); -# endif + TAP_DEFINE_KEYCODE; // if tapping if (IS_TAPPING_PRESSED()) { - // clang-format off - if (WITHIN_TAPPING_TERM(event) -# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) - || ( -# ifdef RETRO_TAPPING_PER_KEY - get_retro_tapping(tapping_keycode, &tapping_key) && -# endif - (RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16(event.time, tapping_key.event.time) < (RETRO_SHIFT + 0) - ) -# endif - ) { - // clang-format on + if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event)) { if (tapping_key.tap.count == 0) { if (IS_TAPPING_RECORD(keyp) && !event.pressed) { # if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) retroshift_swap_times(); # endif // first tap! - debug("Tapping: First tap(0->1).\n"); + ac_dprintf("Tapping: First tap(0->1).\n"); tapping_key.tap.count = 1; debug_tapping_key(); process_record(&tapping_key); @@ -164,107 +202,85 @@ bool process_tapping(keyrecord_t *keyp) { * useful for long TAPPING_TERM but may prevent fast typing. */ // clang-format off -# if defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) else if ( ( - IS_RELEASED(event) && waiting_buffer_typed(event) -# ifdef PERMISSIVE_HOLD_PER_KEY - && get_permissive_hold(tapping_keycode, &tapping_key) -# elif defined(PERMISSIVE_HOLD) - && true -# endif + IS_RELEASED(event) && waiting_buffer_typed(event) && + TAP_GET_PERMISSIVE_HOLD ) // Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT // unnecessarily and fixes them for Layer Taps. -# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) - || ( -# ifdef RETRO_TAPPING_PER_KEY - get_retro_tapping(tapping_keycode, &tapping_key) && -# endif + || (TAP_GET_RETRO_TAPPING && ( // Rolled over the two keys. - ( - ( - false -# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) - || ( - IS_LT(tapping_keycode) -# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY - && get_hold_on_other_key_press(tapping_keycode, &tapping_key) -# endif - ) -# endif -# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) - || ( - IS_MT(tapping_keycode) -# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY - && !get_ignore_mod_tap_interrupt(tapping_keycode, &tapping_key) -# endif - ) -# endif - ) && tapping_key.tap.interrupted == true + (tapping_key.tap.interrupted == true && ( + (TAP_IS_LT && TAP_GET_HOLD_ON_OTHER_KEY_PRESS) || + (TAP_IS_MT && TAP_GET_HOLD_ON_OTHER_KEY_PRESS) + ) ) // Makes Retro Shift ignore [IGNORE_MOD_TAP_INTERRUPT's // effects on nested taps for MTs and the default // behavior of LTs] below TAPPING_TERM or RETRO_SHIFT. || ( - IS_RETRO(tapping_keycode) + TAP_IS_RETRO && (event.key.col != tapping_key.event.key.col || event.key.row != tapping_key.event.key.row) && IS_RELEASED(event) && waiting_buffer_typed(event) ) ) ) -# endif ) { // clang-format on - debug("Tapping: End. No tap. Interfered by typing key\n"); + ac_dprintf("Tapping: End. No tap. Interfered by typing key\n"); process_record(&tapping_key); tapping_key = (keyrecord_t){}; debug_tapping_key(); // enqueue return false; } -# endif /* Process release event of a key pressed before tapping starts * Without this unexpected repeating will occur with having fast repeating setting * https://github.com/tmk/tmk_keyboard/issues/60 */ else if (IS_RELEASED(event) && !waiting_buffer_typed(event)) { - // Modifier should be retained till end of this tapping. + // Modifier/Layer should be retained till end of this tapping. action_t action = layer_switch_get_action(event.key); switch (action.kind.id) { case ACT_LMODS: case ACT_RMODS: if (action.key.mods && !action.key.code) return false; - if (IS_MOD(action.key.code)) return false; + if (IS_MODIFIER_KEYCODE(action.key.code)) return false; break; case ACT_LMODS_TAP: case ACT_RMODS_TAP: if (action.key.mods && keyp->tap.count == 0) return false; - if (IS_MOD(action.key.code)) return false; + if (IS_MODIFIER_KEYCODE(action.key.code)) return false; + break; + case ACT_LAYER_TAP: + case ACT_LAYER_TAP_EXT: + switch (action.layer_tap.code) { + case 0 ...(OP_TAP_TOGGLE - 1): + case OP_ON_OFF: + case OP_OFF_ON: + case OP_SET_CLEAR: + return false; + } break; } // Release of key should be process immediately. - debug("Tapping: release event of a key pressed before tapping\n"); + ac_dprintf("Tapping: release event of a key pressed before tapping\n"); process_record(keyp); return true; } else { // set interrupted flag when other key preesed during tapping if (event.pressed) { tapping_key.tap.interrupted = true; -# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) -# if defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) - if (get_hold_on_other_key_press(tapping_keycode, &tapping_key)) -# endif - { - debug("Tapping: End. No tap. Interfered by pressed key\n"); + if (TAP_GET_HOLD_ON_OTHER_KEY_PRESS) { + ac_dprintf("Tapping: End. No tap. Interfered by pressed key\n"); process_record(&tapping_key); tapping_key = (keyrecord_t){}; debug_tapping_key(); // enqueue return false; } -# endif } // enqueue return false; @@ -273,9 +289,7 @@ bool process_tapping(keyrecord_t *keyp) { // tap_count > 0 else { if (IS_TAPPING_RECORD(keyp) && !event.pressed) { - debug("Tapping: Tap release("); - debug_dec(tapping_key.tap.count); - debug(")\n"); + ac_dprintf("Tapping: Tap release(%u)\n", tapping_key.tap.count); keyp->tap = tapping_key.tap; process_record(keyp); tapping_key = *keyp; @@ -283,7 +297,7 @@ bool process_tapping(keyrecord_t *keyp) { return true; } else if (is_tap_record(keyp) && event.pressed) { if (tapping_key.tap.count > 1) { - debug("Tapping: Start new tap with releasing last tap(>1).\n"); + ac_dprintf("Tapping: Start new tap with releasing last tap(>1).\n"); // unregister key process_record(&(keyrecord_t){ .tap = tapping_key.tap, @@ -295,15 +309,15 @@ bool process_tapping(keyrecord_t *keyp) { # endif }); } else { - debug("Tapping: Start while last tap(1).\n"); + ac_dprintf("Tapping: Start while last tap(1).\n"); } tapping_key = *keyp; waiting_buffer_scan_tap(); debug_tapping_key(); return true; } else { - if (!IS_NOEVENT(event)) { - debug("Tapping: key event while last tap(>0).\n"); + if (IS_EVENT(event)) { + ac_dprintf("Tapping: key event while last tap(>0).\n"); } process_record(keyp); return true; @@ -313,23 +327,23 @@ bool process_tapping(keyrecord_t *keyp) { // after TAPPING_TERM else { if (tapping_key.tap.count == 0) { - debug("Tapping: End. Timeout. Not tap(0): "); + ac_dprintf("Tapping: End. Timeout. Not tap(0): "); debug_event(event); - debug("\n"); + ac_dprintf("\n"); process_record(&tapping_key); tapping_key = (keyrecord_t){}; debug_tapping_key(); return false; } else { if (IS_TAPPING_RECORD(keyp) && !event.pressed) { - debug("Tapping: End. last timeout tap release(>0)."); + ac_dprintf("Tapping: End. last timeout tap release(>0)."); keyp->tap = tapping_key.tap; process_record(keyp); tapping_key = (keyrecord_t){}; return true; } else if (is_tap_record(keyp) && event.pressed) { if (tapping_key.tap.count > 1) { - debug("Tapping: Start new tap with releasing last timeout tap(>1).\n"); + ac_dprintf("Tapping: Start new tap with releasing last timeout tap(>1).\n"); // unregister key process_record(&(keyrecord_t){ .tap = tapping_key.tap, @@ -341,15 +355,15 @@ bool process_tapping(keyrecord_t *keyp) { # endif }); } else { - debug("Tapping: Start while last timeout tap(1).\n"); + ac_dprintf("Tapping: Start while last timeout tap(1).\n"); } tapping_key = *keyp; waiting_buffer_scan_tap(); debug_tapping_key(); return true; } else { - if (!IS_NOEVENT(event)) { - debug("Tapping: key event while last timeout tap(>0).\n"); + if (IS_EVENT(event)) { + ac_dprintf("Tapping: key event while last timeout tap(>0).\n"); } process_record(keyp); return true; @@ -357,45 +371,25 @@ bool process_tapping(keyrecord_t *keyp) { } } } else if (IS_TAPPING_RELEASED()) { - // clang-format off - if (WITHIN_TAPPING_TERM(event) -# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) - || ( -# ifdef RETRO_TAPPING_PER_KEY - get_retro_tapping(tapping_keycode, &tapping_key) && -# endif - (RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16(event.time, tapping_key.event.time) < (RETRO_SHIFT + 0) - ) -# endif - ) { - // clang-format on + if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event)) { if (event.pressed) { if (IS_TAPPING_RECORD(keyp)) { -//# ifndef TAPPING_FORCE_HOLD -# if !defined(TAPPING_FORCE_HOLD) || defined(TAPPING_FORCE_HOLD_PER_KEY) - if ( -# ifdef TAPPING_FORCE_HOLD_PER_KEY - !get_tapping_force_hold(tapping_keycode, &tapping_key) && -# endif - !tapping_key.tap.interrupted && tapping_key.tap.count > 0) { + if (WITHIN_QUICK_TAP_TERM(event) && !tapping_key.tap.interrupted && tapping_key.tap.count > 0) { // sequential tap. keyp->tap = tapping_key.tap; if (keyp->tap.count < 15) keyp->tap.count += 1; - debug("Tapping: Tap press("); - debug_dec(keyp->tap.count); - debug(")\n"); + ac_dprintf("Tapping: Tap press(%u)\n", keyp->tap.count); process_record(keyp); tapping_key = *keyp; debug_tapping_key(); return true; } -# endif // FIX: start new tap again tapping_key = *keyp; return true; } else if (is_tap_record(keyp)) { // Sequential tap can be interfered with other tap key. - debug("Tapping: Start with interfering other tap.\n"); + ac_dprintf("Tapping: Start with interfering other tap.\n"); tapping_key = *keyp; waiting_buffer_scan_tap(); debug_tapping_key(); @@ -408,16 +402,16 @@ bool process_tapping(keyrecord_t *keyp) { return true; } } else { - if (!IS_NOEVENT(event)) debug("Tapping: other key just after tap.\n"); + if (IS_EVENT(event)) ac_dprintf("Tapping: other key just after tap.\n"); process_record(keyp); return true; } } else { // FIX: process_action here? // timeout. no sequential tap. - debug("Tapping: End(Timeout after releasing last tap): "); + ac_dprintf("Tapping: End(Timeout after releasing last tap): "); debug_event(event); - debug("\n"); + ac_dprintf("\n"); tapping_key = (keyrecord_t){}; debug_tapping_key(); return false; @@ -426,7 +420,7 @@ bool process_tapping(keyrecord_t *keyp) { // not tapping state else { if (event.pressed && is_tap_record(keyp)) { - debug("Tapping: Start(Press tap key).\n"); + ac_dprintf("Tapping: Start(Press tap key).\n"); tapping_key = *keyp; process_record_tap_hint(&tapping_key); waiting_buffer_scan_tap(); @@ -449,14 +443,14 @@ bool waiting_buffer_enq(keyrecord_t record) { } if ((waiting_buffer_head + 1) % WAITING_BUFFER_SIZE == waiting_buffer_tail) { - debug("waiting_buffer_enq: Over flow.\n"); + ac_dprintf("waiting_buffer_enq: Over flow.\n"); return false; } waiting_buffer[waiting_buffer_head] = record; waiting_buffer_head = (waiting_buffer_head + 1) % WAITING_BUFFER_SIZE; - debug("waiting_buffer_enq: "); + ac_dprintf("waiting_buffer_enq: "); debug_waiting_buffer(); return true; } @@ -510,9 +504,7 @@ void waiting_buffer_scan_tap(void) { waiting_buffer[i].tap.count = 1; process_record(&tapping_key); - debug("waiting_buffer_scan_tap: found at ["); - debug_dec(i); - debug("]\n"); + ac_dprintf("waiting_buffer_scan_tap: found at [%u]\n", i); debug_waiting_buffer(); return; } @@ -524,9 +516,9 @@ void waiting_buffer_scan_tap(void) { * FIXME: Needs docs */ static void debug_tapping_key(void) { - debug("TAPPING_KEY="); + ac_dprintf("TAPPING_KEY="); debug_record(tapping_key); - debug("\n"); + ac_dprintf("\n"); } /** \brief Waiting buffer debug print @@ -534,15 +526,13 @@ static void debug_tapping_key(void) { * FIXME: Needs docs */ static void debug_waiting_buffer(void) { - debug("{ "); + ac_dprintf("{ "); for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { - debug("["); - debug_dec(i); - debug("]="); + ac_dprintf("[%u]=", i); debug_record(waiting_buffer[i]); - debug(" "); + ac_dprintf(" "); } - debug("}\n"); + ac_dprintf("}\n"); } #endif diff --git a/quantum/action_tapping.h b/quantum/action_tapping.h index bcccc7ac45..c078488c04 100644 --- a/quantum/action_tapping.h +++ b/quantum/action_tapping.h @@ -22,6 +22,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define TAPPING_TERM 200 #endif +/* period of quick tap(ms) */ +#if !defined(QUICK_TAP_TERM) || QUICK_TAP_TERM > TAPPING_TERM +# define QUICK_TAP_TERM TAPPING_TERM +#endif + /* tap count needed for toggling a feature */ #ifndef TAPPING_TOGGLE # define TAPPING_TOGGLE 5 @@ -36,9 +41,9 @@ void action_tapping_process(keyrecord_t record); #endif uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); +uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record); bool get_permissive_hold(uint16_t keycode, keyrecord_t *record); bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record); -bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record); bool get_retro_tapping(uint16_t keycode, keyrecord_t *record); bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record); @@ -53,3 +58,9 @@ extern uint16_t g_tapping_term; #else # define GET_TAPPING_TERM(keycode, record) (TAPPING_TERM) #endif + +#ifdef QUICK_TAP_TERM_PER_KEY +# define GET_QUICK_TAP_TERM(keycode, record) get_quick_tap_term(keycode, record) +#else +# define GET_QUICK_TAP_TERM(keycode, record) (QUICK_TAP_TERM) +#endif diff --git a/quantum/action_util.c b/quantum/action_util.c index 738410a4ac..7f7d32887b 100644 --- a/quantum/action_util.c +++ b/quantum/action_util.c @@ -98,12 +98,12 @@ enum { # if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) static uint16_t oneshot_layer_time = 0; -inline bool has_oneshot_layer_timed_out() { +inline bool has_oneshot_layer_timed_out(void) { return TIMER_DIFF_16(timer_read(), oneshot_layer_time) >= ONESHOT_TIMEOUT && !(get_oneshot_layer_state() & ONESHOT_TOGGLED); } # ifdef SWAP_HANDS_ENABLE static uint16_t oneshot_swaphands_time = 0; -inline bool has_oneshot_swaphands_timed_out() { +inline bool has_oneshot_swaphands_timed_out(void) { return TIMER_DIFF_16(timer_read(), oneshot_swaphands_time) >= ONESHOT_TIMEOUT && (swap_hands_oneshot == SHO_ACTIVE); } # endif diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index c6523b908c..ca78a483ad 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -112,7 +112,7 @@ static bool audio_initialized = false; static bool audio_driver_stopped = true; audio_config_t audio_config; -void audio_init() { +void audio_init(void) { if (audio_initialized) { return; } @@ -185,7 +185,7 @@ bool audio_is_on(void) { return (audio_config.enable != 0); } -void audio_stop_all() { +void audio_stop_all(void) { if (audio_driver_stopped) { return; } diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c index 1c08a3af36..01f257f4d4 100644 --- a/quantum/audio/voices.c +++ b/quantum/audio/voices.c @@ -36,11 +36,11 @@ void set_voice(voice_type v) { voice = v; } -void voice_iterate() { +void voice_iterate(void) { voice = (voice + 1) % number_of_voices; } -void voice_deiterate() { +void voice_deiterate(void) { voice = (voice - 1 + number_of_voices) % number_of_voices; } diff --git a/quantum/config_common.h b/quantum/config_common.h index 6ab8a2aa7d..6c70b00b53 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -16,14 +16,4 @@ #pragma once -#ifndef __ASSEMBLER__ -# include "pin_defs.h" -#endif - -/* diode directions */ -#define COL2ROW 0 -#define ROW2COL 1 - -#ifdef AUDIO_ENABLE -# include "song_list.h" -#endif +#pragma message("'config_common.h' should no longer be included!") diff --git a/quantum/haptic.c b/quantum/haptic.c index ad64fe2cc7..c151547fca 100644 --- a/quantum/haptic.c +++ b/quantum/haptic.c @@ -25,6 +25,9 @@ #ifdef SOLENOID_ENABLE # include "solenoid.h" #endif +#if defined(SPLIT_KEYBOARD) && defined(SPLIT_HAPTIC_ENABLE) +extern uint8_t split_haptic_play; +#endif haptic_config_t haptic_config; @@ -319,9 +322,15 @@ void haptic_play(void) { uint8_t play_eff = 0; play_eff = haptic_config.mode; DRV_pulse(play_eff); +# if defined(SPLIT_KEYBOARD) && defined(SPLIT_HAPTIC_ENABLE) + split_haptic_play = haptic_config.mode; +# endif #endif #ifdef SOLENOID_ENABLE solenoid_fire_handler(); +# if defined(SPLIT_KEYBOARD) && defined(SPLIT_HAPTIC_ENABLE) + split_haptic_play = 1; +# endif #endif } diff --git a/quantum/joystick.c b/quantum/joystick.c index 057a018dff..02818e4acd 100644 --- a/quantum/joystick.c +++ b/quantum/joystick.c @@ -111,7 +111,7 @@ int16_t joystick_read_axis(uint8_t axis) { return ranged_val; } -void joystick_read_axes() { +void joystick_read_axes(void) { #if JOYSTICK_AXIS_COUNT > 0 for (int i = 0; i < JOYSTICK_AXIS_COUNT; ++i) { if (joystick_axes[i].input_pin == JS_VIRTUAL_AXIS) { diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 37675ded0b..ec2f2e4496 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -105,6 +105,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef CAPS_WORD_ENABLE # include "caps_word.h" #endif +#ifdef LEADER_ENABLE +# include "leader.h" +#endif static uint32_t last_input_modification_time = 0; uint32_t last_input_activity_time(void) { @@ -238,7 +241,7 @@ __attribute__((weak)) void keyboard_pre_init_kb(void) { * FIXME: needs doc */ -__attribute__((weak)) void keyboard_post_init_user() {} +__attribute__((weak)) void keyboard_post_init_user(void) {} /** \brief keyboard_post_init_kb * @@ -249,6 +252,14 @@ __attribute__((weak)) void keyboard_post_init_kb(void) { keyboard_post_init_user(); } +/** \brief matrix_can_read + * + * Allows overriding when matrix scanning operations should be executed. + */ +__attribute__((weak)) bool matrix_can_read(void) { + return true; +} + /** \brief keyboard_setup * * FIXME: needs doc @@ -446,10 +457,14 @@ static inline void generate_tick_event(void) { * @return false Matrix didn't change */ static bool matrix_task(void) { + if (!matrix_can_read()) { + generate_tick_event(); + return false; + } + static matrix_row_t matrix_previous[MATRIX_ROWS]; matrix_scan(); - bool matrix_changed = false; for (uint8_t row = 0; row < MATRIX_ROWS && !matrix_changed; row++) { matrix_changed |= matrix_previous[row] ^ matrix_get_row(row); @@ -546,6 +561,10 @@ void quantum_task(void) { combo_task(); #endif +#ifdef LEADER_ENABLE + leader_task(); +#endif + #ifdef WPM_ENABLE decay_wpm(); #endif diff --git a/quantum/keyboard.h b/quantum/keyboard.h index 86ce65aac1..d0b52dd13a 100644 --- a/quantum/keyboard.h +++ b/quantum/keyboard.h @@ -53,6 +53,9 @@ typedef struct { static inline bool IS_NOEVENT(keyevent_t event) { return event.time == 0 || (event.key.row == KEYLOC_TICK && event.key.col == KEYLOC_TICK); } +static inline bool IS_EVENT(keyevent_t event) { + return !IS_NOEVENT(event); +} static inline bool IS_KEYEVENT(keyevent_t event) { return event.key.row < MATRIX_ROWS && event.key.col < MATRIX_COLS; } @@ -63,10 +66,10 @@ static inline bool IS_ENCODEREVENT(keyevent_t event) { return event.key.row == KEYLOC_ENCODER_CW || event.key.row == KEYLOC_ENCODER_CCW; } static inline bool IS_PRESSED(keyevent_t event) { - return !IS_NOEVENT(event) && event.pressed; + return IS_EVENT(event) && event.pressed; } static inline bool IS_RELEASED(keyevent_t event) { - return !IS_NOEVENT(event) && !event.pressed; + return IS_EVENT(event) && !event.pressed; } /* Common keyevent object factory */ diff --git a/quantum/keycode.h b/quantum/keycode.h index 45736e92f1..03989ed8f6 100644 --- a/quantum/keycode.h +++ b/quantum/keycode.h @@ -27,8 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* FIXME: Add doxygen comments here */ #define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF) -#define IS_KEY(code) IS_BASIC_KEYCODE(code) -#define IS_MOD(code) IS_MODIFIERS_KEYCODE(code) #define IS_SYSTEM(code) IS_SYSTEM_KEYCODE(code) #define IS_CONSUMER(code) IS_MEDIA_KEYCODE(code) diff --git a/quantum/keycodes.h b/quantum/keycodes.h index c013858e78..cb1499dede 100644 --- a/quantum/keycodes.h +++ b/quantum/keycodes.h @@ -1,4 +1,4 @@ -// Copyright 2022 QMK +// Copyright 2023 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* @@ -82,6 +82,10 @@ enum qk_keycode_ranges { QK_USER_MAX = 0x7FFF, QK_UNICODE = 0x8000, QK_UNICODE_MAX = 0xFFFF, + QK_UNICODEMAP = 0x8000, + QK_UNICODEMAP_MAX = 0xBFFF, + QK_UNICODEMAP_PAIR = 0xC000, + QK_UNICODEMAP_PAIR_MAX = 0xFFFF, }; enum qk_keycode_defines { @@ -304,13 +308,13 @@ enum qk_keycode_defines { KC_RIGHT_SHIFT = 0x00E5, KC_RIGHT_ALT = 0x00E6, KC_RIGHT_GUI = 0x00E7, - SH_TG = 0x56F0, - SH_TT = 0x56F1, - SH_MON = 0x56F2, - SH_MOFF = 0x56F3, - SH_OFF = 0x56F4, - SH_ON = 0x56F5, - SH_OS = 0x56F6, + QK_SWAP_HANDS_TOGGLE = 0x56F0, + QK_SWAP_HANDS_TAP_TOGGLE = 0x56F1, + QK_SWAP_HANDS_MOMENTARY_ON = 0x56F2, + QK_SWAP_HANDS_MOMENTARY_OFF = 0x56F3, + QK_SWAP_HANDS_OFF = 0x56F4, + QK_SWAP_HANDS_ON = 0x56F5, + QK_SWAP_HANDS_ONE_SHOT = 0x56F6, MAGIC_SWAP_CONTROL_CAPSLOCK = 0x7000, MAGIC_UNSWAP_CONTROL_CAPSLOCK = 0x7001, MAGIC_TOGGLE_CONTROL_CAPSLOCK = 0x7002, @@ -349,147 +353,147 @@ enum qk_keycode_defines { QK_MIDI_ON = 0x7100, QK_MIDI_OFF = 0x7101, QK_MIDI_TOGGLE = 0x7102, - QK_MIDI_NOTE_C_0 = 0x7110, - QK_MIDI_NOTE_C_SHARP_0 = 0x7111, - QK_MIDI_NOTE_D_0 = 0x7112, - QK_MIDI_NOTE_D_SHARP_0 = 0x7113, - QK_MIDI_NOTE_E_0 = 0x7114, - QK_MIDI_NOTE_F_0 = 0x7115, - QK_MIDI_NOTE_F_SHARP_0 = 0x7116, - QK_MIDI_NOTE_G_0 = 0x7117, - QK_MIDI_NOTE_G_SHARP_0 = 0x7118, - QK_MIDI_NOTE_A_0 = 0x7119, - QK_MIDI_NOTE_A_SHARP_0 = 0x711A, - QK_MIDI_NOTE_B_0 = 0x711B, - QK_MIDI_NOTE_C_1 = 0x7120, - QK_MIDI_NOTE_C_SHARP_1 = 0x7121, - QK_MIDI_NOTE_D_1 = 0x7122, - QK_MIDI_NOTE_D_SHARP_1 = 0x7123, - QK_MIDI_NOTE_E_1 = 0x7124, - QK_MIDI_NOTE_F_1 = 0x7125, - QK_MIDI_NOTE_F_SHARP_1 = 0x7126, - QK_MIDI_NOTE_G_1 = 0x7127, - QK_MIDI_NOTE_G_SHARP_1 = 0x7128, - QK_MIDI_NOTE_A_1 = 0x7129, - QK_MIDI_NOTE_A_SHARP_1 = 0x712A, - QK_MIDI_NOTE_B_1 = 0x712B, - QK_MIDI_NOTE_C_2 = 0x7130, - QK_MIDI_NOTE_C_SHARP_2 = 0x7131, - QK_MIDI_NOTE_D_2 = 0x7132, - QK_MIDI_NOTE_D_SHARP_2 = 0x7133, - QK_MIDI_NOTE_E_2 = 0x7134, - QK_MIDI_NOTE_F_2 = 0x7135, - QK_MIDI_NOTE_F_SHARP_2 = 0x7136, - QK_MIDI_NOTE_G_2 = 0x7137, - QK_MIDI_NOTE_G_SHARP_2 = 0x7138, - QK_MIDI_NOTE_A_2 = 0x7139, - QK_MIDI_NOTE_A_SHARP_2 = 0x713A, - QK_MIDI_NOTE_B_2 = 0x713B, - QK_MIDI_NOTE_C_3 = 0x7140, - QK_MIDI_NOTE_C_SHARP_3 = 0x7141, - QK_MIDI_NOTE_D_3 = 0x7142, - QK_MIDI_NOTE_D_SHARP_3 = 0x7143, - QK_MIDI_NOTE_E_3 = 0x7144, - QK_MIDI_NOTE_F_3 = 0x7145, - QK_MIDI_NOTE_F_SHARP_3 = 0x7146, - QK_MIDI_NOTE_G_3 = 0x7147, - QK_MIDI_NOTE_G_SHARP_3 = 0x7148, - QK_MIDI_NOTE_A_3 = 0x7149, - QK_MIDI_NOTE_A_SHARP_3 = 0x714A, - QK_MIDI_NOTE_B_3 = 0x714B, - QK_MIDI_NOTE_C_4 = 0x7150, - QK_MIDI_NOTE_C_SHARP_4 = 0x7151, - QK_MIDI_NOTE_D_4 = 0x7152, - QK_MIDI_NOTE_D_SHARP_4 = 0x7153, - QK_MIDI_NOTE_E_4 = 0x7154, - QK_MIDI_NOTE_F_4 = 0x7155, - QK_MIDI_NOTE_F_SHARP_4 = 0x7156, - QK_MIDI_NOTE_G_4 = 0x7157, - QK_MIDI_NOTE_G_SHARP_4 = 0x7158, - QK_MIDI_NOTE_A_4 = 0x7159, - QK_MIDI_NOTE_A_SHARP_4 = 0x715A, - QK_MIDI_NOTE_B_4 = 0x715B, - QK_MIDI_NOTE_C_5 = 0x7160, - QK_MIDI_NOTE_C_SHARP_5 = 0x7161, - QK_MIDI_NOTE_D_5 = 0x7162, - QK_MIDI_NOTE_D_SHARP_5 = 0x7163, - QK_MIDI_NOTE_E_5 = 0x7164, - QK_MIDI_NOTE_F_5 = 0x7165, - QK_MIDI_NOTE_F_SHARP_5 = 0x7166, - QK_MIDI_NOTE_G_5 = 0x7167, - QK_MIDI_NOTE_G_SHARP_5 = 0x7168, - QK_MIDI_NOTE_A_5 = 0x7169, - QK_MIDI_NOTE_A_SHARP_5 = 0x716A, - QK_MIDI_NOTE_B_5 = 0x716B, - QK_MIDI_OCTAVE_N2 = 0x7170, - QK_MIDI_OCTAVE_N1 = 0x7171, - QK_MIDI_OCTAVE_0 = 0x7172, - QK_MIDI_OCTAVE_1 = 0x7173, - QK_MIDI_OCTAVE_2 = 0x7174, - QK_MIDI_OCTAVE_3 = 0x7175, - QK_MIDI_OCTAVE_4 = 0x7176, - QK_MIDI_OCTAVE_5 = 0x7177, - QK_MIDI_OCTAVE_6 = 0x7178, - QK_MIDI_OCTAVE_7 = 0x7179, - QK_MIDI_OCTAVE_DOWN = 0x717A, - QK_MIDI_OCTAVE_UP = 0x717B, - QK_MIDI_TRANSPOSE_N6 = 0x7180, - QK_MIDI_TRANSPOSE_N5 = 0x7181, - QK_MIDI_TRANSPOSE_N4 = 0x7182, - QK_MIDI_TRANSPOSE_N3 = 0x7183, - QK_MIDI_TRANSPOSE_N2 = 0x7184, - QK_MIDI_TRANSPOSE_N1 = 0x7185, - QK_MIDI_TRANSPOSE_0 = 0x7186, - QK_MIDI_TRANSPOSE_1 = 0x7187, - QK_MIDI_TRANSPOSE_2 = 0x7188, - QK_MIDI_TRANSPOSE_3 = 0x7189, - QK_MIDI_TRANSPOSE_4 = 0x718A, - QK_MIDI_TRANSPOSE_5 = 0x718B, - QK_MIDI_TRANSPOSE_6 = 0x718C, - QK_MIDI_TRANSPOSE_DOWN = 0x718D, - QK_MIDI_TRANSPOSE_UP = 0x718E, - QK_MIDI_VELOCITY_0 = 0x7190, - QK_MIDI_VELOCITY_1 = 0x7191, - QK_MIDI_VELOCITY_2 = 0x7192, - QK_MIDI_VELOCITY_3 = 0x7193, - QK_MIDI_VELOCITY_4 = 0x7194, - QK_MIDI_VELOCITY_5 = 0x7195, - QK_MIDI_VELOCITY_6 = 0x7196, - QK_MIDI_VELOCITY_7 = 0x7197, - QK_MIDI_VELOCITY_8 = 0x7198, - QK_MIDI_VELOCITY_9 = 0x7199, - QK_MIDI_VELOCITY_10 = 0x719A, - QK_MIDI_VELOCITY_DOWN = 0x719B, - QK_MIDI_VELOCITY_UP = 0x719C, - QK_MIDI_CHANNEL_1 = 0x71A0, - QK_MIDI_CHANNEL_2 = 0x71A1, - QK_MIDI_CHANNEL_3 = 0x71A2, - QK_MIDI_CHANNEL_4 = 0x71A3, - QK_MIDI_CHANNEL_5 = 0x71A4, - QK_MIDI_CHANNEL_6 = 0x71A5, - QK_MIDI_CHANNEL_7 = 0x71A6, - QK_MIDI_CHANNEL_8 = 0x71A7, - QK_MIDI_CHANNEL_9 = 0x71A8, - QK_MIDI_CHANNEL_10 = 0x71A9, - QK_MIDI_CHANNEL_11 = 0x71AA, - QK_MIDI_CHANNEL_12 = 0x71AB, - QK_MIDI_CHANNEL_13 = 0x71AC, - QK_MIDI_CHANNEL_14 = 0x71AD, - QK_MIDI_CHANNEL_15 = 0x71AE, - QK_MIDI_CHANNEL_16 = 0x71AF, - QK_MIDI_CHANNEL_DOWN = 0x71B0, - QK_MIDI_CHANNEL_UP = 0x71B1, - QK_MIDI_ALL_NOTES_OFF = 0x71C0, - QK_MIDI_SUSTAIN = 0x71C1, - QK_MIDI_PORTAMENTO = 0x71C2, - QK_MIDI_SOSTENUTO = 0x71C3, - QK_MIDI_SOFT = 0x71C4, - QK_MIDI_LEGATO = 0x71C5, - QK_MIDI_MODULATION = 0x71C6, - QK_MIDI_MODULATION_SPEED_DOWN = 0x71C7, - QK_MIDI_MODULATION_SPEED_UP = 0x71C8, - QK_MIDI_PITCH_BEND_DOWN = 0x71C9, - QK_MIDI_PITCH_BEND_UP = 0x71CA, + QK_MIDI_NOTE_C_0 = 0x7103, + QK_MIDI_NOTE_C_SHARP_0 = 0x7104, + QK_MIDI_NOTE_D_0 = 0x7105, + QK_MIDI_NOTE_D_SHARP_0 = 0x7106, + QK_MIDI_NOTE_E_0 = 0x7107, + QK_MIDI_NOTE_F_0 = 0x7108, + QK_MIDI_NOTE_F_SHARP_0 = 0x7109, + QK_MIDI_NOTE_G_0 = 0x710A, + QK_MIDI_NOTE_G_SHARP_0 = 0x710B, + QK_MIDI_NOTE_A_0 = 0x710C, + QK_MIDI_NOTE_A_SHARP_0 = 0x710D, + QK_MIDI_NOTE_B_0 = 0x710E, + QK_MIDI_NOTE_C_1 = 0x710F, + QK_MIDI_NOTE_C_SHARP_1 = 0x7110, + QK_MIDI_NOTE_D_1 = 0x7111, + QK_MIDI_NOTE_D_SHARP_1 = 0x7112, + QK_MIDI_NOTE_E_1 = 0x7113, + QK_MIDI_NOTE_F_1 = 0x7114, + QK_MIDI_NOTE_F_SHARP_1 = 0x7115, + QK_MIDI_NOTE_G_1 = 0x7116, + QK_MIDI_NOTE_G_SHARP_1 = 0x7117, + QK_MIDI_NOTE_A_1 = 0x7118, + QK_MIDI_NOTE_A_SHARP_1 = 0x7119, + QK_MIDI_NOTE_B_1 = 0x711A, + QK_MIDI_NOTE_C_2 = 0x711B, + QK_MIDI_NOTE_C_SHARP_2 = 0x711C, + QK_MIDI_NOTE_D_2 = 0x711D, + QK_MIDI_NOTE_D_SHARP_2 = 0x711E, + QK_MIDI_NOTE_E_2 = 0x711F, + QK_MIDI_NOTE_F_2 = 0x7120, + QK_MIDI_NOTE_F_SHARP_2 = 0x7121, + QK_MIDI_NOTE_G_2 = 0x7122, + QK_MIDI_NOTE_G_SHARP_2 = 0x7123, + QK_MIDI_NOTE_A_2 = 0x7124, + QK_MIDI_NOTE_A_SHARP_2 = 0x7125, + QK_MIDI_NOTE_B_2 = 0x7126, + QK_MIDI_NOTE_C_3 = 0x7127, + QK_MIDI_NOTE_C_SHARP_3 = 0x7128, + QK_MIDI_NOTE_D_3 = 0x7129, + QK_MIDI_NOTE_D_SHARP_3 = 0x712A, + QK_MIDI_NOTE_E_3 = 0x712B, + QK_MIDI_NOTE_F_3 = 0x712C, + QK_MIDI_NOTE_F_SHARP_3 = 0x712D, + QK_MIDI_NOTE_G_3 = 0x712E, + QK_MIDI_NOTE_G_SHARP_3 = 0x712F, + QK_MIDI_NOTE_A_3 = 0x7130, + QK_MIDI_NOTE_A_SHARP_3 = 0x7131, + QK_MIDI_NOTE_B_3 = 0x7132, + QK_MIDI_NOTE_C_4 = 0x7133, + QK_MIDI_NOTE_C_SHARP_4 = 0x7134, + QK_MIDI_NOTE_D_4 = 0x7135, + QK_MIDI_NOTE_D_SHARP_4 = 0x7136, + QK_MIDI_NOTE_E_4 = 0x7137, + QK_MIDI_NOTE_F_4 = 0x7138, + QK_MIDI_NOTE_F_SHARP_4 = 0x7139, + QK_MIDI_NOTE_G_4 = 0x713A, + QK_MIDI_NOTE_G_SHARP_4 = 0x713B, + QK_MIDI_NOTE_A_4 = 0x713C, + QK_MIDI_NOTE_A_SHARP_4 = 0x713D, + QK_MIDI_NOTE_B_4 = 0x713E, + QK_MIDI_NOTE_C_5 = 0x713F, + QK_MIDI_NOTE_C_SHARP_5 = 0x7140, + QK_MIDI_NOTE_D_5 = 0x7141, + QK_MIDI_NOTE_D_SHARP_5 = 0x7142, + QK_MIDI_NOTE_E_5 = 0x7143, + QK_MIDI_NOTE_F_5 = 0x7144, + QK_MIDI_NOTE_F_SHARP_5 = 0x7145, + QK_MIDI_NOTE_G_5 = 0x7146, + QK_MIDI_NOTE_G_SHARP_5 = 0x7147, + QK_MIDI_NOTE_A_5 = 0x7148, + QK_MIDI_NOTE_A_SHARP_5 = 0x7149, + QK_MIDI_NOTE_B_5 = 0x714A, + QK_MIDI_OCTAVE_N2 = 0x714B, + QK_MIDI_OCTAVE_N1 = 0x714C, + QK_MIDI_OCTAVE_0 = 0x714D, + QK_MIDI_OCTAVE_1 = 0x714E, + QK_MIDI_OCTAVE_2 = 0x714F, + QK_MIDI_OCTAVE_3 = 0x7150, + QK_MIDI_OCTAVE_4 = 0x7151, + QK_MIDI_OCTAVE_5 = 0x7152, + QK_MIDI_OCTAVE_6 = 0x7153, + QK_MIDI_OCTAVE_7 = 0x7154, + QK_MIDI_OCTAVE_DOWN = 0x7155, + QK_MIDI_OCTAVE_UP = 0x7156, + QK_MIDI_TRANSPOSE_N6 = 0x7157, + QK_MIDI_TRANSPOSE_N5 = 0x7158, + QK_MIDI_TRANSPOSE_N4 = 0x7159, + QK_MIDI_TRANSPOSE_N3 = 0x715A, + QK_MIDI_TRANSPOSE_N2 = 0x715B, + QK_MIDI_TRANSPOSE_N1 = 0x715C, + QK_MIDI_TRANSPOSE_0 = 0x715D, + QK_MIDI_TRANSPOSE_1 = 0x715E, + QK_MIDI_TRANSPOSE_2 = 0x715F, + QK_MIDI_TRANSPOSE_3 = 0x7160, + QK_MIDI_TRANSPOSE_4 = 0x7161, + QK_MIDI_TRANSPOSE_5 = 0x7162, + QK_MIDI_TRANSPOSE_6 = 0x7163, + QK_MIDI_TRANSPOSE_DOWN = 0x7164, + QK_MIDI_TRANSPOSE_UP = 0x7165, + QK_MIDI_VELOCITY_0 = 0x7166, + QK_MIDI_VELOCITY_1 = 0x7167, + QK_MIDI_VELOCITY_2 = 0x7168, + QK_MIDI_VELOCITY_3 = 0x7169, + QK_MIDI_VELOCITY_4 = 0x716A, + QK_MIDI_VELOCITY_5 = 0x716B, + QK_MIDI_VELOCITY_6 = 0x716C, + QK_MIDI_VELOCITY_7 = 0x716D, + QK_MIDI_VELOCITY_8 = 0x716E, + QK_MIDI_VELOCITY_9 = 0x716F, + QK_MIDI_VELOCITY_10 = 0x7170, + QK_MIDI_VELOCITY_DOWN = 0x7171, + QK_MIDI_VELOCITY_UP = 0x7172, + QK_MIDI_CHANNEL_1 = 0x7173, + QK_MIDI_CHANNEL_2 = 0x7174, + QK_MIDI_CHANNEL_3 = 0x7175, + QK_MIDI_CHANNEL_4 = 0x7176, + QK_MIDI_CHANNEL_5 = 0x7177, + QK_MIDI_CHANNEL_6 = 0x7178, + QK_MIDI_CHANNEL_7 = 0x7179, + QK_MIDI_CHANNEL_8 = 0x717A, + QK_MIDI_CHANNEL_9 = 0x717B, + QK_MIDI_CHANNEL_10 = 0x717C, + QK_MIDI_CHANNEL_11 = 0x717D, + QK_MIDI_CHANNEL_12 = 0x717E, + QK_MIDI_CHANNEL_13 = 0x717F, + QK_MIDI_CHANNEL_14 = 0x7180, + QK_MIDI_CHANNEL_15 = 0x7181, + QK_MIDI_CHANNEL_16 = 0x7182, + QK_MIDI_CHANNEL_DOWN = 0x7183, + QK_MIDI_CHANNEL_UP = 0x7184, + QK_MIDI_ALL_NOTES_OFF = 0x7185, + QK_MIDI_SUSTAIN = 0x7186, + QK_MIDI_PORTAMENTO = 0x7187, + QK_MIDI_SOSTENUTO = 0x7188, + QK_MIDI_SOFT = 0x7189, + QK_MIDI_LEGATO = 0x718A, + QK_MIDI_MODULATION = 0x718B, + QK_MIDI_MODULATION_SPEED_DOWN = 0x718C, + QK_MIDI_MODULATION_SPEED_UP = 0x718D, + QK_MIDI_PITCH_BEND_DOWN = 0x718E, + QK_MIDI_PITCH_BEND_UP = 0x718F, SQ_ON = 0x7200, SQ_OFF = 0x7201, SQ_TOG = 0x7202, @@ -713,6 +717,8 @@ enum qk_keycode_defines { QK_AUTOCORRECT_ON = 0x7C74, QK_AUTOCORRECT_OFF = 0x7C75, QK_AUTOCORRECT_TOGGLE = 0x7C76, + QK_TRI_LAYER_LOWER = 0x7C77, + QK_TRI_LAYER_UPPER = 0x7C78, SAFE_RANGE = 0x7E00, // Alias @@ -863,6 +869,13 @@ enum qk_keycode_defines { KC_RGUI = KC_RIGHT_GUI, KC_RCMD = KC_RIGHT_GUI, KC_RWIN = KC_RIGHT_GUI, + SH_TOGG = QK_SWAP_HANDS_TOGGLE, + SH_TT = QK_SWAP_HANDS_TAP_TOGGLE, + SH_MON = QK_SWAP_HANDS_MOMENTARY_ON, + SH_MOFF = QK_SWAP_HANDS_MOMENTARY_OFF, + SH_OFF = QK_SWAP_HANDS_OFF, + SH_ON = QK_SWAP_HANDS_ON, + SH_OS = QK_SWAP_HANDS_ONE_SHOT, CL_SWAP = MAGIC_SWAP_CONTROL_CAPSLOCK, CL_NORM = MAGIC_UNSWAP_CONTROL_CAPSLOCK, CL_TOGG = MAGIC_TOGGLE_CONTROL_CAPSLOCK, @@ -1271,6 +1284,8 @@ enum qk_keycode_defines { AC_ON = QK_AUTOCORRECT_ON, AC_OFF = QK_AUTOCORRECT_OFF, AC_TOGG = QK_AUTOCORRECT_TOGGLE, + TL_LOWR = QK_TRI_LAYER_LOWER, + TL_UPPR = QK_TRI_LAYER_UPPER, }; // Range Helpers @@ -1301,6 +1316,8 @@ enum qk_keycode_defines { #define IS_QK_KB(code) ((code) >= QK_KB && (code) <= QK_KB_MAX) #define IS_QK_USER(code) ((code) >= QK_USER && (code) <= QK_USER_MAX) #define IS_QK_UNICODE(code) ((code) >= QK_UNICODE && (code) <= QK_UNICODE_MAX) +#define IS_QK_UNICODEMAP(code) ((code) >= QK_UNICODEMAP && (code) <= QK_UNICODEMAP_MAX) +#define IS_QK_UNICODEMAP_PAIR(code) ((code) >= QK_UNICODEMAP_PAIR && (code) <= QK_UNICODEMAP_PAIR_MAX) // Group Helpers #define IS_INTERNAL_KEYCODE(code) ((code) >= KC_NO && (code) <= KC_TRANSPARENT) @@ -1308,8 +1325,8 @@ enum qk_keycode_defines { #define IS_SYSTEM_KEYCODE(code) ((code) >= KC_SYSTEM_POWER && (code) <= KC_SYSTEM_WAKE) #define IS_MEDIA_KEYCODE(code) ((code) >= KC_AUDIO_MUTE && (code) <= KC_ASSISTANT) #define IS_MOUSE_KEYCODE(code) ((code) >= KC_MS_UP && (code) <= KC_MS_ACCEL2) -#define IS_MODIFIERS_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI) -#define IS_SWAP_HANDS_KEYCODE(code) ((code) >= SH_TG && (code) <= SH_OS) +#define IS_MODIFIER_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI) +#define IS_SWAP_HANDS_KEYCODE(code) ((code) >= QK_SWAP_HANDS_TOGGLE && (code) <= QK_SWAP_HANDS_ONE_SHOT) #define IS_MAGIC_KEYCODE(code) ((code) >= MAGIC_SWAP_CONTROL_CAPSLOCK && (code) <= MAGIC_TOGGLE_ESCAPE_CAPSLOCK) #define IS_MIDI_KEYCODE(code) ((code) >= QK_MIDI_ON && (code) <= QK_MIDI_PITCH_BEND_UP) #define IS_SEQUENCER_KEYCODE(code) ((code) >= SQ_ON && (code) <= SQ_SCLR) @@ -1320,4 +1337,4 @@ enum qk_keycode_defines { #define IS_MACRO_KEYCODE(code) ((code) >= QK_MACRO_0 && (code) <= QK_MACRO_31) #define IS_BACKLIGHT_KEYCODE(code) ((code) >= QK_BACKLIGHT_ON && (code) <= QK_BACKLIGHT_TOGGLE_BREATHING) #define IS_RGB_KEYCODE(code) ((code) >= RGB_TOG && (code) <= RGB_MODE_TWINKLE) -#define IS_QUANTUM_KEYCODE(code) ((code) >= QK_BOOTLOADER && (code) <= QK_AUTOCORRECT_TOGGLE) +#define IS_QUANTUM_KEYCODE(code) ((code) >= QK_BOOTLOADER && (code) <= QK_TRI_LAYER_UPPER) diff --git a/quantum/keymap_extras/keymap_belgian.h b/quantum/keymap_extras/keymap_belgian.h index 207905b291..1bf9549c5a 100644 --- a/quantum/keymap_extras/keymap_belgian.h +++ b/quantum/keymap_extras/keymap_belgian.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ² │ & │ é │ " │ ' │ ( │ § │ è │ ! │ ç │ à │ ) │ - │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ A │ Z │ E │ R │ T │ Y │ U │ I │ O │ P │ ^ │ $ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Q │ S │ D │ F │ G │ H │ J │ K │ L │ M │ ù │ µ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ W │ X │ C │ V │ B │ N │ , │ ; │ : │ = │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define BE_SUP2 KC_GRV // ² #define BE_AMPR KC_1 // & #define BE_EACU KC_2 // é @@ -47,7 +41,6 @@ #define BE_AGRV KC_0 // à #define BE_RPRN KC_MINS // ) #define BE_MINS KC_EQL // - -// Row 2 #define BE_A KC_Q // A #define BE_Z KC_W // Z #define BE_E KC_E // E @@ -60,7 +53,6 @@ #define BE_P KC_P // P #define BE_DCIR KC_LBRC // ^ (dead) #define BE_DLR KC_RBRC // $ -// Row 3 #define BE_Q KC_A // Q #define BE_S KC_S // S #define BE_D KC_D // D @@ -73,7 +65,6 @@ #define BE_M KC_SCLN // M #define BE_UGRV KC_QUOT // ù #define BE_MICR KC_NUHS // µ -// Row 4 #define BE_LABK KC_NUBS // < #define BE_W KC_Z // W #define BE_X KC_X // X @@ -85,21 +76,6 @@ #define BE_SCLN KC_COMM // ; #define BE_COLN KC_DOT // : #define BE_EQL KC_SLSH // = - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ³ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ° │ _ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ * │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ % │ £ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ ? │ . │ / │ + │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define BE_SUP3 S(BE_SUP2) // ³ #define BE_1 S(BE_AMPR) // 1 #define BE_2 S(BE_EACU) // 2 @@ -113,46 +89,26 @@ #define BE_0 S(BE_AGRV) // 0 #define BE_DEG S(BE_RPRN) // ° #define BE_UNDS S(BE_MINS) // _ -// Row 2 #define BE_DIAE S(BE_DCIR) // ¨ (dead) #define BE_ASTR S(BE_DLR) // * -// Row 3 #define BE_PERC S(BE_UGRV) // % #define BE_PND S(BE_MICR) // £ -// Row 4 #define BE_RABK S(BE_LABK) // > #define BE_QUES S(BE_COMM) // ? #define BE_DOT S(BE_SCLN) // . #define BE_SLSH S(BE_COLN) // / #define BE_PLUS S(BE_EQL) // + - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ | │ @ │ # │ │ │ ^ │ │ │ { │ } │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ ´ │ ` │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ \ │ │ │ │ │ │ │ │ │ │ ~ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define BE_PIPE ALGR(BE_AMPR) // | #define BE_AT ALGR(BE_EACU) // @ #define BE_HASH ALGR(BE_DQUO) // # #define BE_CIRC ALGR(BE_SECT) // ^ #define BE_LCBR ALGR(BE_CCED) // { #define BE_RCBR ALGR(BE_AGRV) // } -// Row 2 #define BE_EURO ALGR(BE_E) // € #define BE_LBRC ALGR(BE_DCIR) // [ #define BE_RBRC ALGR(BE_DLR) // ] -// Row 3 #define BE_ACUT ALGR(BE_UGRV) // ´ (dead) #define BE_GRV ALGR(BE_MICR) // ` (dead) -// Row 4 #define BE_BSLS ALGR(BE_LABK) // (backslash) #define BE_TILD ALGR(BE_EQL) // ~ + diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h index 6361823242..12026ce649 100644 --- a/quantum/keymap_extras/keymap_bepo.h +++ b/quantum/keymap_extras/keymap_bepo.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ $ │ " │ « │ » │ ( │ ) │ @ │ + │ - │ / │ * │ = │ % │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ B │ É │ P │ O │ È │ ^ │ V │ D │ L │ J │ Z │ W │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ U │ I │ E │ , │ C │ T │ S │ R │ N │ M │ Ç │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ Ê │ À │ Y │ X │ . │ K │ ' │ Q │ G │ H │ F │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define BP_DLR KC_GRV // $ #define BP_DQUO KC_1 // " #define BP_LDAQ KC_2 // « @@ -47,7 +41,6 @@ #define BP_ASTR KC_0 // * #define BP_EQL KC_MINS // = #define BP_PERC KC_EQL // % -// Row 2 #define BP_B KC_Q // B #define BP_EACU KC_W // É #define BP_P KC_E // P @@ -60,7 +53,6 @@ #define BP_J KC_P // J #define BP_Z KC_LBRC // Z #define BP_W KC_RBRC // W -// Row 3 #define BP_A KC_A // A #define BP_U KC_S // U #define BP_I KC_D // I @@ -73,7 +65,6 @@ #define BP_N KC_SCLN // N #define BP_M KC_QUOT // M #define BP_CCED KC_BSLS // Ç -// Row 4 #define BP_ECIR KC_NUBS // Ê #define BP_AGRV KC_Z // À #define BP_Y KC_X // Y @@ -85,21 +76,6 @@ #define BP_G KC_COMM // G #define BP_H KC_DOT // H #define BP_F KC_SLSH // F - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ # │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ° │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ ! │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ ; │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ : │ │ ? │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define BP_HASH S(BP_DLR) // # #define BP_1 S(BP_DQUO) // 1 #define BP_2 S(BP_LDAQ) // 2 @@ -113,30 +89,11 @@ #define BP_0 S(BP_ASTR) // 0 #define BP_DEG S(BP_EQL) // ° #define BP_GRV S(BP_PERC) // ` -// Row 2 #define BP_EXLM S(BP_DCIR) // ! -// Row 3 #define BP_SCLN S(BP_COMM) // ; -// Row 4 #define BP_COLN S(BP_DOT) // : #define BP_QUES S(BP_QUOT) // ? -// Row 5 -#define BP_NBSP S(KC_SPC) // (non-breaking space) - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ – │ — │ < │ > │ [ │ ] │ ^ │ ± │ − │ ÷ │ × │ ≠ │ ‰ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ | │ ´ │ & │ Œ │ ` │ ¡ │ ˇ │ Ð │ / │ IJ │ Ə │ ˘ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Æ │ Ù │ ¨ │ € │ │ © │ Þ │ ẞ │ ® │ ~ │ ¯ │ ¸ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ \ │ { │ } │ … │ ~ │ ¿ │ ° │ │ † │ ˛ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ _ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +#define BP_NBSP S(KC_SPC) // (non-breaking space) #define BP_NDSH ALGR(BP_DLR) // – #define BP_MDSH ALGR(BP_DQUO) // — #define BP_LABK ALGR(BP_LDAQ) // < @@ -150,7 +107,6 @@ #define BP_MUL ALGR(BP_ASTR) // × #define BP_NEQL ALGR(BP_EQL) // ≠ #define BP_PERM ALGR(BP_PERC) // ‰ -// Row 2 #define BP_PIPE ALGR(BP_B) // | #define BP_ACUT ALGR(BP_EACU) // ´ (dead) #define BP_AMPR ALGR(BP_P) // & @@ -163,7 +119,6 @@ #define BP_IJ ALGR(BP_J) // IJ #define BP_SCHW ALGR(BP_Z) // Ə #define BP_BREV ALGR(BP_W) // ˘ (dead) -// Row 3 #define BP_AE ALGR(BP_A) // Æ #define BP_UGRV ALGR(BP_U) // Ù #define BP_DIAE ALGR(BP_I) // ¨ (dead) @@ -175,7 +130,6 @@ #define BP_DTIL ALGR(BP_N) // ~ (dead) #define BP_MACR ALGR(BP_M) // ¯ (dead) #define BP_CEDL ALGR(BP_CCED) // ¸ (dead) -// Row 4 #define BP_BSLS ALGR(BP_AGRV) // (backslash) #define BP_LCBR ALGR(BP_Y) // { #define BP_RCBR ALGR(BP_X) // } @@ -186,23 +140,7 @@ #define BP_DGRK ALGR(BP_G) // µ (dead Greek key) #define BP_DAGG ALGR(BP_H) // † #define BP_OGON ALGR(BP_F) // ˛ (dead) -// Row 5 #define BP_UNDS ALGR(KC_SPC) // _ - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¶ │ „ │ “ │ ” │ ≤ │ ≥ │ │ ¬ │ ¼ │ ½ │ ¾ │ ′ │ ″ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ ¦ │ ˝ │ § │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ ˙ │ ¤ │ ̛ │ ſ │ │ │ ™ │ │ º │ , │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ ‘ │ ’ │ · │ ⌨ │ ̉ │ ̣ │ │ ‡ │ ª │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define BP_PARA S(ALGR(BP_DLR)) // ¶ #define BP_DLQU S(ALGR(BP_DQUO)) // „ #define BP_LDQU S(ALGR(BP_LDAQ)) // “ @@ -215,26 +153,23 @@ #define BP_TQTR S(ALGR(BP_ASTR)) // ¾ #define BP_PRIM S(ALGR(BP_EQL)) // ′ #define BP_DPRM S(ALGR(BP_PERC)) // ″ -// Row 2 #define BP_BRKP S(ALGR(BP_B)) // ¦ #define BP_DACU S(ALGR(BP_EACU)) // ˝ (dead) #define BP_SECT S(ALGR(BP_P)) // § -// Row 3 #define BP_DOTA S(ALGR(BP_I)) // ˙ (dead) #define BP_CURR S(ALGR(BP_E)) // ¤ (dead) -#define BP_HORN S(ALGR(BP_COMM)) // ̛ (dead) +#define BP_HORN S(ALGR(BP_COMM)) // ̛ (dead) #define BP_LNGS S(ALGR(BP_C)) // ſ #define BP_TM S(ALGR(BP_R)) // ™ #define BP_MORD S(ALGR(BP_M)) // º #define BP_DCMM S(ALGR(BP_CCED)) // , (dead) -// Row 4 #define BP_LSQU S(ALGR(BP_Y)) // ‘ #define BP_RSQU S(ALGR(BP_X)) // ’ #define BP_MDDT S(ALGR(BP_DOT)) // · #define BP_KEYB S(ALGR(BP_K)) // ⌨ -#define BP_HOKA S(ALGR(BP_QUOT)) // ̉ (dead) -#define BP_DOTB S(ALGR(BP_Q)) // ̣ (dead) +#define BP_HOKA S(ALGR(BP_QUOT)) // ̉ (dead) +#define BP_DOTB S(ALGR(BP_Q)) // ̣ (dead) #define BP_DDAG S(ALGR(BP_H)) // ‡ #define BP_FORD S(ALGR(BP_F)) // ª -// Row 5 -#define BP_NNBS S(ALGR(KC_SPC)) // (narrow non-breaking space) +#define BP_NNBS S(ALGR(KC_SPC)) // (narrow non-breaking space) + diff --git a/quantum/keymap_extras/keymap_brazilian_abnt2.h b/quantum/keymap_extras/keymap_brazilian_abnt2.h index b5892183be..70a09a52be 100644 --- a/quantum/keymap_extras/keymap_brazilian_abnt2.h +++ b/quantum/keymap_extras/keymap_brazilian_abnt2.h @@ -1,39 +1,33 @@ -/* Copyright 2017 Potiguar Faga - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ' │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ´ │ [ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ç │ ~ │ ] │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * │ │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ ; │ / │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define BR_QUOT KC_GRV // ' #define BR_1 KC_1 // 1 #define BR_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define BR_0 KC_0 // 0 #define BR_MINS KC_MINS // - #define BR_EQL KC_EQL // = -// Row 2 #define BR_Q KC_Q // Q #define BR_W KC_W // W #define BR_E KC_E // E @@ -60,7 +53,6 @@ #define BR_P KC_P // P #define BR_ACUT KC_LBRC // ´ (dead) #define BR_LBRC KC_RBRC // [ -// Row 3 #define BR_A KC_A // A #define BR_S KC_S // S #define BR_D KC_D // D @@ -73,7 +65,6 @@ #define BR_CCED KC_SCLN // Ç #define BR_TILD KC_QUOT // ~ (dead) #define BR_RBRC KC_BSLS // ] -// Row 4 #define BR_BSLS KC_NUBS // (backslash) #define BR_Z KC_Z // Z #define BR_X KC_X // X @@ -86,24 +77,8 @@ #define BR_DOT KC_DOT // . #define BR_SCLN KC_SLSH // ; #define BR_SLSH KC_INT1 // / -// Numpad #define BR_PDOT KC_PCMM // . #define BR_PCMM KC_PDOT // , - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ " │ ! │ @ │ # │ $ │ % │ ¨ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ` │ { │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ ^ │ } │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * │ │ | │ │ │ │ │ │ │ │ < │ > │ : │ ? │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define BR_DQUO S(BR_QUOT) // " #define BR_EXLM S(BR_1) // ! #define BR_AT S(BR_2) // @ @@ -117,33 +92,15 @@ #define BR_RPRN S(BR_0) // ) #define BR_UNDS S(BR_MINS) // _ #define BR_PLUS S(BR_EQL) // + -// Row 2 #define BR_GRV S(BR_ACUT) // ` (dead) #define BR_LCBR S(BR_LBRC) // { -// Row 3 #define BR_CIRC S(BR_TILD) // ^ (dead) #define BR_RCBR S(BR_RBRC) // } -// Row 4 #define BR_PIPE S(BR_BSLS) // | #define BR_LABK S(BR_COMM) // < #define BR_RABK S(BR_DOT) // > #define BR_COLN S(BR_SCLN) // : #define BR_QUES S(BR_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ¹ │ ² │ ³ │ £ │ ¢ │ ¬ │ │ │ │ │ │ § │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ ° │ │ │ │ │ │ │ │ │ ª │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ º │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * │ │ │ │ │ ₢ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define BR_SUP1 ALGR(BR_1) // ¹ #define BR_SUP2 ALGR(BR_2) // ² #define BR_SUP3 ALGR(BR_3) // ³ @@ -151,10 +108,8 @@ #define BR_CENT ALGR(BR_5) // ¢ #define BR_NOT ALGR(BR_6) // ¬ #define BR_SECT ALGR(BR_EQL) // § -// Row 2 #define BR_DEG ALGR(BR_E) // ° #define BR_FORD ALGR(BR_LBRC) // ª -// Row 3 #define BR_MORD ALGR(BR_RBRC) // º -// Row 4 #define BR_CRUZ ALGR(BR_C) // ₢ + diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index e328cf65e6..44009f3aa2 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ / │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ^ │ Ç │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ È │ À │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ Ù │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ É │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define CA_SLSH KC_GRV // / #define CA_1 KC_1 // 1 #define CA_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define CA_0 KC_0 // 0 #define CA_MINS KC_MINS // - #define CA_EQL KC_EQL // = -// Row 2 #define CA_Q KC_Q // Q #define CA_W KC_W // W #define CA_E KC_E // E @@ -60,7 +53,6 @@ #define CA_P KC_P // P #define CA_CIRC KC_LBRC // ^ (dead) #define CA_CCED KC_RBRC // Ç -// Row 3 #define CA_A KC_A // A #define CA_S KC_S // S #define CA_D KC_D // D @@ -73,7 +65,6 @@ #define CA_SCLN KC_SCLN // ; #define CA_EGRV KC_QUOT // É #define CA_AGRV KC_NUHS // À -// Row 4 #define CA_UGRV KC_NUBS // Ù #define CA_Z KC_Z // Z #define CA_X KC_X // X @@ -85,21 +76,6 @@ #define CA_COMM KC_COMM // , #define CA_DOT KC_DOT // . #define CA_EACU KC_SLSH // É - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ \ │ ! │ @ │ # │ $ │ % │ ? │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ : │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ ' │ " │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CA_BSLS S(CA_SLSH) // (backslash) #define CA_EXLM S(CA_1) // ! #define CA_AT S(CA_2) // @ @@ -113,28 +89,10 @@ #define CA_RPRN S(CA_0) // ) #define CA_UNDS S(CA_MINS) // _ #define CA_PLUS S(CA_EQL) // + -// Row 2 #define CA_DIAE S(CA_CIRC) // ¨ (dead) -// Row 3 #define CA_COLN S(CA_SCLN) // : -// Row 4 #define CA_QUOT S(CA_COMM) // ' #define CA_DQUO S(CA_DOT) // " - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ | │ │ │ │ ¤ │ │ │ { │ } │ [ │ ] │ │ ¬ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ ` │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ ° │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ « │ » │ │ │ │ │ │ < │ > │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CA_PIPE ALGR(CA_SLSH) // | #define CA_CURR ALGR(CA_4) // ¤ #define CA_LCBR ALGR(CA_7) // { @@ -142,32 +100,14 @@ #define CA_LBRC ALGR(CA_9) // [ #define CA_RBRC ALGR(CA_0) // ] #define CA_NOT ALGR(CA_EQL) // ¬ -// Row 2 #define CA_EURO ALGR(CA_E) // € #define CA_GRV ALGR(CA_CIRC) // ` (dead) #define CA_DTIL ALGR(CA_CCED) // ~ (dead) -// Row 3 #define CA_DEG ALGR(CA_SCLN) // ° -// Row 4 #define CA_LDAQ ALGR(CA_Z) // « #define CA_RDAQ ALGR(CA_X) // » #define CA_LABK ALGR(CA_COMM) // < #define CA_RABK ALGR(CA_DOT) // > - -/* Right Ctrl symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ¹ │ ² │ ³ │ ¼ │ ½ │ ¾ │ │ │ │ │ │ ¸ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Ω │ Ł │ Œ │ ¶ │ Ŧ │ ← │ ↓ │ → │ Ø │ Þ │ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Æ │ ß │ Ð │ │ Ŋ │ Ħ │ IJ │ ĸ │ Ŀ │ ´ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ ¢ │ “ │ ” │ ʼn │ μ │ ― │ ˙ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CA_SUP1 RCTL(CA_1) // ¹ #define CA_SUP2 RCTL(CA_2) // ² #define CA_SUP3 RCTL(CA_3) // ³ @@ -175,7 +115,6 @@ #define CA_HALF RCTL(CA_5) // ½ #define CA_TQTR RCTL(CA_6) // ¾ #define CA_CEDL RCTL(CA_EQL) // ¸ (dead) -// Row 2 #define CA_OMEG RCTL(CA_Q) // Ω #define CA_LSTR RCTL(CA_W) // Ł #define CA_OE RCTL(CA_E) // Œ @@ -187,7 +126,6 @@ #define CA_OSTR RCTL(CA_O) // Ø #define CA_THRN RCTL(CA_P) // Þ #define CA_TILD RCTL(CA_CCED) // ~ -// Row 3 #define CA_AE RCTL(CA_A) // Æ #define CA_SS RCTL(CA_S) // ß #define CA_ETH RCTL(CA_D) // Ð @@ -197,7 +135,6 @@ #define CA_KRA RCTL(CA_K) // ĸ #define CA_LMDT RCTL(CA_L) // Ŀ #define CA_ACUT RCTL(CA_SCLN) // ´ (dead) -// Row 4 #define CA_CENT RCTL(CA_C) // ¢ #define CA_LDQU RCTL(CA_V) // “ #define CA_RDQU RCTL(CA_B) // ” @@ -205,21 +142,6 @@ #define CA_MICR RCTL(CA_M) // μ #define CA_HRZB RCTL(CA_COMM) // ― #define CA_DOTA RCTL(CA_DOT) // ˙ (dead) - -/* Shift+Right Ctrl symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ - │ ¡ │ │ £ │ │ ⅜ │ ⅝ │ ⅞ │ ™ │ ± │ │ ¿ │ ˛ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ ® │ │ ¥ │ ↑ │ ı │ │ │ ° │ ¯ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ § │ │ ª │ │ │ │ │ │ ˝ │ ˇ │ ˘ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ ¦ │ │ │ © │ ‘ │ ’ │ ♪ │ º │ × │ ÷ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CA_SHYP RCTL(S(CA_SLSH)) // (soft hyphen) #define CA_IEXL RCTL(S(CA_1)) // ¡ #define CA_PND RCTL(S(CA_3)) // £ @@ -230,20 +152,17 @@ #define CA_PLMN RCTL(S(CA_9)) // ± #define CA_IQUE RCTL(S(CA_MINS)) // ¿ #define CA_OGON RCTL(S(CA_EQL)) // ˛ (dead) -// Row 2 #define CA_REGD RCTL(S(CA_R)) // ® #define CA_YEN RCTL(S(CA_Y)) // ¥ #define CA_UARR RCTL(S(CA_U)) // ↑ #define CA_DLSI RCTL(S(CA_I)) // ı #define CA_RNGA RCTL(S(CA_CIRC)) // ° (dead) #define CA_MACR RCTL(S(CA_CCED)) // ¯ (dead) -// Row 3 #define CA_SECT RCTL(S(CA_S)) // § #define CA_FORD RCTL(S(CA_F)) // ª #define CA_DACU RCTL(S(CA_SCLN)) // ˝ (dead) #define CA_CARN RCTL(S(CA_EGRV)) // ˇ (dead) #define CA_BREV RCTL(S(CA_AGRV)) // ˘ (dead) -// Row 4 #define CA_BRKP RCTL(S(CA_UGRV)) // ¦ #define CA_COPY RCTL(S(CA_C)) // © #define CA_LSQU RCTL(S(CA_V)) // ‘ @@ -252,3 +171,4 @@ #define CA_MORD RCTL(S(CA_M)) // º #define CA_MUL RCTL(S(CA_COMM)) // × #define CA_DIV RCTL(S(CA_DOT)) // ÷ + diff --git a/quantum/keymap_extras/keymap_colemak.h b/quantum/keymap_extras/keymap_colemak.h index e7b5c97ccb..5cb86bf441 100644 --- a/quantum/keymap_extras/keymap_colemak.h +++ b/quantum/keymap_extras/keymap_colemak.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ ; │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ C │ V │ B │ K │ M │ , │ . │ / │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define CM_GRV KC_GRV // ` #define CM_1 KC_1 // 1 #define CM_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define CM_0 KC_0 // 0 #define CM_MINS KC_MINS // - #define CM_EQL KC_EQL // = -// Row 2 #define CM_Q KC_Q // Q #define CM_W KC_W // W #define CM_F KC_E // F @@ -61,7 +54,6 @@ #define CM_LBRC KC_LBRC // [ #define CM_RBRC KC_RBRC // ] #define CM_BSLS KC_BSLS // (backslash) -// Row 3 #define CM_A KC_A // A #define CM_R KC_S // R #define CM_S KC_D // S @@ -73,7 +65,6 @@ #define CM_I KC_L // I #define CM_O KC_SCLN // O #define CM_QUOT KC_QUOT // ' -// Row 4 #define CM_Z KC_Z // Z #define CM_X KC_X // X #define CM_C KC_C // C @@ -84,21 +75,6 @@ #define CM_COMM KC_COMM // , #define CM_DOT KC_DOT // . #define CM_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CM_TILD S(CM_GRV) // ~ #define CM_EXLM S(CM_1) // ! #define CM_AT S(CM_2) // @ @@ -112,14 +88,12 @@ #define CM_RPRN S(CM_0) // ) #define CM_UNDS S(CM_MINS) // _ #define CM_PLUS S(CM_EQL) // + -// Row 2 #define CM_COLN S(CM_SCLN) // : #define CM_LCBR S(CM_LBRC) // { #define CM_RCBR S(CM_RBRC) // } #define CM_PIPE S(CM_BSLS) // | -// Row 3 #define CM_DQUO S(CM_QUOT) // " -// Row 4 #define CM_LABK S(CM_COMM) // < #define CM_RABK S(CM_DOT) // > #define CM_QUES S(CM_SLSH) // ? + diff --git a/quantum/keymap_extras/keymap_croatian.h b/quantum/keymap_extras/keymap_croatian.h index e67b99a9a2..1115592e17 100644 --- a/quantum/keymap_extras/keymap_croatian.h +++ b/quantum/keymap_extras/keymap_croatian.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¸ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Š │ Đ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Č │ Ć │ Ž │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define HR_CEDL KC_GRV // ¸ (dead) #define HR_1 KC_1 // 1 #define HR_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define HR_0 KC_0 // 0 #define HR_QUOT KC_MINS // ' #define HR_PLUS KC_EQL // + -// Row 2 #define HR_Q KC_Q // Q #define HR_W KC_W // W #define HR_E KC_E // E @@ -60,7 +53,6 @@ #define HR_P KC_P // P #define HR_SCAR KC_LBRC // Š #define HR_DSTR KC_RBRC // Đ -// Row 3 #define HR_A KC_A // A #define HR_S KC_S // S #define HR_D KC_D // D @@ -73,7 +65,6 @@ #define HR_CCAR KC_SCLN // Č #define HR_CACU KC_QUOT // Ć #define HR_ZCAR KC_NUHS // Ž -// Row 4 #define HR_LABK KC_NUBS // < #define HR_Y KC_Z // Y #define HR_X KC_X // X @@ -85,21 +76,6 @@ #define HR_COMM KC_COMM // , #define HR_DOT KC_DOT // . #define HR_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¨ │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ * │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define HR_DIAE S(HR_CEDL) // ¨ (dead) #define HR_EXLM S(HR_1) // ! #define HR_DQUO S(HR_2) // " @@ -113,26 +89,10 @@ #define HR_EQL S(HR_0) // = #define HR_QUES S(HR_QUOT) // ? #define HR_ASTR S(HR_PLUS) // * -// Row 4 #define HR_RABK S(HR_LABK) // > #define HR_SCLN S(HR_COMM) // ; #define HR_COLN S(HR_DOT) // : #define HR_UNDS S(HR_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ~ │ ˇ │ ^ │ ˘ │ ° │ ˛ │ ` │ ˙ │ ´ │ ˝ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ \ │ | │ € │ │ │ │ │ │ │ │ ÷ │ × │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ [ │ ] │ │ │ ł │ Ł │ │ ß │ ¤ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ @ │ { │ } │ § │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define HR_TILD ALGR(HR_1) // ~ #define HR_CARN ALGR(HR_2) // ˇ (dead) #define HR_CIRC ALGR(HR_3) // ^ (dead) @@ -143,21 +103,19 @@ #define HR_DOTA ALGR(HR_8) // ˙ (dead) #define HR_ACUT ALGR(HR_9) // ´ (dead) #define HR_DACU ALGR(HR_0) // ˝ (dead) -// Row 2 #define HR_BSLS ALGR(HR_Q) // (backslash) #define HR_PIPE ALGR(HR_W) // | #define HR_EURO ALGR(HR_E) // € #define HR_DIV ALGR(HR_SCAR) // ÷ #define HR_MUL ALGR(HR_DSTR) // × -// Row 3 #define HR_LBRC ALGR(HR_F) // [ #define HR_RBRC ALGR(HR_G) // ] #define HR_LLST ALGR(HR_K) // ł #define HR_CLST ALGR(HR_L) // Ł #define HR_SS ALGR(HR_CACU) // ß #define HR_CURR ALGR(HR_ZCAR) // ¤ -// Row 4 #define HR_AT ALGR(HR_V) // @ #define HR_LCBR ALGR(HR_B) // { #define HR_RCBR ALGR(HR_N) // } #define HR_SECT ALGR(HR_M) // § + diff --git a/quantum/keymap_extras/keymap_czech.h b/quantum/keymap_extras/keymap_czech.h index a8f522d31c..02692002e3 100644 --- a/quantum/keymap_extras/keymap_czech.h +++ b/quantum/keymap_extras/keymap_czech.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ; │ + │ ě │ š │ č │ ř │ ž │ ý │ á │ í │ é │ = │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ ú │ ) │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ů │ § │ ¨ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ \ │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define CZ_SCLN KC_GRV // ; #define CZ_PLUS KC_1 // + #define CZ_ECAR KC_2 // ě @@ -47,7 +41,6 @@ #define CZ_EACU KC_0 // é #define CZ_EQL KC_MINS // = #define CZ_ACUT KC_EQL // ´ (dead) -// Row 2 #define CZ_Q KC_Q // Q #define CZ_W KC_W // W #define CZ_E KC_E // E @@ -60,7 +53,6 @@ #define CZ_P KC_P // P #define CZ_UACU KC_LBRC // ú #define CZ_RPRN KC_RBRC // ) -// Row 3 #define CZ_A KC_A // A #define CZ_S KC_S // S #define CZ_D KC_D // D @@ -73,7 +65,6 @@ #define CZ_URNG KC_SCLN // ů #define CZ_SECT KC_QUOT // § #define CZ_DIAE KC_NUHS // ¨ (dead) -// Row 4 #define CZ_BSLS KC_NUBS // (backslash) #define CZ_Y KC_Z // Y #define CZ_X KC_X // X @@ -85,21 +76,6 @@ #define CZ_COMM KC_COMM // , #define CZ_DOT KC_DOT // . #define CZ_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ° │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ % │ ˇ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ / │ ( │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ " │ ! │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ | │ │ │ │ │ │ │ │ ? │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CZ_RNGA S(CZ_SCLN) // ° (dead) #define CZ_1 S(CZ_PLUS) // 1 #define CZ_2 S(CZ_ECAR) // 2 @@ -113,33 +89,15 @@ #define CZ_0 S(CZ_EACU) // 0 #define CZ_PERC S(CZ_EQL) // % #define CZ_CARN S(CZ_ACUT) // ˇ (dead) -// Row 2 #define CZ_SLSH S(CZ_UACU) // / #define CZ_LPRN S(CZ_RPRN) // ( -// Row 3 #define CZ_DQUO S(CZ_URNG) // " #define CZ_EXLM S(CZ_SECT) // ! #define CZ_QUOT S(CZ_DIAE) // ' -// Row 4 #define CZ_PIPE S(CZ_BSLS) // | #define CZ_QUES S(CZ_COMM) // ? #define CZ_COLN S(CZ_DOT) // : #define CZ_UNDS S(CZ_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ~ │ │ ^ │ ˘ │ │ ˛ │ ` │ ˙ │ │ ˝ │ │ ¸ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ ÷ │ × │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ đ │ Đ │ [ │ ] │ │ │ ł │ Ł │ $ │ ß │ ¤ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ # │ & │ @ │ { │ } │ │ < │ > │ * │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CZ_TILD ALGR(CZ_PLUS) // ~ #define CZ_CIRC ALGR(CZ_SCAR) // ^ (dead) #define CZ_BREV ALGR(CZ_CCAR) // ˘ (dead) @@ -148,11 +106,9 @@ #define CZ_DOTA ALGR(CZ_AACU) // ˙ (dead) #define CZ_DACU ALGR(CZ_EACU) // ˝ (dead) #define CZ_CEDL ALGR(CZ_ACUT) // ¸ (dead) -// Row 2 #define CZ_EURO ALGR(CZ_E) // € #define CZ_DIV ALGR(CZ_UACU) // ÷ #define CZ_MUL ALGR(CZ_RPRN) // × -// Row 3 #define CZ_LDST ALGR(CZ_S) // đ #define CZ_CDST ALGR(CZ_D) // Đ #define CZ_LBRC ALGR(CZ_F) // [ @@ -162,7 +118,6 @@ #define CZ_DLR ALGR(CZ_URNG) // $ #define CZ_SS ALGR(CZ_SECT) // ß #define CZ_CURR ALGR(CZ_DIAE) // ¤ -// Row 4 #define CZ_HASH ALGR(CZ_X) // # #define CZ_AMPR ALGR(CZ_C) // & #define CZ_AT ALGR(CZ_V) // @ @@ -171,3 +126,4 @@ #define CZ_LABK ALGR(CZ_COMM) // < #define CZ_RABK ALGR(CZ_DOT) // > #define CZ_ASTR ALGR(CZ_MINS) // * + diff --git a/quantum/keymap_extras/keymap_danish.h b/quantum/keymap_extras/keymap_danish.h index 9cf688d6f5..18107ccd53 100644 --- a/quantum/keymap_extras/keymap_danish.h +++ b/quantum/keymap_extras/keymap_danish.h @@ -1,39 +1,33 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ½ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Æ │ Ø │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define DK_HALF KC_GRV // ½ #define DK_1 KC_1 // 1 #define DK_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define DK_0 KC_0 // 0 #define DK_PLUS KC_MINS // + #define DK_ACUT KC_EQL // ´ (dead) -// Row 2 #define DK_Q KC_Q // Q #define DK_W KC_W // W #define DK_E KC_E // E @@ -60,7 +53,6 @@ #define DK_P KC_P // P #define DK_ARNG KC_LBRC // Å #define DK_DIAE KC_RBRC // ¨ (dead) -// Row 3 #define DK_A KC_A // A #define DK_S KC_S // S #define DK_D KC_D // D @@ -73,7 +65,6 @@ #define DK_AE KC_SCLN // Æ #define DK_OSTR KC_QUOT // Ø #define DK_QUOT KC_NUHS // ' -// Row 4 #define DK_LABK KC_NUBS // < #define DK_Z KC_Z // Z #define DK_X KC_X // X @@ -85,21 +76,6 @@ #define DK_COMM KC_COMM // , #define DK_DOT KC_DOT // . #define DK_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ § │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define DK_SECT S(DK_HALF) // § #define DK_EXLM S(DK_1) // ! #define DK_DQUO S(DK_2) // " @@ -113,30 +89,12 @@ #define DK_EQL S(DK_0) // = #define DK_QUES S(DK_PLUS) // ? #define DK_GRV S(DK_ACUT) // ` (dead) -// Row 2 #define DK_CIRC S(DK_DIAE) // ^ (dead) -// Row 3 #define DK_ASTR S(DK_QUOT) // * -// Row 4 #define DK_RABK S(DK_LABK) // > #define DK_SCLN S(DK_COMM) // ; #define DK_COLN S(DK_DOT) // : #define DK_UNDS S(DK_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ @ │ £ │ $ │ € │ │ { │ [ │ ] │ } │ │ | │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ \ │ │ │ │ │ │ │ µ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define DK_AT ALGR(DK_2) // @ #define DK_PND ALGR(DK_3) // £ #define DK_DLR ALGR(DK_4) // $ @@ -146,8 +104,7 @@ #define DK_RBRC ALGR(DK_9) // ] #define DK_RCBR ALGR(DK_0) // } #define DK_PIPE ALGR(DK_ACUT) // | -// Row 2 #define DK_TILD ALGR(DK_DIAE) // ~ (dead) -// Row 4 #define DK_BSLS ALGR(DK_LABK) // (backslash) #define DK_MICR ALGR(DK_M) // µ + diff --git a/quantum/keymap_extras/keymap_dvorak.h b/quantum/keymap_extras/keymap_dvorak.h index 7aa112ebcc..5767530b3b 100644 --- a/quantum/keymap_extras/keymap_dvorak.h +++ b/quantum/keymap_extras/keymap_dvorak.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ [ │ ] │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ ' │ , │ . │ P │ Y │ F │ G │ C │ R │ L │ / │ = │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ - │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ ; │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define DV_GRV KC_GRV // ` #define DV_1 KC_1 // 1 #define DV_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define DV_0 KC_0 // 0 #define DV_LBRC KC_MINS // [ #define DV_RBRC KC_EQL // ] -// Row 2 #define DV_QUOT KC_Q // ' #define DV_COMM KC_W // , #define DV_DOT KC_E // . @@ -61,7 +54,6 @@ #define DV_SLSH KC_LBRC // / #define DV_EQL KC_RBRC // = #define DV_BSLS KC_BSLS // (backslash) -// Row 3 #define DV_A KC_A // A #define DV_O KC_S // O #define DV_E KC_D // E @@ -73,7 +65,6 @@ #define DV_N KC_L // N #define DV_S KC_SCLN // S #define DV_MINS KC_QUOT // - -// Row 4 #define DV_SCLN KC_Z // ; #define DV_Q KC_X // Q #define DV_J KC_C // J @@ -84,21 +75,6 @@ #define DV_W KC_COMM // W #define DV_V KC_DOT // V #define DV_Z KC_SLSH // Z - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ { │ } │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ " │ < │ > │ │ │ │ │ │ │ │ ? │ + │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ _ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ : │ │ │ │ │ │ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define DV_TILD S(DV_GRV) // ~ #define DV_EXLM S(DV_1) // ! #define DV_AT S(DV_2) // @ @@ -112,14 +88,12 @@ #define DV_RPRN S(DV_0) // ) #define DV_LCBR S(DV_LBRC) // { #define DV_RCBR S(DV_RBRC) // } -// Row 2 #define DV_DQUO S(DV_QUOT) // " #define DV_LABK S(DV_COMM) // < #define DV_RABK S(DV_DOT) // > #define DV_QUES S(DV_SLSH) // ? #define DV_PLUS S(DV_EQL) // + #define DV_PIPE S(DV_BSLS) // | -// Row 3 #define DV_UNDS S(DV_MINS) // _ -// Row 4 #define DV_COLN S(DV_SCLN) // : + diff --git a/quantum/keymap_extras/keymap_dvorak_fr.h b/quantum/keymap_extras/keymap_dvorak_fr.h index 2dee8e32e7..60675fbf13 100644 --- a/quantum/keymap_extras/keymap_dvorak_fr.h +++ b/quantum/keymap_extras/keymap_dvorak_fr.h @@ -1,47 +1,33 @@ -/* Copyright 2020 Guillaume Gérard - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -/* Dvorak for the French language - * Version: 2 - * - * The layout is designed by Francis Leboutte <dvorak-fr@algo.be> - * - * Source: https://algo.be/ergo/dvorak-fr.html - */ +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ #pragma once - #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ « │ » │ / │ - │ è │ \ │ ^ │ ( │ ` │ ) │ _ │ [ │ ] │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ : │ ' │ é │ G │ . │ H │ V │ C │ M │ K │ Z │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ O │ A │ U │ E │ B │ F │ S │ T │ N │ D │ W │ ~ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ à │ ; │ Q │ , │ I │ Y │ X │ R │ L │ P │ J │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define DV_LDAQ KC_GRV // « #define DV_RDAQ KC_1 // » #define DV_SLSH KC_2 // / @@ -55,7 +41,6 @@ #define DV_UNDS KC_0 // _ #define DV_LBRC KC_MINS // [ #define DV_RBRC KC_EQL // ] -// Row 2 #define DV_COLN KC_Q // : #define DV_QUOT KC_W // ' #define DV_EACU KC_E // é @@ -68,7 +53,6 @@ #define DV_K KC_P // K #define DV_Z KC_LBRC // Z #define DV_DIAE KC_RBRC // ¨ (dead) -// Row 3 #define DV_O KC_A // O #define DV_A KC_S // A #define DV_U KC_D // U @@ -81,7 +65,6 @@ #define DV_D KC_SCLN // D #define DV_W KC_QUOT // W #define DV_TILD KC_NUHS // ~ (dead) -// Row 4 #define DV_AGRV KC_NUBS // à #define DV_SCLN KC_Z // ; #define DV_Q KC_X // Q @@ -93,21 +76,6 @@ #define DV_L KC_COMM // L #define DV_P KC_DOT // P #define DV_J KC_SLSH // J - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ * │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 0 │ 0 │ + │ % │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ ? │ < │ > │ │ ! │ │ │ │ │ │ │ = │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ # │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ ç │ | │ │ @ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define DV_ASTR S(DV_LDAQ) // * #define DV_1 S(DV_RDAQ) // 1 #define DV_2 S(DV_SLSH) // 2 @@ -121,15 +89,13 @@ #define DV_0 S(DV_UNDS) // 0 #define DV_PLUS S(DV_LBRC) // + #define DV_PERC S(DV_RBRC) // % -// Row 2 #define DV_QUES S(DV_COLN) // ? #define DV_LABK S(DV_QUOT) // < #define DV_RABK S(DV_EACU) // > #define DV_EXLM S(DV_DOT) // ! #define DV_EQL S(DV_DIAE) // = -// Row 3 #define DV_HASH S(DV_TILD) // # -// Row 4 #define DV_CCED S(DV_AGRV) // ç #define DV_PIPE S(DV_SCLN) // | #define DV_AT S(DV_COMM) // @ + diff --git a/quantum/keymap_extras/keymap_dvorak_programmer.h b/quantum/keymap_extras/keymap_dvorak_programmer.h index 6de7033cb4..6e1ae17807 100644 --- a/quantum/keymap_extras/keymap_dvorak_programmer.h +++ b/quantum/keymap_extras/keymap_dvorak_programmer.h @@ -1,39 +1,33 @@ -/* Copyright 2016 Artyom Mironov - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ $ │ & │ [ │ { │ } │ ( │ = │ * │ ) │ + │ ] │ ! │ # │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ ; │ , │ . │ P │ Y │ F │ G │ C │ R │ L │ / │ @ │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ - │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ ' │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define DP_DLR KC_GRV // $ #define DP_AMPR KC_1 // & #define DP_LBRC KC_2 // [ @@ -47,7 +41,6 @@ #define DP_RBRC KC_0 // ] #define DP_EXLM KC_MINS // ! #define DP_HASH KC_EQL // # -// Row 2 #define DP_SCLN KC_Q // ; #define DP_COMM KC_W // , #define DP_DOT KC_E // . @@ -61,7 +54,6 @@ #define DP_SLSH KC_LBRC // / #define DP_AT KC_RBRC // @ #define DP_BSLS KC_BSLS // (backslash) -// Row 3 #define DP_A KC_A // A #define DP_O KC_S // O #define DP_E KC_D // E @@ -73,7 +65,6 @@ #define DP_N KC_L // N #define DP_S KC_SCLN // S #define DP_MINS KC_QUOT // - -// Row 4 #define DP_QUOT KC_Z // ' #define DP_Q KC_X // Q #define DP_J KC_C // J @@ -84,21 +75,6 @@ #define DP_W KC_COMM // W #define DP_V KC_DOT // V #define DP_Z KC_SLSH // Z - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ % │ 7 │ 5 │ 3 │ 1 │ 9 │ 0 │ 2 │ 4 │ 6 │ 8 │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ : │ < │ > │ │ │ │ │ │ │ │ ? │ ^ │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ _ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ " │ │ │ │ │ │ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define DP_TILD S(DP_DLR) // ~ #define DP_PERC S(DP_AMPR) // % #define DP_7 S(DP_LBRC) // 7 @@ -112,14 +88,12 @@ #define DP_6 S(DP_RBRC) // 6 #define DP_8 S(DP_EXLM) // 8 #define DP_GRV S(DP_HASH) // ` -// Row 2 #define DP_COLN S(DP_SCLN) // : #define DP_LABK S(DP_COMM) // < #define DP_RABK S(DP_DOT) // > #define DP_QUES S(DP_SLSH) // ? #define DP_CIRC S(DP_AT) // ^ #define DP_PIPE S(DP_BSLS) // | -// Row 3 #define DP_UNDS S(DP_MINS) // _ -// Row 4 #define DP_DQUO S(DP_QUOT) // " + diff --git a/quantum/keymap_extras/keymap_estonian.h b/quantum/keymap_extras/keymap_estonian.h index 6951baed5a..462bcde429 100644 --- a/quantum/keymap_extras/keymap_estonian.h +++ b/quantum/keymap_extras/keymap_estonian.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ˇ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Ü │ Õ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define EE_CARN KC_GRV // ˇ (dead) #define EE_1 KC_1 // 1 #define EE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define EE_0 KC_0 // 0 #define EE_PLUS KC_MINS // + #define EE_ACUT KC_EQL // ´ (dead) -// Row 2 #define EE_Q KC_Q // Q #define EE_W KC_W // W #define EE_E KC_E // E @@ -60,7 +53,6 @@ #define EE_P KC_P // P #define EE_UDIA KC_LBRC // Ü #define EE_OTIL KC_RBRC // Õ -// Row 3 #define EE_A KC_A // A #define EE_S KC_S // S #define EE_D KC_D // D @@ -73,7 +65,6 @@ #define EE_ODIA KC_SCLN // Ö #define EE_ADIA KC_QUOT // Ä #define EE_QUOT KC_NUHS // ' -// Row 4 #define EE_LABK KC_NUBS // < #define EE_Z KC_Z // Z #define EE_X KC_X // X @@ -85,21 +76,6 @@ #define EE_COMM KC_COMM // , #define EE_DOT KC_DOT // . #define EE_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define EE_TILD S(EE_CARN) // ~ (dead) #define EE_EXLM S(EE_1) // ! #define EE_DQUO S(EE_2) // " @@ -113,28 +89,11 @@ #define EE_EQL S(EE_0) // = #define EE_QUES S(EE_PLUS) // ? #define EE_GRV S(EE_ACUT) // ` (dead) -// Row 3 #define EE_ASTR S(EE_QUOT) // * -// Row 4 #define EE_RABK S(EE_LABK) // > #define EE_SCLN S(EE_COMM) // ; #define EE_COLN S(EE_DOT) // : #define EE_UNDS S(EE_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ @ │ £ │ $ │ € │ │ { │ [ │ ] │ } │ \ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ § │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ š │ │ │ │ │ │ │ │ │ ^ │ ½ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ | │ ž │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define EE_AT ALGR(EE_2) // @ #define EE_PND ALGR(EE_3) // £ #define EE_DLR ALGR(EE_4) // $ @@ -144,12 +103,10 @@ #define EE_RBRC ALGR(EE_9) // ] #define EE_RCBR ALGR(EE_0) // } #define EE_BSLS ALGR(EE_PLUS) // (backslash) -// Row 2 #define EE_SECT ALGR(EE_OTIL) // § -// Row 3 #define EE_SCAR ALGR(EE_S) // š #define EE_CIRC ALGR(EE_ADIA) // ^ (dead) #define EE_HALF ALGR(EE_QUOT) // ½ -// Row 4 #define EE_PIPE ALGR(EE_LABK) // | #define EE_ZCAR ALGR(EE_Z) // ž + diff --git a/quantum/keymap_extras/keymap_finnish.h b/quantum/keymap_extras/keymap_finnish.h index faca4e01d4..7e94896e2e 100644 --- a/quantum/keymap_extras/keymap_finnish.h +++ b/quantum/keymap_extras/keymap_finnish.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define FI_SECT KC_GRV // § #define FI_1 KC_1 // 1 #define FI_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define FI_0 KC_0 // 0 #define FI_PLUS KC_MINS // + #define FI_ACUT KC_EQL // ´ (dead) -// Row 2 #define FI_Q KC_Q // Q #define FI_W KC_W // W #define FI_E KC_E // E @@ -60,7 +53,6 @@ #define FI_P KC_P // P #define FI_ARNG KC_LBRC // Å #define FI_DIAE KC_RBRC // ¨ (dead) -// Row 3 #define FI_A KC_A // A #define FI_S KC_S // S #define FI_D KC_D // D @@ -73,7 +65,6 @@ #define FI_ODIA KC_SCLN // Ö #define FI_ADIA KC_QUOT // Ä #define FI_QUOT KC_NUHS // ' -// Row 4 #define FI_LABK KC_NUBS // < #define FI_Z KC_Z // Z #define FI_X KC_X // X @@ -85,21 +76,6 @@ #define FI_COMM KC_COMM // , #define FI_DOT KC_DOT // . #define FI_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ½ │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define FI_HALF S(FI_SECT) // ½ #define FI_EXLM S(FI_1) // ! #define FI_DQUO S(FI_2) // " @@ -113,30 +89,12 @@ #define FI_EQL S(FI_0) // = #define FI_QUES S(FI_PLUS) // ? #define FI_GRV S(FI_ACUT) // ` (dead) -// Row 2 #define FI_CIRC S(FI_DIAE) // ^ (dead) -// Row 3 #define FI_ASTR S(FI_QUOT) // * -// Row 4 #define FI_RABK S(FI_LABK) // > #define FI_SCLN S(FI_COMM) // ; #define FI_COLN S(FI_DOT) // : #define FI_UNDS S(FI_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ @ │ £ │ $ │ € │ │ { │ [ │ ] │ } │ \ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ | │ │ │ │ │ │ │ µ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define FI_AT ALGR(FI_2) // @ #define FI_PND ALGR(FI_3) // £ #define FI_DLR ALGR(FI_4) // $ @@ -146,8 +104,7 @@ #define FI_RBRC ALGR(FI_9) // ] #define FI_RCBR ALGR(FI_0) // } #define FI_BSLS ALGR(FI_PLUS) // (backslash) -// Row 2 #define FI_TILD ALGR(FI_DIAE) // ~ (dead) -// Row 4 #define FI_PIPE ALGR(FI_LABK) // | #define FI_MICR ALGR(FI_M) // µ + diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index 0be53f0a9c..da9467a475 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ² │ & │ é │ " │ ' │ ( │ - │ è │ _ │ ç │ à │ ) │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ A │ Z │ E │ R │ T │ Y │ U │ I │ O │ P │ ^ │ $ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Q │ S │ D │ F │ G │ H │ J │ K │ L │ M │ ù │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ W │ X │ C │ V │ B │ N │ , │ ; │ : │ ! │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define FR_SUP2 KC_GRV // ² #define FR_AMPR KC_1 // & #define FR_EACU KC_2 // é @@ -47,7 +41,6 @@ #define FR_AGRV KC_0 // à #define FR_RPRN KC_MINS // ) #define FR_EQL KC_EQL // = -// Row 2 #define FR_A KC_Q // A #define FR_Z KC_W // Z #define FR_E KC_E // E @@ -60,7 +53,6 @@ #define FR_P KC_P // P #define FR_CIRC KC_LBRC // ^ (dead) #define FR_DLR KC_RBRC // $ -// Row 3 #define FR_Q KC_A // Q #define FR_S KC_S // S #define FR_D KC_D // D @@ -73,7 +65,6 @@ #define FR_M KC_SCLN // M #define FR_UGRV KC_QUOT // ù #define FR_ASTR KC_NUHS // * -// Row 4 #define FR_LABK KC_NUBS // < #define FR_W KC_Z // W #define FR_X KC_X // X @@ -85,21 +76,6 @@ #define FR_SCLN KC_COMM // ; #define FR_COLN KC_DOT // : #define FR_EXLM KC_SLSH // ! - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ° │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ £ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ % │ µ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ ? │ . │ / │ § │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define FR_1 S(FR_AMPR) // 1 #define FR_2 S(FR_EACU) // 2 #define FR_3 S(FR_DQUO) // 3 @@ -112,33 +88,15 @@ #define FR_0 S(FR_AGRV) // 0 #define FR_DEG S(FR_RPRN) // ° #define FR_PLUS S(FR_EQL) // + -// Row 2 #define FR_DIAE S(FR_CIRC) // ¨ (dead) #define FR_PND S(FR_DLR) // £ -// Row 3 #define FR_PERC S(FR_UGRV) // % #define FR_MICR S(FR_ASTR) // µ -// Row 4 #define FR_RABK S(FR_LABK) // > #define FR_QUES S(FR_COMM) // ? #define FR_DOT S(FR_SCLN) // . #define FR_SLSH S(FR_COLN) // / #define FR_SECT S(FR_EXLM) // § - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ ~ │ # │ { │ [ │ | │ ` │ \ │ │ @ │ ] │ } │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ │ ¤ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define FR_TILD ALGR(FR_EACU) // ~ (dead) #define FR_HASH ALGR(FR_DQUO) // # #define FR_LCBR ALGR(FR_QUOT) // { @@ -149,6 +107,6 @@ #define FR_AT ALGR(FR_AGRV) // @ #define FR_RBRC ALGR(FR_RPRN) // ] #define FR_RCBR ALGR(FR_EQL) // } -// Row 2 -#define FR_EURO ALGR(KC_E) // € -#define FR_CURR ALGR(FR_DLR) // ¤ +#define FR_EURO ALGR(KC_E) // € +#define FR_CURR ALGR(FR_DLR) // ¤ + diff --git a/quantum/keymap_extras/keymap_french_afnor.h b/quantum/keymap_extras/keymap_french_afnor.h index 4b7961724f..259e0a30f4 100644 --- a/quantum/keymap_extras/keymap_french_afnor.h +++ b/quantum/keymap_extras/keymap_french_afnor.h @@ -1,63 +1,33 @@ -/* Copyright 2020 Guillaume Gérard - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -/* French AZERTY - AFNOR NF Z71-300 - * - * A standard for the French keyboard - * - * The project was launched at the end of 2015 on the proposal of the General - * Delegation for the French language and the languages of France (Ministry - * of Culture), starting from the observation that the current "azerty" - * keyboards constrain the writing of French, languages regional and European - * languages with Latin alphabet. - * - * For the first time, a standard (NF Z71-300) defines the placement of - * characters on the French keyboard. It offers two layouts, one of which - * closely follows the QWERTY keyboard used by most people who write in French. - * - * However, it is in many ways superior to the old keyboard: - * - * - it contains all the characters required to enter text in French (for example É, œ and ") - * - it is designed to be more ergonomic and allow faster typing - * - it includes almost 60 additional characters for entering foreign languages, technical content, etc - * - however, the characters remain easy to locate thanks to intuitive groupings - * - * Source: https://norme-azerty.fr - */ +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ #pragma once - #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ @ │ à │ é │ è │ ê │ ( │ ) │ ‘ │ ’ │ « │ » │ ' │ ^ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ A │ Z │ E │ R │ T │ Y │ U │ I │ O │ P │ - │ + │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Q │ S │ D │ F │ G │ H │ J │ K │ L │ M │ / │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ W │ X │ C │ V │ B │ N │ . │ , │ : │ ; │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define FR_AT KC_GRV // @ #define FR_AGRV KC_1 // à #define FR_EACU KC_2 // é @@ -71,7 +41,6 @@ #define FR_RDAQ KC_0 // » #define FR_QUOT KC_MINS // ' #define FR_DCIR KC_EQL // ^ (dead) -// Row 2 #define FR_A KC_Q // A #define FR_Z KC_W // Z #define FR_E KC_E // E @@ -84,7 +53,6 @@ #define FR_P KC_P // P #define FR_MINS KC_LBRC // - #define FR_PLUS KC_RBRC // + -// Row 3 #define FR_Q KC_A // Q #define FR_S KC_S // S #define FR_D KC_D // D @@ -97,7 +65,6 @@ #define FR_M KC_SCLN // M #define FR_SLSH KC_QUOT // / #define FR_ASTR KC_NUHS // * -// Row 4 #define FR_LABK KC_NUBS // < #define FR_W KC_Z // W #define FR_X KC_X // X @@ -109,21 +76,6 @@ #define FR_COMM KC_COMM // , #define FR_COLN KC_DOT // : #define FR_SCLN KC_SLSH // ; - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ # │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ " │ ¨ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ – │ ± │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ \ │ ½ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ ? │ ! │ … │ = │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define FR_HASH S(FR_AT) // # #define FR_1 S(FR_AGRV) // 1 #define FR_2 S(FR_EACU) // 2 @@ -137,33 +89,15 @@ #define FR_0 S(FR_RDAQ) // 0 #define FR_DQUO S(FR_QUOT) // " #define FR_DIAE S(FR_DCIR) // ¨ (dead) -// Row 2 #define FR_NDSH S(FR_MINS) // – #define FR_PLMN S(FR_PLUS) // ± -// Row 3 #define FR_BSLS S(FR_SLSH) // (backslash) #define FR_HALF S(FR_ASTR) // ½ -// Row 4 #define FR_RABK S(FR_LABK) // > #define FR_QUES S(FR_DOT) // ? #define FR_EXLM S(FR_COMM) // ! #define FR_ELLP S(FR_COLN) // … #define FR_EQL S(FR_SCLN) // = - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ˘ │ § │ ´ │ ` │ & │ [ │ ] │ ¯ │ _ │ “ │ ” │ ° │ ˇ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ æ │ £ │ € │ ® │ { │ } │ ù │ ˙ │ œ │ % │ − │ † │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ θ │ ß │ $ │ ¤ │ µ │ Eu│ │ ∕ │ | │ ∞ │ ÷ │ × │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ ≤ │ ʒ │ © │ ç │ ¸ │ − │ ~ │ ¿ │ ¡ │ · │ ≃ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define FR_BREV ALGR(FR_AT) // ˘ (dead) #define FR_SECT ALGR(FR_AGRV) // § #define FR_ACUT ALGR(FR_EACU) // ´ (dead) @@ -177,7 +111,6 @@ #define FR_RDQU ALGR(FR_RDAQ) // ” #define FR_DEG ALGR(FR_QUOT) // ° #define FR_CARN ALGR(FR_DCIR) // ˇ (dead) -// Row 2 #define FR_AE ALGR(FR_A) // æ #define FR_PND ALGR(FR_Z) // £ #define FR_EURO ALGR(FR_E) // € @@ -190,7 +123,6 @@ #define FR_PERC ALGR(FR_P) // % #define FR_MMNS ALGR(FR_MINS) // − #define FR_DAGG ALGR(FR_PLUS) // † -// Row 3 #define FR_THET ALGR(FR_Q) // θ #define FR_SS ALGR(FR_S) // ß #define FR_DLR ALGR(FR_D) // $ @@ -202,7 +134,6 @@ #define FR_INFN ALGR(FR_M) // ∞ #define FR_DIV ALGR(FR_SLSH) // ÷ #define FR_MUL ALGR(FR_ASTR) // × -// Row 4 #define FR_LEQL ALGR(FR_LABK) // ≤ #define FR_EZH ALGR(FR_W) // ʒ #define FR_COPY ALGR(FR_X) // © @@ -214,40 +145,23 @@ #define FR_IEXL ALGR(FR_COMM) // ¡ #define FR_MDDT ALGR(FR_COLN) // · #define FR_AEQL ALGR(FR_SCLN) // ≃ - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ̑ │ │ │ │ │ ˝ │ ̏ │ │ — │ ‹ │ › │ ˚ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ ™ │ │ │ ̣ │ │ ‰ │ ‑ │ ‡ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ ˍ │ │ │ │ │ √ │ ¼ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ ≥ │ │ │ │ ˛ │ │ │ │ ̦ │ │ ≠ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 -#define FR_IBRV S(ALGR(FR_AT)) // ̑ (dead) +#define FR_IBRV S(ALGR(FR_AT)) // ̑ (dead) #define FR_DACU S(ALGR(FR_LPRN)) // ˝ (dead) -#define FR_DGRV S(ALGR(FR_RPRN)) // ̏ (dead) +#define FR_DGRV S(ALGR(FR_RPRN)) // ̏ (dead) #define FR_MDSH S(ALGR(FR_RSQU)) // — #define FR_LSAQ S(ALGR(FR_LDAQ)) // ‹ #define FR_RSAQ S(ALGR(FR_RDAQ)) // › #define FR_RNGA S(ALGR(FR_QUOT)) // ˚ (dead) -// Row 2 #define FR_TM S(ALGR(FR_T)) // ™ -#define FR_DOTB S(ALGR(FR_I)) // ̣ (dead) +#define FR_DOTB S(ALGR(FR_I)) // ̣ (dead) #define FR_PERM S(ALGR(FR_P)) // ‰ #define FR_NBHY S(ALGR(FR_MINS)) // ‑ (non-breaking hyphen) #define FR_DDAG S(ALGR(FR_PLUS)) // ‡ -// Row 3 #define FR_MACB S(ALGR(FR_H)) // ˍ (dead) #define FR_SQRT S(ALGR(FR_SLSH)) // √ #define FR_QRTR S(ALGR(FR_ASTR)) // ¼ -// Row 4 #define FR_GEQL S(ALGR(FR_LABK)) // ≥ #define FR_OGON S(ALGR(FR_V)) // ˛ (dead) -#define FR_DCMM S(ALGR(FR_COMM)) // ̦ (dead) +#define FR_DCMM S(ALGR(FR_COMM)) // ̦ (dead) #define FR_NEQL S(ALGR(FR_SCLN)) // ≠ + diff --git a/quantum/keymap_extras/keymap_french_mac_iso.h b/quantum/keymap_extras/keymap_french_mac_iso.h index 590a57e55c..9a8ed72604 100644 --- a/quantum/keymap_extras/keymap_french_mac_iso.h +++ b/quantum/keymap_extras/keymap_french_mac_iso.h @@ -1,39 +1,33 @@ -/* Copyright 2016 Sébastien Pérochon - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ @ │ & │ é │ " │ ' │ ( │ § │ è │ ! │ ç │ à │ ) │ - │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ A │ Z │ E │ R │ T │ Y │ U │ I │ O │ P │ ^ │ $ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Q │ S │ D │ F │ G │ H │ J │ K │ L │ M │ ù │ ` │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ < │ W │ X │ C │ V │ B │ N │ , │ ; │ : │ = │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 +// Aliases #define FR_AT KC_GRV // @ #define FR_AMPR KC_1 // & #define FR_LEAC KC_2 // é @@ -47,7 +41,6 @@ #define FR_LAGR KC_0 // à #define FR_RPRN KC_MINS // ) #define FR_MINS KC_EQL // - -// Row 2 #define FR_A KC_Q // A #define FR_Z KC_W // Z #define FR_E KC_E // E @@ -60,7 +53,6 @@ #define FR_P KC_P // P #define FR_CIRC KC_LBRC // ^ #define FR_DLR KC_RBRC // $ -// Row 3 #define FR_Q KC_A // Q #define FR_S KC_S // S #define FR_D KC_D // D @@ -73,7 +65,6 @@ #define FR_M KC_SCLN // M #define FR_LUGR KC_QUOT // ù #define FR_GRV KC_NUHS // ` -// Row 4 #define FR_LABK KC_NUBS // < #define FR_W KC_Z // W #define FR_X KC_X // X @@ -85,21 +76,6 @@ #define FR_SCLN KC_COMM // ; #define FR_COLN KC_DOT // : #define FR_EQL KC_SLSH // = - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ # │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ° │ _ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ * │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ % │ £ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ > │ │ │ │ │ │ │ ? │ . │ / │ + │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define FR_HASH S(FR_AT) // # #define FR_1 S(FR_AMPR) // 1 #define FR_2 S(FR_LEAC) // 2 @@ -113,33 +89,15 @@ #define FR_0 S(FR_LAGR) // 0 #define FR_DEG S(FR_RPRN) // ° #define FR_UNDS S(FR_MINS) // _ -// Row 2 #define FR_DIAE S(FR_CIRC) // ¨ (dead) #define FR_ASTR S(FR_DLR) // * -// Row 3 #define FR_PERC S(FR_LUGR) // % #define FR_PND S(FR_GRV) // £ -// Row 4 #define FR_RABK S(FR_LABK) // > #define FR_QUES S(FR_COMM) // ? #define FR_DOT S(FR_SCLN) // . #define FR_SLSH S(FR_COLN) // / #define FR_PLUS S(FR_EQL) // + - -/* Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ • │ │ ë │ “ │ ‘ │ { │ ¶ │ « │ ¡ │ Ç │ Ø │ } │ — │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Æ │  │ Ê │ ® │ † │ Ú │ º │ î │ Œ │ π │ Ô │ € │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ ‡ │ Ò │ ∂ │ ƒ │ fi │ Ì │ Ï │ È │ ¬ │ µ │ Ù │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≤ │ ‹ │ ≈ │ © │ ◊ │ ß │ ~ │ ∞ │ … │ ÷ │ ≠ │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define FR_BULT A(FR_AT) // • #define FR_APPL A(FR_AMPR) // (Apple logo) #define FR_LEDI A(FR_LEAC) // ë @@ -153,7 +111,6 @@ #define FR_OSTR A(FR_LAGR) // Ø #define FR_RCBR A(FR_RPRN) // } #define FR_MDSH A(FR_MINS) // — -// Row 2 #define FR_AE A(FR_A) // Æ #define FR_CACI A(FR_Z) //  #define FR_ECIR A(FR_E) // Ê @@ -166,7 +123,6 @@ #define FR_PI A(FR_P) // π #define FR_OCIR A(FR_CIRC) // Ô #define FR_EURO A(FR_DLR) // € -// Row 3 #define FR_DDAG A(FR_Q) // ‡ #define FR_COGR A(FR_S) // Ò #define FR_PDIF A(FR_D) // ∂ @@ -178,7 +134,6 @@ #define FR_NOT A(FR_L) // ¬ #define FR_MICR A(FR_M) // µ #define FR_CUGR A(FR_LUGR) // Ù -// Row 4 #define FR_LTEQ A(FR_LABK) // ≤ #define FR_LSAQ A(FR_W) // ‹ #define FR_AEQL A(FR_X) // ≈ @@ -190,21 +145,6 @@ #define FR_ELLP A(FR_SCLN) // … #define FR_DIV A(FR_COLN) // ÷ #define FR_NEQL A(FR_EQL) // ≠ - -/* Shift+Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ Ÿ │ ´ │ „ │ │ │ [ │ å │ » │ Û │ Á │ │ ] │ – │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ Å │ │ ‚ │ ™ │ │ ª │ ï │ │ ∏ │ │ ¥ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Ω │ ∑ │ ∆ │ · │ fl │ Î │ Í │ Ë │ | │ Ó │ ‰ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≥ │ › │ ⁄ │ ¢ │ √ │ ∫ │ ı │ ¿ │ │ \ │ ± │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define FR_CYDI S(A(FR_AT)) // Ÿ #define FR_ACUT S(A(FR_AMPR)) // ´ (dead) #define FR_DLQU S(A(FR_LEAC)) // „ @@ -215,7 +155,6 @@ #define FR_CAAC S(A(FR_LCCE)) // Á #define FR_RBRC S(A(FR_RPRN)) // ] #define FR_NDSH S(A(FR_MINS)) // – -// Row 2 #define FR_CARI S(A(FR_Z)) // Å #define FR_SLQU S(A(FR_R)) // ‚ #define FR_TM S(A(FR_T)) // ™ @@ -223,7 +162,6 @@ #define FR_LIDI S(A(FR_I)) // ï #define FR_NARP S(A(FR_P)) // ∏ #define FR_YEN S(A(FR_DLR)) // ¥ -// Row 3 #define FR_OMEG S(A(FR_Q)) // Ω #define FR_NARS S(A(FR_S)) // ∑ #define FR_INCR S(A(FR_D)) // ∆ @@ -235,7 +173,6 @@ #define FR_PIPE S(A(FR_L)) // | #define FR_COAC S(A(FR_M)) // Ó #define FR_PERM S(A(FR_LUGR)) // ‰ -// Row 4 #define FR_GTEQ S(A(FR_LABK)) // ≥ #define FR_RSAQ S(A(FR_W)) // › #define FR_FRSL S(A(FR_X)) // ⁄ @@ -246,3 +183,4 @@ #define FR_IQUE S(A(FR_COMM)) // ¿ #define FR_BSLS S(A(FR_COLN)) // (backslash) #define FR_PLMN S(A(FR_EQL)) // ± + diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h index 085995b0c6..251491fb81 100644 --- a/quantum/keymap_extras/keymap_german.h +++ b/quantum/keymap_extras/keymap_german.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Matthias Schmidtt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ^ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ß │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Ü │ + │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ # │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define DE_CIRC KC_GRV // ^ (dead) #define DE_1 KC_1 // 1 #define DE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define DE_0 KC_0 // 0 #define DE_SS KC_MINS // ß #define DE_ACUT KC_EQL // ´ (dead) -// Row 2 #define DE_Q KC_Q // Q #define DE_W KC_W // W #define DE_E KC_E // E @@ -60,7 +53,6 @@ #define DE_P KC_P // P #define DE_UDIA KC_LBRC // Ü #define DE_PLUS KC_RBRC // + -// Row 3 #define DE_A KC_A // A #define DE_S KC_S // S #define DE_D KC_D // D @@ -73,7 +65,6 @@ #define DE_ODIA KC_SCLN // Ö #define DE_ADIA KC_QUOT // Ä #define DE_HASH KC_NUHS // # -// Row 4 #define DE_LABK KC_NUBS // < #define DE_Y KC_Z // Y #define DE_X KC_X // X @@ -85,21 +76,6 @@ #define DE_COMM KC_COMM // , #define DE_DOT KC_DOT // . #define DE_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ° │ ! │ " │ § │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define DE_DEG S(DE_CIRC) // ° #define DE_EXLM S(DE_1) // ! #define DE_DQUO S(DE_2) // " @@ -113,30 +89,12 @@ #define DE_EQL S(DE_0) // = #define DE_QUES S(DE_SS) // ? #define DE_GRV S(DE_ACUT) // ` (dead) -// Row 2 #define DE_ASTR S(DE_PLUS) // * -// Row 3 #define DE_QUOT S(DE_HASH) // ' -// Row 4 #define DE_RABK S(DE_LABK) // > #define DE_SCLN S(DE_COMM) // ; #define DE_COLN S(DE_DOT) // : #define DE_UNDS S(DE_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ ² │ ³ │ │ │ │ { │ [ │ ] │ } │ \ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ @ │ │ € │ │ │ │ │ │ │ │ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ | │ │ │ │ │ │ │ µ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define DE_SUP2 ALGR(DE_2) // ² #define DE_SUP3 ALGR(DE_3) // ³ #define DE_LCBR ALGR(DE_7) // { @@ -144,10 +102,9 @@ #define DE_RBRC ALGR(DE_9) // ] #define DE_RCBR ALGR(DE_0) // } #define DE_BSLS ALGR(DE_SS) // (backslash) -// Row 2 #define DE_AT ALGR(DE_Q) // @ #define DE_EURO ALGR(DE_E) // € #define DE_TILD ALGR(DE_PLUS) // ~ -// Row 4 #define DE_PIPE ALGR(DE_LABK) // | #define DE_MICR ALGR(DE_M) // µ + diff --git a/quantum/keymap_extras/keymap_german_mac_iso.h b/quantum/keymap_extras/keymap_german_mac_iso.h index 82404fa5fd..de7b60546b 100644 --- a/quantum/keymap_extras/keymap_german_mac_iso.h +++ b/quantum/keymap_extras/keymap_german_mac_iso.h @@ -1,39 +1,33 @@ -/* Copyright 2016 Stephen Bösebeck - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ^ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ß │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Ü │ + │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ # │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 +// Aliases #define DE_CIRC KC_GRV // ^ (dead) #define DE_1 KC_1 // 1 #define DE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define DE_0 KC_0 // 0 #define DE_SS KC_MINS // ß #define DE_ACUT KC_EQL // ´ (dead) -// Row 2 #define DE_Q KC_Q // Q #define DE_W KC_W // W #define DE_E KC_E // E @@ -60,7 +53,6 @@ #define DE_P KC_P // P #define DE_UDIA KC_LBRC // Ü #define DE_PLUS KC_RBRC // + -// Row 3 #define DE_A KC_A // A #define DE_S KC_S // S #define DE_D KC_D // D @@ -73,7 +65,6 @@ #define DE_ODIA KC_SCLN // Ö #define DE_ADIA KC_QUOT // Ä #define DE_HASH KC_NUHS // # -// Row 4 #define DE_LABK KC_NUBS // < #define DE_Y KC_Z // Y #define DE_X KC_X // X @@ -85,21 +76,6 @@ #define DE_COMM KC_COMM // , #define DE_DOT KC_DOT // . #define DE_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ° │ ! │ " │ § │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define DE_DEG S(DE_CIRC) // ° #define DE_EXLM S(DE_1) // ! #define DE_DQUO S(DE_2) // " @@ -113,30 +89,12 @@ #define DE_EQL S(DE_0) // = #define DE_QUES S(DE_SS) // ? #define DE_GRV S(DE_ACUT) // ` (dead) -// Row 2 #define DE_ASTR S(DE_PLUS) // * -// Row 3 #define DE_QUOT S(DE_HASH) // ' -// Row 4 #define DE_RABK S(DE_LABK) // > #define DE_SCLN S(DE_COMM) // ; #define DE_COLN S(DE_DOT) // : #define DE_UNDS S(DE_MINS) // _ - -/* Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ „ │ ¡ │ “ │ ¶ │ ¢ │ [ │ ] │ | │ { │ } │ ≠ │ ¿ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ « │ ∑ │ € │ ® │ † │ Ω │ ¨ │ ⁄ │ Ø │ π │ • │ ± │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Å │ ‚ │ ∂ │ ƒ │ © │ ª │ º │ ∆ │ @ │ Œ │ Æ │ ‘ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≤ │ ¥ │ ≈ │ Ç │ √ │ ∫ │ ~ │ µ │ ∞ │ … │ – │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define DE_DLQU A(DE_CIRC) // „ #define DE_IEXL A(DE_1) // ¡ #define DE_LDQU A(DE_2) // “ @@ -149,7 +107,6 @@ #define DE_RCBR A(DE_9) // } #define DE_NEQL A(DE_0) // ≠ #define DE_IQUE A(DE_SS) // ¿ -// Row 2 #define DE_LDAQ A(DE_Q) // « #define DE_NARS A(DE_W) // ∑ #define DE_EURO A(DE_E) // € @@ -162,7 +119,6 @@ #define DE_PI A(DE_P) // π #define DE_BULT A(DE_UDIA) // • #define DE_PLMN A(DE_PLUS) // ± -// Row 3 #define DE_ARNG A(DE_A) // Å #define DE_SLQU A(DE_S) // ‚ #define DE_PDIF A(DE_D) // ∂ @@ -175,7 +131,6 @@ #define DE_OE A(DE_ODIA) // Œ #define DE_AE A(DE_ADIA) // Æ #define DE_LSQU A(DE_HASH) // ‘ -// Row 4 #define DE_LTEQ A(DE_LABK) // ≤ #define DE_YEN A(DE_Y) // ¥ #define DE_AEQL A(DE_X) // ≈ @@ -187,21 +142,6 @@ #define DE_INFN A(DE_COMM) // ∞ #define DE_ELLP A(DE_DOT) // … #define DE_NDSH A(DE_MINS) // – - -/* Shift+Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ │ ¬ │ ” │ │ £ │ fi │ │ \ │ ˜ │ · │ ¯ │ ˙ │ ˚ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ » │ │ ‰ │ ¸ │ ˝ │ ˇ │ Á │ Û │ │ ∏ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ Í │ ™ │ Ï │ Ì │ Ó │ ı │ │ fl │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≥ │ ‡ │ Ù │ │ ◊ │ ‹ │ › │ ˘ │ ˛ │ ÷ │ — │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define DE_NOT S(A(DE_1)) // ¬ #define DE_RDQU S(A(DE_2)) // ” #define DE_PND S(A(DE_4)) // £ @@ -212,7 +152,6 @@ #define DE_MACR S(A(DE_0)) // ¯ #define DE_DOTA S(A(DE_SS)) // ˙ #define DE_RNGA S(A(DE_ACUT)) // ˚ -// Row 2 #define DE_RDAQ S(A(DE_Q)) // » #define DE_PERM S(A(DE_E)) // ‰ #define DE_CEDL S(A(DE_R)) // ¸ @@ -222,7 +161,6 @@ #define DE_UCIR S(A(DE_I)) // Û #define DE_NARP S(A(DE_P)) // ∏ #define DE_APPL S(A(DE_PLUS)) // (Apple logo) -// Row 3 #define DE_IACU S(A(DE_S)) // Í #define DE_TM S(A(DE_D)) // ™ #define DE_IDIA S(A(DE_F)) // Ï @@ -230,7 +168,6 @@ #define DE_OACU S(A(DE_H)) // Ó #define DE_DLSI S(A(DE_J)) // ı #define DE_FL S(A(DE_L)) // fl -// Row 4 #define DE_GTEQ S(A(DE_LABK)) // ≥ #define DE_DDAG S(A(DE_Y)) // ‡ #define DE_UGRV S(A(DE_X)) // Ù @@ -241,3 +178,4 @@ #define DE_OGON S(A(DE_COMM)) // ˛ #define DE_DIV S(A(DE_DOT)) // ÷ #define DE_MDSH S(A(DE_MINS)) // — + diff --git a/quantum/keymap_extras/keymap_greek.h b/quantum/keymap_extras/keymap_greek.h index 8c23381204..b4f5b5c5b3 100644 --- a/quantum/keymap_extras/keymap_greek.h +++ b/quantum/keymap_extras/keymap_greek.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ ; │ ς │ Ε │ Ρ │ Τ │ Υ │ Θ │ Ι │ Ο │ Π │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Α │ Σ │ Δ │ Φ │ Γ │ Η │ Ξ │ Κ │ Λ │ ΄ │ ' │ \ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ Ζ │ Χ │ Ψ │ Ω │ Β │ Ν │ Μ │ , │ . │ / │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define GR_GRV KC_GRV // ` #define GR_1 KC_1 // 1 #define GR_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define GR_0 KC_0 // 0 #define GR_MINS KC_MINS // - #define GR_EQL KC_EQL // = -// Row 2 #define GR_SCLN KC_Q // ; #define GR_FSIG KC_W // ς #define GR_EPSL KC_E // Ε @@ -60,7 +53,6 @@ #define GR_PI KC_P // Π #define GR_LBRC KC_LBRC // [ #define GR_RBRC KC_RBRC // ] -// Row 3 #define GR_ALPH KC_A // Α #define GR_SIGM KC_S // Σ #define GR_DELT KC_D // Δ @@ -73,7 +65,6 @@ #define GR_TONS KC_SCLN // ΄ (dead) #define GR_QUOT KC_QUOT // ' #define GR_BSLS KC_NUHS // (backslash) -// Row 4 #define GR_ZETA KC_Z // Ζ #define GR_CHI KC_X // Χ #define GR_PSI KC_C // Ψ @@ -84,21 +75,6 @@ #define GR_COMM KC_COMM // , #define GR_DOT KC_DOT // . #define GR_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ : │ ΅ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ ¨ │ " │ | │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define GR_TILD S(GR_GRV) // ~ #define GR_EXLM S(GR_1) // ! #define GR_AT S(GR_2) // @ @@ -112,34 +88,16 @@ #define GR_RPRN S(GR_0) // ) #define GR_UNDS S(GR_MINS) // _ #define GR_PLUS S(GR_EQL) // + -// Row 2 #define GR_COLN S(GR_SCLN) // : #define GR_DIAT S(GR_FSIG) // ΅ (dead) #define GR_LCBR S(GR_LBRC) // { #define GR_RCBR S(GR_RBRC) // } -// Row 3 #define GR_DIAE S(GR_TONS) // ¨ (dead) #define GR_DQUO S(GR_QUOT) // " #define GR_PIPE S(GR_BSLS) // | -// Row 4 #define GR_LABK S(GR_COMM) // < #define GR_RABK S(GR_DOT) // > #define GR_QUES S(GR_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ ² │ ³ │ £ │ § │ ¶ │ │ ¤ │ ¦ │ ° │ ± │ ½ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ ® │ │ ¥ │ │ │ │ │ « │ » │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ¬ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ © │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define GR_SUP2 ALGR(GR_2) // ² #define GR_SUP3 ALGR(GR_3) // ³ #define GR_PND ALGR(GR_4) // £ @@ -150,13 +108,11 @@ #define GR_DEG ALGR(GR_0) // ° #define GR_PLMN ALGR(GR_MINS) // ± #define GR_HALF ALGR(GR_EQL) // ½ -// Row 2 #define GR_EURO ALGR(GR_EPSL) // € #define GR_REGD ALGR(GR_RHO) // ® #define GR_YEN ALGR(GR_UPSL) // ¥ #define GR_LDAQ ALGR(GR_LBRC) // « #define GR_RDAQ ALGR(GR_RBRC) // » -// Row 3 #define GR_NOT ALGR(GR_BSLS) // ¬ -// Row 4 #define GR_COPY ALGR(GR_PSI) // © + diff --git a/quantum/keymap_extras/keymap_hebrew.h b/quantum/keymap_extras/keymap_hebrew.h index 87b488f04d..372d7f2e93 100644 --- a/quantum/keymap_extras/keymap_hebrew.h +++ b/quantum/keymap_extras/keymap_hebrew.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ; │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ / │ ' │ פ │ ם │ ן │ ו │ ט │ א │ ר │ ק │ ] │ [ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ ף │ ך │ ל │ ח │ י │ ע │ כ │ ג │ ד │ ש │ , │ \ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ ץ │ ת │ צ │ מ │ נ │ ה │ ב │ ס │ ז │ . │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define IL_SCLN KC_GRV // ; #define IL_1 KC_1 // 1 #define IL_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define IL_0 KC_0 // 0 #define IL_MINS KC_MINS // - #define IL_EQL KC_EQL // = -// Row 2 #define IL_SLSH KC_Q // / #define IL_QUOT KC_W // ' #define IL_QOF KC_E // ק @@ -60,7 +53,6 @@ #define IL_PE KC_P // פ #define IL_RBRC KC_LBRC // ] #define IL_LBRC KC_RBRC // [ -// Row 3 #define IL_SHIN KC_A // ש #define IL_DALT KC_S // ד #define IL_GIML KC_D // ג @@ -73,7 +65,6 @@ #define IL_FPE KC_SCLN // ף #define IL_COMM KC_QUOT // , #define IL_BSLS KC_NUHS // (backslash) -// Row 4 #define IL_ZAYN KC_Z // ז #define IL_SMKH KC_X // ס #define IL_BET KC_C // ב @@ -84,21 +75,6 @@ #define IL_TAV KC_COMM // ת #define IL_FTSD KC_DOT // ץ #define IL_DOT KC_SLSH // . - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ) │ ( │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ } │ { │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ : │ " │ | │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ > │ < │ ? │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define IL_TILD S(IL_SCLN) // ~ #define IL_EXLM S(IL_1) // ! #define IL_AT S(IL_2) // @ @@ -112,40 +88,20 @@ #define IL_LPRN S(IL_0) // ( #define IL_UNDS S(IL_MINS) // _ #define IL_PLUS S(IL_EQL) // + -// Row 2 #define IL_RCBR S(IL_RBRC) // } #define IL_LCBR S(IL_LBRC) // { -// Row 3 #define IL_COLN S(IL_FPE) // : #define IL_DQUO S(IL_COMM) // " #define IL_PIPE S(IL_BSLS) // | -// Row 4 #define IL_RABK S(IL_TAV) // > #define IL_LABK S(IL_FTSD) // < #define IL_QUES S(IL_DOT) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ € │ ₪ │ ° │ │ │ × │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ װ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ ײ │ ױ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ÷ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define IL_EURO ALGR(IL_3) // € #define IL_SHKL ALGR(IL_4) // ₪ #define IL_DEG ALGR(IL_5) // ° #define IL_MUL ALGR(IL_8) // × -// Row 2 #define IL_DVAV ALGR(IL_TET) // װ -// Row 3 #define IL_VYOD ALGR(IL_AYIN) // ױ #define IL_DYOD ALGR(IL_YOD) // ײ -// Row 4 #define IL_DIV ALGR(IL_DOT) // ÷ + diff --git a/quantum/keymap_extras/keymap_hungarian.h b/quantum/keymap_extras/keymap_hungarian.h index a4e4b1a522..591d71c09c 100644 --- a/quantum/keymap_extras/keymap_hungarian.h +++ b/quantum/keymap_extras/keymap_hungarian.h @@ -1,39 +1,33 @@ -/* Copyright 2018 fuge - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ Ö │ Ü │ Ó │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Ő │ Ú │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ É │ Á │ Ű │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ Í │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define HU_0 KC_GRV // 0 #define HU_1 KC_1 // 1 #define HU_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define HU_ODIA KC_0 // Ö #define HU_UDIA KC_MINS // Ü #define HU_OACU KC_EQL // Ó -// Row 2 #define HU_Q KC_Q // Q #define HU_W KC_W // W #define HU_E KC_E // E @@ -60,7 +53,6 @@ #define HU_P KC_P // P #define HU_ODAC KC_LBRC // Ő #define HU_UACU KC_RBRC // Ú -// Row 3 #define HU_A KC_A // A #define HU_S KC_S // S #define HU_D KC_D // D @@ -73,7 +65,6 @@ #define HU_EACU KC_SCLN // É #define HU_AACU KC_QUOT // Á #define HU_UDAC KC_NUHS // Ű -// Row 4 #define HU_IACU KC_NUBS // Í #define HU_Y KC_Z // Y #define HU_X KC_X // X @@ -85,21 +76,6 @@ #define HU_COMM KC_COMM // , #define HU_DOT KC_DOT // . #define HU_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ § │ ' │ " │ + │ ! │ % │ / │ = │ ( │ ) │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ ? │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define HU_SECT S(HU_0) // § #define HU_QUOT S(HU_1) // ' #define HU_DQUO S(HU_2) // " @@ -110,25 +86,9 @@ #define HU_EQL S(HU_7) // = #define HU_LPRN S(HU_8) // ( #define HU_RPRN S(HU_9) // ) -// Row 4 #define HU_QUES S(HU_COMM) // ? #define HU_COLN S(HU_DOT) // : #define HU_UNDS S(HU_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ~ │ ˇ │ ^ │ ˘ │ ° │ ˛ │ ` │ ˙ │ ´ │ ˝ │ ¨ │ ¸ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ \ │ | │ Ä │ │ │ │ € │ │ │ │ ÷ │ × │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ ä │ đ │ Đ │ [ │ ] │ │ │ ł │ Ł │ $ │ ß │ ¤ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ > │ # │ & │ @ │ { │ } │ │ ; │ │ * │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define HU_TILD ALGR(HU_1) // ~ #define HU_CARN ALGR(HU_2) // ˇ (dead) #define HU_CIRC ALGR(HU_3) // ^ (dead) @@ -141,14 +101,12 @@ #define HU_DACU ALGR(HU_ODIA) // ˝ (dead) #define HU_DIAE ALGR(HU_UDIA) // ¨ (dead) #define HU_CEDL ALGR(HU_OACU) // ¸ (dead) -// Row 2 #define HU_BSLS ALGR(HU_Q) // (backslash) #define HU_PIPE ALGR(HU_W) // | #define HU_CADI ALGR(HU_E) // Ä #define HU_EURO ALGR(HU_U) // € #define HU_DIV ALGR(HU_ODAC) // ÷ #define HU_MUL ALGR(HU_UACU) // × -// Row 3 #define HU_LADI ALGR(HU_A) // ä #define HU_LDST ALGR(HU_S) // đ #define HU_CDST ALGR(HU_D) // Đ @@ -159,7 +117,6 @@ #define HU_DLR ALGR(HU_EACU) // $ #define HU_SS ALGR(HU_AACU) // ß #define HU_CURR ALGR(HU_UDAC) // ¤ -// Row 4 #define HU_LABK ALGR(HU_IACU) // < #define HU_RABK ALGR(HU_Y) // > #define HU_HASH ALGR(HU_X) // # @@ -169,3 +126,4 @@ #define HU_RCBR ALGR(HU_N) // } #define HU_SCLN ALGR(HU_COMM) // ; #define HU_ASTR ALGR(HU_MINS) // * + diff --git a/quantum/keymap_extras/keymap_icelandic.h b/quantum/keymap_extras/keymap_icelandic.h index 43e4a6e872..800899b515 100644 --- a/quantum/keymap_extras/keymap_icelandic.h +++ b/quantum/keymap_extras/keymap_icelandic.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ° │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ Ö │ - │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Ð │ ' │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Æ │ ´ │ + │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ Þ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define IS_RNGA KC_GRV // ° (dead) #define IS_1 KC_1 // 1 #define IS_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define IS_0 KC_0 // 0 #define IS_ODIA KC_MINS // Ö #define IS_MINS KC_EQL // - -// Row 2 #define IS_Q KC_Q // Q #define IS_W KC_W // W #define IS_E KC_E // E @@ -60,7 +53,6 @@ #define IS_P KC_P // P #define IS_ETH KC_LBRC // Ð #define IS_QUOT KC_RBRC // ' -// Row 3 #define IS_A KC_A // A #define IS_S KC_S // S #define IS_D KC_D // D @@ -73,7 +65,6 @@ #define IS_AE KC_SCLN // Æ #define IS_ACUT KC_QUOT // ´ (dead) #define IS_PLUS KC_NUHS // + -// Row 4 #define IS_LABK KC_NUBS // < #define IS_Z KC_Z // Z #define IS_X KC_X // X @@ -85,21 +76,6 @@ #define IS_COMM KC_COMM // , #define IS_DOT KC_DOT // . #define IS_THRN KC_SLSH // Þ - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¨ │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ │ _ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ? │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define IS_DIAE S(IS_RNGA) // ¨ (dead) #define IS_EXLM S(IS_1) // ! #define IS_DQUO S(IS_2) // " @@ -112,42 +88,22 @@ #define IS_RPRN S(IS_9) // ) #define IS_EQL S(IS_0) // = #define IS_UNDS S(IS_MINS) // _ -// Row 2 #define IS_QUES S(IS_QUOT) // ? -// Row 3 #define IS_ASTR S(IS_PLUS) // * -// Row 4 #define IS_RABK S(IS_LABK) // > #define IS_SCLN S(IS_COMM) // ; #define IS_COLN S(IS_DOT) // : - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ° │ │ │ │ │ │ │ { │ [ │ ] │ } │ \ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ @ │ │ € │ │ │ │ │ │ │ │ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ ^ │ ` │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ | │ │ │ │ │ │ │ µ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define IS_DEG ALGR(IS_RNGA) // ° #define IS_LCBR ALGR(IS_7) // { #define IS_LBRC ALGR(IS_8) // [ #define IS_RBRC ALGR(IS_9) // ] #define IS_RCBR ALGR(IS_0) // } #define IS_BSLS ALGR(IS_ODIA) // (backslash) -// Row 2 #define IS_AT ALGR(IS_Q) // @ #define IS_EURO ALGR(IS_E) // € #define IS_TILD ALGR(IS_QUOT) // ~ -// Row 3 #define IS_CIRC ALGR(IS_ACUT) // ^ (dead) #define IS_GRV ALGR(IS_PLUS) // ` (dead) -// Row 4 #define IS_PIPE ALGR(IS_LABK) // | #define IS_MICR ALGR(IS_M) // µ + diff --git a/quantum/keymap_extras/keymap_irish.h b/quantum/keymap_extras/keymap_irish.h index 73a4c8028d..2cd63a48e3 100644 --- a/quantum/keymap_extras/keymap_irish.h +++ b/quantum/keymap_extras/keymap_irish.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define IE_GRV KC_GRV // ` #define IE_1 KC_1 // 1 #define IE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define IE_0 KC_0 // 0 #define IE_MINS KC_MINS // - #define IE_EQL KC_EQL // = -// Row 2 #define IE_Q KC_Q // Q #define IE_W KC_W // W #define IE_E KC_E // E @@ -60,7 +53,6 @@ #define IE_P KC_P // P #define IE_LBRC KC_LBRC // [ #define IE_RBRC KC_RBRC // ] -// Row 3 #define IE_A KC_A // A #define IE_S KC_S // S #define IE_D KC_D // D @@ -73,7 +65,6 @@ #define IE_SCLN KC_SCLN // ; #define IE_QUOT KC_QUOT // ' #define IE_HASH KC_NUHS // # -// Row 4 #define IE_BSLS KC_NUBS // (backslash) #define IE_Z KC_Z // Z #define IE_X KC_X // X @@ -85,21 +76,6 @@ #define IE_COMM KC_COMM // , #define IE_DOT KC_DOT // . #define IE_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¬ │ ! │ " │ £ │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ : │ @ │ ~ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ | │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define IE_NOT S(IE_GRV) // ¬ #define IE_EXLM S(IE_1) // ! #define IE_DQUO S(IE_2) // " @@ -113,40 +89,21 @@ #define IE_RPRN S(IE_0) // ) #define IE_UNDS S(IE_MINS) // _ #define IE_PLUS S(IE_EQL) // + -// Row 2 #define IE_LCBR S(IE_LBRC) // { #define IE_RCBR S(IE_RBRC) // } -// Row 3 #define IE_COLN S(IE_SCLN) // : #define IE_AT S(IE_QUOT) // @ #define IE_TILD S(IE_HASH) // ~ -// Row 4 #define IE_PIPE S(IE_BSLS) // | #define IE_LABK S(IE_COMM) // < #define IE_RABK S(IE_DOT) // > #define IE_QUES S(IE_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¦ │ │ │ │ € │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ É │ │ │ │ Ú │ Í │ Ó │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Á │ │ │ │ │ │ │ │ │ │ ´ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define IE_BRKP ALGR(IE_GRV) // ¦ #define IE_EURO ALGR(IE_4) // € -// Row 2 #define IE_EACU ALGR(IE_E) // É #define IE_UACU ALGR(IE_U) // Ú #define IE_IACU ALGR(IE_I) // Í #define IE_OACU ALGR(IE_O) // Ó -// Row 3 #define IE_AACU ALGR(IE_A) // Á #define IE_ACUT ALGR(IE_QUOT) // ´ (dead) + diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h index ece60d06b7..95f3348f63 100644 --- a/quantum/keymap_extras/keymap_italian.h +++ b/quantum/keymap_extras/keymap_italian.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Matthias Schmidtt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ \ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ì │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ è │ + │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ò │ à │ ù │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define IT_BSLS KC_GRV // (backslash) #define IT_1 KC_1 // 1 #define IT_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define IT_0 KC_0 // 0 #define IT_QUOT KC_MINS // ' #define IT_IGRV KC_EQL // ì -// Row 2 #define IT_Q KC_Q // Q #define IT_W KC_W // W #define IT_E KC_E // E @@ -60,7 +53,6 @@ #define IT_P KC_P // P #define IT_EGRV KC_LBRC // è #define IT_PLUS KC_RBRC // + -// Row 3 #define IT_A KC_A // A #define IT_S KC_S // S #define IT_D KC_D // D @@ -73,7 +65,6 @@ #define IT_OGRV KC_SCLN // ò #define IT_AGRV KC_QUOT // à #define IT_UGRV KC_NUHS // ù -// Row 4 #define IT_LABK KC_NUBS // < #define IT_Z KC_Z // Z #define IT_X KC_X // X @@ -85,21 +76,6 @@ #define IT_COMM KC_COMM // , #define IT_DOT KC_DOT // . #define IT_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ | │ ! │ " │ £ │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ^ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ é │ * │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ ç │ ° │ § │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define IT_PIPE S(IT_BSLS) // | #define IT_EXLM S(IT_1) // ! #define IT_DQUO S(IT_2) // " @@ -113,53 +89,20 @@ #define IT_EQL S(IT_0) // = #define IT_QUES S(IT_QUOT) // ? #define IT_CIRC S(IT_IGRV) // ^ -// Row 2 #define IT_EACU S(IT_EGRV) // é #define IT_ASTR S(IT_PLUS) // * -// Row 3 #define IT_CCED S(IT_OGRV) // ç #define IT_DEG S(IT_AGRV) // ° #define IT_SECT S(IT_UGRV) // § -// Row 4 #define IT_RABK S(IT_LABK) // > #define IT_COLN S(IT_DOT) // : #define IT_SCLN S(IT_COMM) // ; #define IT_UNDS S(IT_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ @ │ # │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 2 #define IT_EURO ALGR(IT_E) // € #define IT_LBRC ALGR(IT_EGRV) // [ #define IT_RBRC ALGR(IT_PLUS) // ] -// Row 3 #define IT_AT ALGR(IT_OGRV) // @ #define IT_HASH ALGR(IT_AGRV) // # - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 2 #define IT_LCBR S(ALGR(IT_EGRV)) // { #define IT_RCBR S(ALGR(IT_PLUS)) // } + diff --git a/quantum/keymap_extras/keymap_italian_mac_ansi.h b/quantum/keymap_extras/keymap_italian_mac_ansi.h index c2b8e3cad6..5e7e2a37e8 100644 --- a/quantum/keymap_extras/keymap_italian_mac_ansi.h +++ b/quantum/keymap_extras/keymap_italian_mac_ansi.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Matthias Schmidtt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ < │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ì │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ è │ + │ ù │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ò │ à │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 +// Aliases #define IT_LABK KC_GRV // < #define IT_1 KC_1 // 1 #define IT_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define IT_0 KC_0 // 0 #define IT_QUOT KC_MINS // ' #define IT_IGRV KC_EQL // ì -// Row 2 #define IT_Q KC_Q // Q #define IT_W KC_W // W #define IT_E KC_E // E @@ -61,7 +54,6 @@ #define IT_EGRV KC_LBRC // è #define IT_PLUS KC_RBRC // + #define IT_UGRV KC_BSLS // ù -// Row 3 #define IT_A KC_A // A #define IT_S KC_S // S #define IT_D KC_D // D @@ -73,7 +65,6 @@ #define IT_L KC_L // L #define IT_OGRV KC_SCLN // ò #define IT_AGRV KC_QUOT // à -// Row 4 #define IT_BSLS KC_NUBS // (backslash, not physically present) #define IT_Z KC_Z // Z #define IT_X KC_X // X @@ -85,21 +76,6 @@ #define IT_COMM KC_COMM // , #define IT_DOT KC_DOT // . #define IT_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ > │ ! │ " │ £ │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ^ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ é │ * │ § │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ │ │ │ │ │ │ │ │ │ ç │ ° │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define IT_RABK S(IT_LABK) // > #define IT_EXLM S(IT_1) // ! #define IT_DQUO S(IT_2) // " @@ -113,33 +89,15 @@ #define IT_EQL S(IT_0) // = #define IT_QUES S(IT_QUOT) // ? #define IT_CIRC S(IT_IGRV) // ^ -// Row 2 #define IT_EACU S(IT_EGRV) // é #define IT_ASTR S(IT_PLUS) // * #define IT_SECT S(IT_UGRV) // § -// Row 3 #define IT_LCCE S(IT_OGRV) // ç #define IT_DEG S(IT_AGRV) // ° -// Row 4 #define IT_PIPE S(IT_BSLS) // | (not physically present) #define IT_SCLN S(IT_COMM) // ; #define IT_COLN S(IT_DOT) // : #define IT_UNDS S(IT_MINS) // _ - -/* Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ≤ │ « │ “ │ ‘ │ ¥ │ ~ │ ‹ │ ÷ │ ´ │ ` │ ≠ │ ¡ │ ˆ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ „ │ Ω │ € │ ® │ ™ │ Æ │ ¨ │ Œ │ Ø │ π │ [ │ ] │ ¶ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ Å │ ß │ ∂ │ ƒ │ ∞ │ ∆ │ ª │ º │ ¬ │ @ │ # │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ ∑ │ † │ © │ √ │ ∫ │ ˜ │ µ │ … │ • │ – │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define IT_LTEQ A(IT_LABK) // ≤ #define IT_LDAQ A(IT_1) // « #define IT_LDQU A(IT_2) // “ @@ -153,7 +111,6 @@ #define IT_NEQL A(IT_0) // ≠ #define IT_IEXL A(IT_QUOT) // ¡ #define IT_DCIR A(IT_IGRV) // ˆ (dead) -// Row 2 #define IT_DLQU A(IT_Q) // „ #define IT_OMEG A(IT_W) // Ω #define IT_EURO A(IT_E) // € @@ -166,7 +123,6 @@ #define IT_PI A(IT_P) // π #define IT_LBRC A(IT_EGRV) // [ #define IT_RBRC A(IT_PLUS) // ] -// Row 3 #define IT_ARNG A(IT_A) // Å #define IT_SS A(IT_S) // ß #define IT_PDIF A(IT_D) // ∂ @@ -179,7 +135,6 @@ #define IT_AT A(IT_OGRV) // @ #define IT_HASH A(IT_AGRV) // # #define IT_PILC A(IT_UGRV) // ¶ -// Row 4 #define IT_GRV A(IT_BSLS) // ` (not physically present) #define IT_NARS A(IT_Z) // ∑ #define IT_DAGG A(IT_X) // † @@ -191,21 +146,6 @@ #define IT_ELLP A(IT_COMM) // … #define IT_BULT A(IT_DOT) // • #define IT_NDSH A(IT_MINS) // – - -/* Shift+Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ≥ │ » │ ” │ ’ │ ¢ │ ‰ │ › │ ⁄ │ │ │ ≈ │ ¿ │ ± │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ ‚ │ À │ È │ Ì │ Ò │ │ Ù │ │ │ ∏ │ { │ } │ ◊ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ │ ¯ │ ˘ │ ˙ │ ˚ │ ¸ │ ˝ │ ˛ │ ˇ │ Ç │ ∞ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ │ ‡ │ Á │ É │ Í │ Ó │ Ú │ │ · │ — │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define IT_GTEQ S(A(IT_LABK)) // ≥ #define IT_RDAQ S(A(IT_1)) // » #define IT_RDQU S(A(IT_2)) // ” @@ -218,7 +158,6 @@ #define IT_AEQL S(A(IT_0)) // ≈ #define IT_IQUE S(A(IT_QUOT)) // ¿ #define IT_PLMN S(A(IT_IGRV)) // ± -// Row 2 #define IT_SLQU S(A(IT_Q)) // ‚ #define IT_CAGR S(A(IT_W)) // À #define IT_CEGR S(A(IT_E)) // È @@ -229,7 +168,6 @@ #define IT_LCBR S(A(IT_EGRV)) // { #define IT_RCBR S(A(IT_PLUS)) // } #define IT_LOZN S(A(IT_UGRV)) // ◊ -// Row 3 #define IT_MACR S(A(IT_S)) // ¯ #define IT_BREV S(A(IT_D)) // ˘ #define IT_DOTA S(A(IT_F)) // ˙ @@ -239,7 +177,6 @@ #define IT_OGON S(A(IT_K)) // ˛ #define IT_CARN S(A(IT_L)) // ˇ #define IT_CCCE S(A(IT_OGRV)) // Ç -// Row 4 #define IT_DDAG S(A(IT_X)) // ‡ #define IT_CAAC S(A(IT_C)) // Á #define IT_CEAC S(A(IT_V)) // É @@ -248,3 +185,4 @@ #define IT_CUAC S(A(IT_M)) // Ú #define IT_MDDT S(A(IT_DOT)) // · #define IT_MDSH S(A(IT_MINS)) // — + diff --git a/quantum/keymap_extras/keymap_italian_mac_iso.h b/quantum/keymap_extras/keymap_italian_mac_iso.h index 61f76ddba7..1d30451376 100644 --- a/quantum/keymap_extras/keymap_italian_mac_iso.h +++ b/quantum/keymap_extras/keymap_italian_mac_iso.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Matthias Schmidtt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ \ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ì │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ è │ + │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ò │ à │ ù │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 +// Aliases #define IT_BSLS KC_GRV // (backslash) #define IT_1 KC_1 // 1 #define IT_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define IT_0 KC_0 // 0 #define IT_QUOT KC_MINS // ' #define IT_IGRV KC_EQL // ì -// Row 2 #define IT_Q KC_Q // Q #define IT_W KC_W // W #define IT_E KC_E // E @@ -60,7 +53,6 @@ #define IT_P KC_P // P #define IT_EGRV KC_LBRC // è #define IT_PLUS KC_RBRC // + -// Row 3 #define IT_A KC_A // A #define IT_S KC_S // S #define IT_D KC_D // D @@ -73,7 +65,6 @@ #define IT_OGRV KC_SCLN // ò #define IT_AGRV KC_QUOT // à #define IT_UGRV KC_NUHS // ù -// Row 4 #define IT_LABK KC_NUBS // < #define IT_Z KC_Z // Z #define IT_X KC_X // X @@ -85,21 +76,6 @@ #define IT_COMM KC_COMM // , #define IT_DOT KC_DOT // . #define IT_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ | │ ! │ " │ £ │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ^ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ é │ * │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ ç │ ° │ § │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define IT_PIPE S(IT_BSLS) // | #define IT_EXLM S(IT_1) // ! #define IT_DQUO S(IT_2) // " @@ -113,33 +89,15 @@ #define IT_EQL S(IT_0) // = #define IT_QUES S(IT_QUOT) // ? #define IT_CIRC S(IT_IGRV) // ^ -// Row 2 #define IT_EACU S(IT_EGRV) // é #define IT_ASTR S(IT_PLUS) // * -// Row 3 #define IT_LCCE S(IT_OGRV) // ç #define IT_DEG S(IT_AGRV) // ° #define IT_SECT S(IT_UGRV) // § -// Row 4 #define IT_RABK S(IT_LABK) // > #define IT_SCLN S(IT_COMM) // ; #define IT_COLN S(IT_DOT) // : #define IT_UNDS S(IT_MINS) // _ - -/* Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ` │ « │ “ │ ‘ │ ¥ │ ~ │ ‹ │ ÷ │ ´ │ ` │ ≠ │ ¡ │ ˆ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ „ │ Ω │ € │ ® │ ™ │ Æ │ ¨ │ Œ │ Ø │ π │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Å │ ß │ ∂ │ ƒ │ ∞ │ ∆ │ ª │ º │ ¬ │ @ │ # │ ¶ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≤ │ ∑ │ † │ © │ √ │ ∫ │ ˜ │ µ │ … │ • │ – │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define IT_GRV A(IT_BSLS) // ` #define IT_LDAQ A(IT_1) // « #define IT_LDQU A(IT_2) // “ @@ -153,7 +111,6 @@ #define IT_NEQL A(IT_0) // ≠ #define IT_IEXL A(IT_QUOT) // ¡ #define IT_DCIR A(IT_IGRV) // ˆ (dead) -// Row 2 #define IT_DLQU A(IT_Q) // „ #define IT_OMEG A(IT_W) // Ω #define IT_EURO A(IT_E) // € @@ -166,7 +123,6 @@ #define IT_PI A(IT_P) // π #define IT_LBRC A(IT_EGRV) // [ #define IT_RBRC A(IT_PLUS) // ] -// Row 3 #define IT_ARNG A(IT_A) // Å #define IT_SS A(IT_S) // ß #define IT_PDIF A(IT_D) // ∂ @@ -179,7 +135,6 @@ #define IT_AT A(IT_OGRV) // @ #define IT_HASH A(IT_AGRV) // # #define IT_PILC A(IT_UGRV) // ¶ -// Row 4 #define IT_LTEQ A(IT_LABK) // ≤ #define IT_NARS A(IT_Z) // ∑ #define IT_DAGG A(IT_X) // † @@ -191,21 +146,6 @@ #define IT_ELLP A(IT_COMM) // … #define IT_BULT A(IT_DOT) // • #define IT_NDSH A(IT_MINS) // – - -/* Shift+Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ı │ » │ ” │ ’ │ ¢ │ ‰ │ › │ ⁄ │ │ │ ≈ │ ¿ │ ± │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ ‚ │ À │ È │ Ì │ Ò │ │ Ù │ │ │ ∏ │ { │ } │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ ¯ │ ˘ │ ˙ │ ˚ │ ¸ │ ˝ │ ˛ │ ˇ │ Ç │ │ ◊ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≥ │ │ ‡ │ Á │ É │ Í │ Ó │ Ú │ │ · │ — │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define IT_DLSI S(A(IT_BSLS)) // ı #define IT_RDAQ S(A(IT_1)) // » #define IT_RDQU S(A(IT_2)) // ” @@ -218,7 +158,6 @@ #define IT_AEQL S(A(IT_0)) // ≈ #define IT_IQUE S(A(IT_QUOT)) // ¿ #define IT_PLMN S(A(IT_IGRV)) // ± -// Row 2 #define IT_SLQU S(A(IT_Q)) // ‚ #define IT_CAGR S(A(IT_W)) // À #define IT_CEGR S(A(IT_E)) // È @@ -228,7 +167,6 @@ #define IT_NARP S(A(IT_P)) // ∏ #define IT_LCBR S(A(IT_EGRV)) // { #define IT_RCBR S(A(IT_PLUS)) // } -// Row 3 #define IT_MACR S(A(IT_S)) // ¯ #define IT_BREV S(A(IT_D)) // ˘ #define IT_DOTA S(A(IT_F)) // ˙ @@ -239,7 +177,6 @@ #define IT_CARN S(A(IT_L)) // ˇ #define IT_CCCE S(A(IT_OGRV)) // Ç #define IT_LOZN S(A(IT_UGRV)) // ◊ -// Row 4 #define IT_GTEQ S(A(IT_LABK)) // ≥ #define IT_DDAG S(A(IT_X)) // ‡ #define IT_CAAC S(A(IT_C)) // Á @@ -249,3 +186,4 @@ #define IT_CUAC S(A(IT_M)) // Ú #define IT_MDDT S(A(IT_DOT)) // · #define IT_MDSH S(A(IT_MINS)) // — + diff --git a/quantum/keymap_extras/keymap_japanese.h b/quantum/keymap_extras/keymap_japanese.h index df78af8399..286863deea 100644 --- a/quantum/keymap_extras/keymap_japanese.h +++ b/quantum/keymap_extras/keymap_japanese.h @@ -1,45 +1,33 @@ -/* Copyright 2016 h-youhei - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * JP106-layout (Japanese Standard) - * - * For more information, see - * http://www2d.biglobe.ne.jp/~msyk/keyboard/layout/usbkeycode.html - * note: This website is written in Japanese. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │Z↔H│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ ^ │ ¥ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ @ │ [ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ Eisū │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ : │ ] │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ \ │ │ - * ├─────┬──┴┬──┴──┬┴───┴┬──┴───┴──┬┴───┴┬──┴┬──┴┬──┴┬──┴┬─────┤ - * │ │ │ │Muhen│ │ Hen │K↔H│ │ │ │ │ - * └─────┴───┴─────┴─────┴─────────┴─────┴───┴───┴───┴───┴─────┘ - */ -// Row 1 +// Aliases #define JP_ZKHK KC_GRV // Zenkaku ↔ Hankaku ↔ Kanji (半角 ↔ 全角 ↔ 漢字) #define JP_1 KC_1 // 1 #define JP_2 KC_2 // 2 @@ -54,7 +42,6 @@ #define JP_MINS KC_MINS // - #define JP_CIRC KC_EQL // ^ #define JP_YEN KC_INT3 // ¥ -// Row 2 #define JP_Q KC_Q // Q #define JP_W KC_W // W #define JP_E KC_E // E @@ -67,7 +54,6 @@ #define JP_P KC_P // P #define JP_AT KC_LBRC // @ #define JP_LBRC KC_RBRC // [ -// Row 3 #define JP_EISU KC_CAPS // Eisū (英数) #define JP_A KC_A // A #define JP_S KC_S // S @@ -81,7 +67,6 @@ #define JP_SCLN KC_SCLN // ; #define JP_COLN KC_QUOT // : #define JP_RBRC KC_NUHS // ] -// Row 4 #define JP_Z KC_Z // Z #define JP_X KC_X // X #define JP_C KC_C // C @@ -93,25 +78,9 @@ #define JP_DOT KC_DOT // . #define JP_SLSH KC_SLSH // / #define JP_BSLS KC_INT1 // (backslash) -// Row 5 #define JP_MHEN KC_INT5 // Muhenkan (無変換) #define JP_HENK KC_INT4 // Henkan (変換) #define JP_KANA KC_INT2 // Katakana ↔ Hiragana ↔ Rōmaji (カタカナ ↔ ひらがな ↔ ローマ字) - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │ ! │ " │ # │ $ │ % │ & │ ' │ ( │ ) │ │ = │ ~ │ | │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ` │ { │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ Caps │ │ │ │ │ │ │ │ │ │ + │ * │ } │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ _ │ │ - * ├─────┬──┴┬──┴──┬┴───┴┬──┴───┴──┬┴───┴┬──┴┬──┴┬──┴┬──┴┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ - * └─────┴───┴─────┴─────┴─────────┴─────┴───┴───┴───┴───┴─────┘ - */ -// Row 1 #define JP_EXLM S(JP_1) // ! #define JP_DQUO S(JP_2) // " #define JP_HASH S(JP_3) // # @@ -124,16 +93,14 @@ #define JP_EQL S(JP_MINS) // = #define JP_TILD S(JP_CIRC) // ~ #define JP_PIPE S(JP_YEN) // | -// Row 2 #define JP_GRV S(JP_AT) // ` #define JP_LCBR S(JP_LBRC) // { -// Row 3 #define JP_CAPS S(JP_EISU) // Caps Lock #define JP_PLUS S(JP_SCLN) // + #define JP_ASTR S(JP_COLN) // * #define JP_RCBR S(JP_RBRC) // } -// Row 4 #define JP_LABK S(JP_COMM) // < #define JP_RABK S(JP_DOT) // > #define JP_QUES S(JP_SLSH) // ? #define JP_UNDS S(JP_BSLS) // _ + diff --git a/quantum/keymap_extras/keymap_korean.h b/quantum/keymap_extras/keymap_korean.h index 3d41a98b88..073647de7f 100644 --- a/quantum/keymap_extras/keymap_korean.h +++ b/quantum/keymap_extras/keymap_korean.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ ₩ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├─────┬──┴┬──┴──┬┴──┬┴───┴───┴───┴──┬┴──┬┴───┴┬──┴┬───┬─────┤ - * │ │ │ │Hnj│ │H↔Y│ │ │ │ │ - * └─────┴───┴─────┴───┴───────────────┴───┴─────┴───┴───┴─────┘ - */ -// Row 1 +// Aliases #define KR_GRV KC_GRV // ` #define KR_1 KC_1 // 1 #define KR_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define KR_0 KC_0 // 0 #define KR_MINS KC_MINS // - #define KR_EQL KC_EQL // = -// Row 2 #define KR_Q KC_Q // Q #define KR_W KC_W // W #define KR_E KC_E // E @@ -61,7 +54,6 @@ #define KR_LBRC KC_LBRC // [ #define KR_RBRC KC_RBRC // ] #define KR_WON KC_BSLS // ₩ -// Row 3 #define KR_A KC_A // A #define KR_S KC_S // S #define KR_D KC_D // D @@ -73,7 +65,6 @@ #define KR_L KC_L // L #define KR_SCLN KC_SCLN // ; #define KR_QUOT KC_QUOT // ' -// Row 4 #define KR_Z KC_Z // Z #define KR_X KC_X // X #define KR_C KC_C // C @@ -84,24 +75,8 @@ #define KR_COMM KC_COMM // , #define KR_DOT KC_DOT // . #define KR_SLSH KC_SLSH // / -// Row 5 #define KR_HANJ KC_LNG2 // Hanja (한자) #define KR_HAEN KC_LNG1 // Han ↔ Yeong (한 ↔ 영) - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├─────┬──┴┬──┴──┬┴──┬┴───┴───┴───┴──┬┴──┬┴───┴┬──┴┬───┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ - * └─────┴───┴─────┴───┴───────────────┴───┴─────┴───┴───┴─────┘ - */ -// Row 1 #define KR_TILD S(KR_GRV) // ~ #define KR_EXLM S(KR_1) // ! #define KR_AT S(KR_2) // @ @@ -115,14 +90,12 @@ #define KR_RPRN S(KR_0) // ) #define KR_UNDS S(KR_MINS) // _ #define KR_PLUS S(KR_EQL) // + -// Row 2 #define KR_LCBR S(KR_LBRC) // { #define KR_RCBR S(KR_RBRC) // } #define KR_PIPE S(KR_WON) // | -// Row 3 #define KR_COLN S(KR_SCLN) // : #define KR_DQUO S(KR_QUOT) // " -// Row 4 #define KR_LABK S(KR_COMM) // < #define KR_RABK S(KR_DOT) // > #define KR_QUES S(KR_SLSH) // ? + diff --git a/quantum/keymap_extras/keymap_latvian.h b/quantum/keymap_extras/keymap_latvian.h index 087138cb72..e3ac1cd433 100644 --- a/quantum/keymap_extras/keymap_latvian.h +++ b/quantum/keymap_extras/keymap_latvian.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ \ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define LV_GRV KC_GRV // ` #define LV_1 KC_1 // 1 #define LV_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define LV_0 KC_0 // 0 #define LV_MINS KC_MINS // - #define LV_EQL KC_EQL // = -// Row 2 #define LV_Q KC_Q // Q #define LV_W KC_W // W #define LV_E KC_E // E @@ -60,7 +53,6 @@ #define LV_P KC_P // P #define LV_LBRC KC_LBRC // [ #define LV_RBRC KC_RBRC // ] -// Row 3 #define LV_A KC_A // A #define LV_S KC_S // S #define LV_D KC_D // D @@ -73,7 +65,6 @@ #define LV_SCLN KC_SCLN // ; #define LV_QUOT KC_QUOT // ' (dead) #define LV_BSLS KC_NUHS // (backslash) -// Row 4 #define LV_NUBS KC_NUBS // (backslash) #define LV_Z KC_Z // Z #define LV_X KC_X // X @@ -85,21 +76,6 @@ #define LV_COMM KC_COMM // , #define LV_DOT KC_DOT // . #define LV_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ : │ " │ | │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define LV_TILD S(LV_GRV) // ~ #define LV_EXLM S(LV_1) // ! #define LV_AT S(LV_2) // @ @@ -113,75 +89,39 @@ #define LV_RPRN S(LV_0) // ) #define LV_UNDS S(LV_MINS) // _ #define LV_PLUS S(LV_EQL) // + -// Row 2 #define LV_LCBR S(LV_LBRC) // { #define LV_RCBR S(LV_RBRC) // } -// Row 3 #define LV_COLN S(LV_SCLN) // : #define LV_DQUO S(LV_QUOT) // " (dead) #define LV_PIPE S(LV_BSLS) // | -// Row 4 #define LV_LABK S(LV_COMM) // < #define LV_RABK S(LV_DOT) // > #define LV_QUES S(LV_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ - │ │ « │ » │ € │ │ ’ │ │ │ │ │ – │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ Ē │ Ŗ │ │ │ Ū │ Ī │ Ō │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Ā │ Š │ │ │ Ģ │ │ │ Ķ │ Ļ │ │ ´ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ Ž │ │ Č │ │ │ Ņ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define LV_SHYP ALGR(LV_GRV) // (soft hyphen) -#define LV_NBSP ALGR(LV_1) // (non-breaking space) +#define LV_NBSP ALGR(LV_1) // (non-breaking space) #define LV_LDAQ ALGR(LV_2) // « #define LV_RDAQ ALGR(LV_3) // » #define LV_EURO ALGR(LV_4) // € #define LV_RSQU ALGR(LV_6) // ’ #define LV_NDSH ALGR(LV_MINS) // – -// Row 2 #define LV_EMAC ALGR(LV_E) // Ē #define LV_RCED ALGR(LV_R) // Ŗ #define LV_UMAC ALGR(LV_U) // Ū #define LV_IMAC ALGR(LV_I) // Ī #define LV_OMAC ALGR(LV_O) // Ō -// Row 3 #define LV_AMAC ALGR(LV_A) // Ā #define LV_SCAR ALGR(LV_S) // Š #define LV_GCED ALGR(LV_G) // Ģ #define LV_KCED ALGR(LV_K) // Ķ #define LV_LCED ALGR(LV_L) // Ļ #define LV_ACUT ALGR(LV_QUOT) // ´ (dead) -// Row 4 #define LV_ZCAR ALGR(LV_Z) // Ž #define LV_CCAR ALGR(LV_C) // Č #define LV_NCED ALGR(LV_N) // Ņ - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ § │ ° │ │ ± │ × │ │ │ — │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define LV_SECT S(ALGR(LV_4)) // § #define LV_DEG S(ALGR(LV_5)) // ° #define LV_PLMN S(ALGR(LV_7)) // ± #define LV_MUL S(ALGR(LV_8)) // × #define LV_MDSH S(ALGR(LV_MINS)) // — -// Row 3 #define LV_DIAE S(ALGR(LV_QUOT)) // ¨ (dead) + diff --git a/quantum/keymap_extras/keymap_lithuanian_azerty.h b/quantum/keymap_extras/keymap_lithuanian_azerty.h index 6f47b16702..11de3ad030 100644 --- a/quantum/keymap_extras/keymap_lithuanian_azerty.h +++ b/quantum/keymap_extras/keymap_lithuanian_azerty.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ ! │ - │ / │ ; │ : │ , │ . │ = │ ( │ ) │ ? │ X │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Ą │ Ž │ E │ R │ T │ Y │ U │ I │ O │ P │ Į │ W │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ Š │ G │ H │ J │ K │ L │ Ų │ Ė │ Q │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ Ū │ C │ V │ B │ N │ M │ Č │ F │ Ę │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define LT_GRV KC_GRV // ` #define LT_EXLM KC_1 // ! #define LT_MINS KC_2 // - @@ -47,7 +41,6 @@ #define LT_RPRN KC_0 // ) #define LT_QUES KC_MINS // ? #define LT_X KC_EQL // X -// Row 2 #define LT_AOGO KC_Q // Ą #define LT_ZCAR KC_W // Ž #define LT_E KC_E // E @@ -60,7 +53,6 @@ #define LT_P KC_P // P #define LT_IOGO KC_LBRC // Į #define LT_W KC_RBRC // W -// Row 3 #define LT_A KC_A // A #define LT_S KC_S // S #define LT_D KC_D // D @@ -73,7 +65,6 @@ #define LT_UOGO KC_SCLN // Ų #define LT_EDOT KC_QUOT // Ė #define LT_Q KC_NUHS // Q -// Row 4 #define LT_LABK KC_NUBS // < #define LT_Z KC_Z // Z #define LT_UMAC KC_X // Ū @@ -85,21 +76,6 @@ #define LT_CCAR KC_COMM // Č #define LT_F KC_DOT // F #define LT_EOGO KC_SLSH // Ę - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define LT_TILD S(LT_GRV) // ~ #define LT_1 S(LT_EXLM) // 1 #define LT_2 S(LT_MINS) // 2 @@ -112,23 +88,7 @@ #define LT_9 S(LT_LPRN) // 9 #define LT_0 S(LT_RPRN) // 0 #define LT_PLUS S(LT_QUES) // + -// Row 4 #define LT_RABK S(LT_LABK) // > - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ´ │ @ │ _ │ # │ $ │ § │ ^ │ & │ * │ [ │ ] │ ' │ % │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ { │ } │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ " │ | │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ – │ │ │ │ │ │ │ │ „ │ “ │ \ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define LT_ACUT ALGR(LT_GRV) // ´ #define LT_AT ALGR(LT_EXLM) // @ #define LT_UNDS ALGR(LT_MINS) // _ @@ -142,15 +102,13 @@ #define LT_RBRC ALGR(LT_RPRN) // ] #define LT_QUOT ALGR(LT_QUES) // ' #define LT_PERC ALGR(LT_X) // % -// Row 2 #define LT_EURO ALGR(LT_E) // € #define LT_LCBR ALGR(LT_IOGO) // { #define LT_RCBR ALGR(LT_W) // } -// Row 3 #define LT_DQUO ALGR(LT_EDOT) // " #define LT_PIPE ALGR(LT_Q) // | -// Row 4 #define LT_NDSH ALGR(LT_LABK) // – #define LT_DLQU ALGR(LT_CCAR) // „ #define LT_LDQU ALGR(LT_F) // “ #define LT_BSLS ALGR(LT_EOGO) // (backslash) + diff --git a/quantum/keymap_extras/keymap_lithuanian_qwerty.h b/quantum/keymap_extras/keymap_lithuanian_qwerty.h index afca2dc750..c27389971e 100644 --- a/quantum/keymap_extras/keymap_lithuanian_qwerty.h +++ b/quantum/keymap_extras/keymap_lithuanian_qwerty.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ Ą │ Č │ Ę │ Ė │ Į │ Š │ Ų │ Ū │ 9 │ 0 │ - │ Ž │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define LT_GRV KC_GRV // ` #define LT_AOGO KC_1 // Ą #define LT_CCAR KC_2 // Č @@ -47,7 +41,6 @@ #define LT_0 KC_0 // 0 #define LT_MINS KC_MINS // - #define LT_ZCAR KC_EQL // Ž -// Row 2 #define LT_Q KC_Q // Q #define LT_W KC_W // W #define LT_E KC_E // E @@ -60,7 +53,6 @@ #define LT_P KC_P // P #define LT_LBRC KC_LBRC // [ #define LT_RBRC KC_RBRC // ] -// Row 3 #define LT_A KC_A // A #define LT_S KC_S // S #define LT_D KC_D // D @@ -73,7 +65,6 @@ #define LT_SCLN KC_SCLN // ; #define LT_QUOT KC_QUOT // ' #define LT_BSLS KC_BSLS // (backslash) -// Row 4 #define LT_Z KC_Z // Z #define LT_X KC_X // X #define LT_C KC_C // C @@ -84,51 +75,18 @@ #define LT_COMM KC_COMM // , #define LT_DOT KC_DOT // . #define LT_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ │ │ │ │ │ │ │ │ ( │ ) │ _ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define LT_TILD S(LT_GRV) // ~ #define LT_LPRN S(LT_9) // ( #define LT_RPRN S(LT_0) // ) #define LT_UNDS S(LT_MINS) // _ -// Row 2 #define LT_LCBR S(LT_LBRC) // { #define LT_RCBR S(LT_RBRC) // } -// Row 3 #define LT_COLN S(LT_SCLN) // : #define LT_DQUO S(LT_QUOT) // " #define LT_PIPE S(LT_BSLS) // | -// Row 4 #define LT_LABK S(LT_COMM) // < #define LT_RABK S(LT_DOT) // > #define LT_QUES S(LT_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ │ │ │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define LT_1 ALGR(LT_AOGO) // 1 #define LT_2 ALGR(LT_CCAR) // 2 #define LT_3 ALGR(LT_EOGO) // 3 @@ -138,23 +96,7 @@ #define LT_7 ALGR(LT_UOGO) // 7 #define LT_8 ALGR(LT_UMAC) // 8 #define LT_EQL ALGR(LT_ZCAR) // = -// Row 2 #define LT_EURO ALGR(LT_E) // € - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ │ │ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define LT_EXLM S(ALGR(LT_AOGO)) // ! #define LT_AT S(ALGR(LT_CCAR)) // @ #define LT_HASH S(ALGR(LT_EOGO)) // # @@ -164,3 +106,4 @@ #define LT_AMPR S(ALGR(LT_UOGO)) // & #define LT_ASTR S(ALGR(LT_UMAC)) // * #define LT_PLUS S(ALGR(LT_ZCAR)) // + + diff --git a/quantum/keymap_extras/keymap_neo2.h b/quantum/keymap_extras/keymap_neo2.h index f9fc00d794..e8352ffa08 100644 --- a/quantum/keymap_extras/keymap_neo2.h +++ b/quantum/keymap_extras/keymap_neo2.h @@ -1,39 +1,33 @@ -/* Copyright 2016 Matthias Schmitt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ^ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ X │ V │ L │ C │ W │ K │ H │ G │ F │ Q │ ß │ ´ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ L3 │ U │ I │ A │ E │ O │ S │ N │ R │ T │ D │ Y │ L3│ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │L4 │ Ü │ Ö │ Ä │ P │ Z │ B │ M │ , │ . │ J │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ L4 │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define NE_CIRC KC_GRV // ^ (dead) #define NE_1 KC_1 // 1 #define NE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define NE_0 KC_0 // 0 #define NE_MINS KC_MINS // - #define NE_GRV KC_EQL // ` (dead) -// Row 2 #define NE_X KC_Q // X #define NE_V KC_W // V #define NE_L KC_E // L @@ -60,7 +53,6 @@ #define NE_Q KC_P // Q #define NE_SS KC_LBRC // ß #define NE_ACUT KC_RBRC // ´ (dead) -// Row 3 #define NE_L3L KC_CAPS // (layer 3) #define NE_U KC_A // U #define NE_I KC_S // I @@ -74,7 +66,6 @@ #define NE_D KC_SCLN // D #define NE_Y KC_QUOT // Y #define NE_L3R KC_NUHS // (layer 3) -// Row 4 #define NE_L4L KC_NUBS // (layer 4) #define NE_UDIA KC_Z // Ü #define NE_ODIA KC_X // Ö @@ -86,5 +77,5 @@ #define NE_COMM KC_COMM // , #define NE_DOT KC_DOT // . #define NE_J KC_SLSH // J -// Row 5 #define NE_L4R KC_ALGR // (layer 4) + diff --git a/quantum/keymap_extras/keymap_nordic.h b/quantum/keymap_extras/keymap_nordic.h index 55a58a25b0..e336916713 100644 --- a/quantum/keymap_extras/keymap_nordic.h +++ b/quantum/keymap_extras/keymap_nordic.h @@ -1,38 +1,43 @@ -/* Copyright 2015-2016 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" +// clang-format off -// Normal characters -#define NO_HALF KC_GRV +// Aliases +#define NO_HALF KC_GRV #define NO_PLUS KC_MINS -#define NO_ACUT KC_EQL - -#define NO_AM KC_LBRC +#define NO_ACUT KC_EQL +#define NO_AM KC_LBRC #define NO_QUOT KC_RBRC // this is the "umlaut" char on Nordic keyboards, Apple layout -#define NO_AE KC_SCLN +#define NO_AE KC_SCLN #define NO_OSLH KC_QUOT #define NO_APOS KC_NUHS - #define NO_LESS KC_NUBS #define NO_MINS KC_SLSH - -// Shifted characters #define NO_SECT LSFT(NO_HALF) #define NO_QUO2 LSFT(KC_2) #define NO_BULT LSFT(KC_4) @@ -40,29 +45,24 @@ #define NO_SLSH LSFT(KC_7) #define NO_LPRN LSFT(KC_8) #define NO_RPRN LSFT(KC_9) -#define NO_EQL LSFT(KC_0) +#define NO_EQL LSFT(KC_0) #define NO_QUES LSFT(NO_PLUS) -#define NO_GRV LSFT(NO_ACUT) - +#define NO_GRV LSFT(NO_ACUT) #define NO_CIRC LSFT(NO_QUOT) - #define NO_GRTR LSFT(NO_LESS) #define NO_SCLN LSFT(KC_COMM) #define NO_COLN LSFT(KC_DOT) #define NO_UNDS LSFT(NO_MINS) - -// Alt Gr-ed characters -#define NO_AT ALGR(KC_2) -#define NO_PND ALGR(KC_3) -#define NO_DLR ALGR(KC_4) -#define NO_LCBR ALGR(KC_7) -#define NO_LBRC ALGR(KC_8) -#define NO_RBRC ALGR(KC_9) -#define NO_RCBR ALGR(KC_0) +#define NO_AT ALGR(KC_2) +#define NO_PND ALGR(KC_3) +#define NO_DLR ALGR(KC_4) +#define NO_LCBR ALGR(KC_7) +#define NO_LBRC ALGR(KC_8) +#define NO_RBRC ALGR(KC_9) +#define NO_RCBR ALGR(KC_0) #define NO_PIPE ALGR(KC_NUBS) - -#define NO_EURO ALGR(KC_E) +#define NO_EURO ALGR(KC_E) #define NO_TILD ALGR(NO_QUOT) - #define NO_BSLS ALGR(KC_MINS) -#define NO_MU ALGR(KC_M) +#define NO_MU ALGR(KC_M) + diff --git a/quantum/keymap_extras/keymap_norman.h b/quantum/keymap_extras/keymap_norman.h index 9f20f66873..1f773bb410 100644 --- a/quantum/keymap_extras/keymap_norman.h +++ b/quantum/keymap_extras/keymap_norman.h @@ -1,39 +1,33 @@ -/* Copyright 2019 Torben Hoffmann - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ D │ F │ K │ J │ U │ R │ L │ ; │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ S │ E │ T │ G │ Y │ N │ I │ O │ H │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ C │ V │ B │ P │ M │ , │ . │ / │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define NM_GRV KC_GRV // ` #define NM_1 KC_1 // 1 #define NM_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define NM_0 KC_0 // 0 #define NM_MINS KC_MINS // - #define NM_EQL KC_EQL // = -// Row 2 #define NM_Q KC_Q // Q #define NM_W KC_W // W #define NM_D KC_E // D @@ -61,7 +54,6 @@ #define NM_LBRC KC_LBRC // [ #define NM_RBRC KC_RBRC // ] #define NM_BSLS KC_BSLS // (backslash) -// Row 3 #define NM_A KC_A // A #define NM_S KC_S // S #define NM_E KC_D // E @@ -73,7 +65,6 @@ #define NM_O KC_L // O #define NM_H KC_SCLN // H #define NM_QUOT KC_QUOT // ' -// Row 4 #define NM_Z KC_Z // Z #define NM_X KC_X // X #define NM_C KC_C // C @@ -84,21 +75,6 @@ #define NM_COMM KC_COMM // , #define NM_DOT KC_DOT // . #define NM_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define NM_TILD S(NM_GRV) // ~ #define NM_EXLM S(NM_1) // ! #define NM_AT S(NM_2) // @ @@ -112,14 +88,12 @@ #define NM_RPRN S(NM_0) // ) #define NM_UNDS S(NM_MINS) // _ #define NM_PLUS S(NM_EQL) // + -// Row 2 #define NM_COLN S(NM_SCLN) // : #define NM_LCBR S(NM_LBRC) // { #define NM_RCBR S(NM_RBRC) // } #define NM_PIPE S(NM_BSLS) // | -// Row 3 #define NM_DQUO S(NM_QUOT) // " -// Row 4 #define NM_LABK S(NM_COMM) // < #define NM_RABK S(NM_DOT) // > #define NM_QUES S(NM_SLSH) // ? + diff --git a/quantum/keymap_extras/keymap_norwegian.h b/quantum/keymap_extras/keymap_norwegian.h index b2499f4fda..33193d6a4d 100644 --- a/quantum/keymap_extras/keymap_norwegian.h +++ b/quantum/keymap_extras/keymap_norwegian.h @@ -1,39 +1,33 @@ -/* Copyright 2016 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ | │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ \ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ø │ Æ │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define NO_PIPE KC_GRV // | #define NO_1 KC_1 // 1 #define NO_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define NO_0 KC_0 // 0 #define NO_PLUS KC_MINS // + #define NO_BSLS KC_EQL // (backslash) -// Row 2 #define NO_Q KC_Q // Q #define NO_W KC_W // W #define NO_E KC_E // E @@ -60,7 +53,6 @@ #define NO_P KC_P // P #define NO_ARNG KC_LBRC // Å #define NO_DIAE KC_RBRC // ¨ (dead) -// Row 3 #define NO_A KC_A // A #define NO_S KC_S // S #define NO_D KC_D // D @@ -73,7 +65,6 @@ #define NO_OSTR KC_SCLN // Ø #define NO_AE KC_QUOT // Æ #define NO_QUOT KC_NUHS // ' -// Row 4 #define NO_LABK KC_NUBS // < #define NO_Z KC_Z // Z #define NO_X KC_X // X @@ -85,21 +76,6 @@ #define NO_COMM KC_COMM // , #define NO_DOT KC_DOT // . #define NO_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ § │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define NO_SECT S(NO_PIPE) // § #define NO_EXLM S(NO_1) // ! #define NO_DQUO S(NO_2) // " @@ -113,30 +89,12 @@ #define NO_EQL S(NO_0) // = #define NO_QUES S(NO_PLUS) // ? #define NO_GRV S(NO_BSLS) // ` (dead) -// Row 2 #define NO_CIRC S(NO_DIAE) // ^ (dead) -// Row 3 #define NO_ASTR S(NO_QUOT) // * -// Row 4 #define NO_RABK S(NO_LABK) // > #define NO_SCLN S(NO_COMM) // ; #define NO_COLN S(NO_DOT) // : #define NO_UNDS S(NO_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ @ │ £ │ $ │ € │ │ { │ [ │ ] │ } │ │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ µ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define NO_AT ALGR(NO_2) // @ #define NO_PND ALGR(NO_3) // £ #define NO_DLR ALGR(NO_4) // $ @@ -146,7 +104,6 @@ #define NO_RBRC ALGR(NO_9) // ] #define NO_RCBR ALGR(NO_0) // } #define NO_ACUT ALGR(NO_BSLS) // ´ (dead) -// Row 2 #define NO_TILD ALGR(NO_DIAE) // ~ (dead) -// Row 4 #define NO_MICR ALGR(NO_M) // µ + diff --git a/quantum/keymap_extras/keymap_plover.h b/quantum/keymap_extras/keymap_plover.h index cd07211bca..b51e44b8bb 100644 --- a/quantum/keymap_extras/keymap_plover.h +++ b/quantum/keymap_extras/keymap_plover.h @@ -1,65 +1,54 @@ -/* Copyright 2016 James Kay - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │Num│ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ S │ T │ P │ H │ │ * │ F │ P │ L │ T │ D │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ K │ W │ R │ │ │ R │ B │ G │ S │ Z │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ A │ O │ │ E │ U │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 -#define PV_NUM KC_1 - -// Row 2 -#define PV_LS KC_Q -#define PV_LT KC_W -#define PV_LP KC_E -#define PV_LH KC_R -#define PV_STAR KC_Y -#define PV_RF KC_U -#define PV_RP KC_I -#define PV_RL KC_O -#define PV_RT KC_P +// Aliases +#define PV_NUM KC_1 +#define PV_LS KC_Q +#define PV_LT KC_W +#define PV_LP KC_E +#define PV_LH KC_R +#define PV_STAR KC_Y +#define PV_RF KC_U +#define PV_RP KC_I +#define PV_RL KC_O +#define PV_RT KC_P #define PV_RD KC_LBRC - -// Row 3 -#define PV_LK KC_S -#define PV_LW KC_D -#define PV_LR KC_F -#define PV_RR KC_J -#define PV_RB KC_K -#define PV_RG KC_L +#define PV_LK KC_S +#define PV_LW KC_D +#define PV_LR KC_F +#define PV_RR KC_J +#define PV_RB KC_K +#define PV_RG KC_L #define PV_RS KC_SCLN #define PV_RZ KC_QUOT +#define PV_A KC_C +#define PV_O KC_V +#define PV_E KC_N +#define PV_U KC_M -// Row 4 -#define PV_A KC_C -#define PV_O KC_V -#define PV_E KC_N -#define PV_U KC_M diff --git a/quantum/keymap_extras/keymap_plover_dvorak.h b/quantum/keymap_extras/keymap_plover_dvorak.h index 445a123151..f8341f8cbc 100644 --- a/quantum/keymap_extras/keymap_plover_dvorak.h +++ b/quantum/keymap_extras/keymap_plover_dvorak.h @@ -1,45 +1,54 @@ -/* Copyright 2016 James Kay - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once - -#include "keymap_dvorak.h" +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ -#define PD_NUM DV_1 -#define PD_LS DV_Q -#define PD_LT DV_W -#define PD_LP DV_E -#define PD_LH DV_R -#define PD_LK DV_S -#define PD_LW DV_D -#define PD_LR DV_F +#pragma once +#include "keymap.h" +// clang-format off -#define PD_STAR DV_Y -#define PD_RF DV_U -#define PD_RP DV_I -#define PD_RL DV_O -#define PD_RT DV_P -#define PD_RD DV_LBRC -#define PD_RR DV_J -#define PD_RB DV_K -#define PD_RG DV_L -#define PD_RS DV_SCLN -#define PD_RZ DV_QUOT +// Aliases +#define PD_NUM DV_1 +#define PD_LS DV_Q +#define PD_LT DV_W +#define PD_LP DV_E +#define PD_LH DV_R +#define PD_LK DV_S +#define PD_LW DV_D +#define PD_LR DV_F +#define PD_STAR DV_Y +#define PD_RF DV_U +#define PD_RP DV_I +#define PD_RL DV_O +#define PD_RT DV_P +#define PD_RD DV_LBRC +#define PD_RR DV_J +#define PD_RB DV_K +#define PD_RG DV_L +#define PD_RS DV_SCLN +#define PD_RZ DV_QUOT +#define PD_A DV_C +#define PD_O DV_V +#define PD_E DV_N +#define PD_U DV_M -#define PD_A DV_C -#define PD_O DV_V -#define PD_E DV_N -#define PD_U DV_M diff --git a/quantum/keymap_extras/keymap_polish.h b/quantum/keymap_extras/keymap_polish.h index e5a32f22db..6b37d77a0a 100644 --- a/quantum/keymap_extras/keymap_polish.h +++ b/quantum/keymap_extras/keymap_polish.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define PL_GRV KC_GRV // ` #define PL_1 KC_1 // 1 #define PL_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define PL_0 KC_0 // 0 #define PL_MINS KC_MINS // - #define PL_EQL KC_EQL // = -// Row 2 #define PL_Q KC_Q // Q #define PL_W KC_W // W #define PL_E KC_E // E @@ -61,7 +54,6 @@ #define PL_LBRC KC_LBRC // [ #define PL_RBRC KC_RBRC // ] #define PL_BSLS KC_BSLS // (backslash) -// Row 3 #define PL_A KC_A // A #define PL_S KC_S // S #define PL_D KC_D // D @@ -73,7 +65,6 @@ #define PL_L KC_L // L #define PL_SCLN KC_SCLN // ; #define PL_QUOT KC_QUOT // ' -// Row 4 #define PL_Z KC_Z // Z #define PL_X KC_X // X #define PL_C KC_C // C @@ -84,21 +75,6 @@ #define PL_COMM KC_COMM // , #define PL_DOT KC_DOT // . #define PL_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define PL_TILD S(PL_GRV) // ~ #define PL_EXLM S(PL_1) // ! #define PL_AT S(PL_2) // @ @@ -112,41 +88,22 @@ #define PL_RPRN S(PL_0) // ) #define PL_UNDS S(PL_MINS) // _ #define PL_PLUS S(PL_EQL) // + -// Row 2 #define PL_LCBR S(PL_LBRC) // { #define PL_RCBR S(PL_RBRC) // } #define PL_PIPE S(PL_BSLS) // | -// Row 3 #define PL_COLN S(PL_SCLN) // : #define PL_DQUO S(PL_QUOT) // " -// Row 4 #define PL_LABK S(PL_COMM) // < #define PL_RABK S(PL_DOT) // > #define PL_QUES S(PL_SLSH) // ? +#define PL_EOGO ALGR(PL_E) // Ę +#define PL_EURO ALGR(PL_U) // € +#define PL_OACU ALGR(PL_O) // Ó +#define PL_AOGO ALGR(PL_A) // Ą +#define PL_SACU ALGR(PL_S) // Ś +#define PL_LSTR ALGR(PL_L) // Ł +#define PL_ZDOT ALGR(PL_Z) // Ż +#define PL_ZACU ALGR(PL_X) // Ź +#define PL_CACU ALGR(PL_C) // Ć +#define PL_NACU ALGR(PL_N) // Ń -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ Ę │ │ │ │ € │ │ Ó │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ Ą │ Ś │ │ │ │ │ │ │ Ł │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Ż │ Ź │ Ć │ │ │ Ń │ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 2 -#define PL_EOGO ALGR(PL_E) // Ę -#define PL_EURO ALGR(PL_U) // € -#define PL_OACU ALGR(PL_O) // Ó -// Row 3 -#define PL_AOGO ALGR(PL_A) // Ą -#define PL_SACU ALGR(PL_S) // Ś -#define PL_LSTR ALGR(PL_L) // Ł -// Row 4 -#define PL_ZDOT ALGR(PL_Z) // Ż -#define PL_ZACU ALGR(PL_X) // Ź -#define PL_CACU ALGR(PL_C) // Ć -#define PL_NACU ALGR(PL_N) // Ń diff --git a/quantum/keymap_extras/keymap_portuguese.h b/quantum/keymap_extras/keymap_portuguese.h index 19d7dcd817..17da9a6c11 100644 --- a/quantum/keymap_extras/keymap_portuguese.h +++ b/quantum/keymap_extras/keymap_portuguese.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ \ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ « │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ + │ ´ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ç │ º │ ~ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define PT_BSLS KC_GRV // (backslash) #define PT_1 KC_1 // 1 #define PT_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define PT_0 KC_0 // 0 #define PT_QUOT KC_MINS // ' #define PT_LDAQ KC_EQL // « -// Row 2 #define PT_Q KC_Q // Q #define PT_W KC_W // W #define PT_E KC_E // E @@ -60,7 +53,6 @@ #define PT_P KC_P // P #define PT_PLUS KC_LBRC // + #define PT_ACUT KC_RBRC // ´ (dead) -// Row 3 #define PT_A KC_A // A #define PT_S KC_S // S #define PT_D KC_D // D @@ -73,7 +65,6 @@ #define PT_CCED KC_SCLN // Ç #define PT_MORD KC_QUOT // º #define PT_TILD KC_NUHS // ~ (dead) -// Row 4 #define PT_LABK KC_NUBS // < #define PT_Z KC_Z // Z #define PT_X KC_X // X @@ -85,21 +76,6 @@ #define PT_COMM KC_COMM // , #define PT_DOT KC_DOT // . #define PT_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ | │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ » │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ * │ ` │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ ª │ ^ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define PT_PIPE S(PT_BSLS) // | #define PT_EXLM S(PT_1) // ! #define PT_DQUO S(PT_2) // " @@ -113,32 +89,14 @@ #define PT_EQL S(PT_0) // = #define PT_QUES S(PT_QUOT) // ? #define PT_RDAQ S(PT_LDAQ) // » -// Row 2 #define PT_ASTR S(PT_PLUS) // * #define PT_GRV S(PT_ACUT) // ` (dead) -// Row 3 #define PT_FORD S(PT_MORD) // ª #define PT_CIRC S(PT_TILD) // ^ (dead) -// Row 4 #define PT_RABK S(PT_LABK) // > #define PT_SCLN S(PT_COMM) // ; #define PT_COLN S(PT_DOT) // : #define PT_UNDS S(PT_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ @ │ £ │ § │ │ │ { │ [ │ ] │ } │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ ¨ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define PT_AT ALGR(PT_2) // @ #define PT_PND ALGR(PT_3) // £ #define PT_SECT ALGR(PT_4) // § @@ -146,6 +104,6 @@ #define PT_LBRC ALGR(PT_8) // [ #define PT_RBRC ALGR(PT_9) // ] #define PT_RCBR ALGR(PT_0) // } -// Row 2 #define PT_DIAE ALGR(PT_PLUS) // ¨ (dead) #define PT_EURO ALGR(PT_E) // € + diff --git a/quantum/keymap_extras/keymap_portuguese_mac_iso.h b/quantum/keymap_extras/keymap_portuguese_mac_iso.h index 78346af285..3d34a39ae5 100644 --- a/quantum/keymap_extras/keymap_portuguese_mac_iso.h +++ b/quantum/keymap_extras/keymap_portuguese_mac_iso.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ º │ ´ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ç │ ~ │ \ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 +// Aliases #define PT_SECT KC_GRV // § #define PT_1 KC_1 // 1 #define PT_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define PT_0 KC_0 // 0 #define PT_QUOT KC_MINS // ' #define PT_PLUS KC_EQL // + -// Row 2 #define PT_Q KC_Q // Q #define PT_W KC_W // W #define PT_E KC_E // E @@ -60,7 +53,6 @@ #define PT_P KC_P // P #define PT_MORD KC_LBRC // º #define PT_ACUT KC_RBRC // ´ (dead) -// Row 3 #define PT_A KC_A // A #define PT_S KC_S // S #define PT_D KC_D // D @@ -73,7 +65,6 @@ #define PT_CCED KC_SCLN // Ç #define PT_TILD KC_QUOT // ~ (dead) #define PT_BSLS KC_NUHS // (backslash) -// Row 4 #define PT_LABK KC_NUBS // < #define PT_Z KC_Z // Z #define PT_X KC_X // X @@ -85,21 +76,6 @@ #define PT_COMM KC_COMM // , #define PT_DOT KC_DOT // . #define PT_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ± │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ * │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ª │ ` │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ ^ │ | │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define PT_PLMN S(PT_SECT) // ± #define PT_EXLM S(PT_1) // ! #define PT_DQUO S(PT_2) // " @@ -113,32 +89,14 @@ #define PT_EQL S(PT_0) // = #define PT_QUES S(PT_QUOT) // ? #define PT_ASTR S(PT_PLUS) // * -// Row 2 #define PT_FORD S(PT_MORD) // ª #define PT_GRV S(PT_ACUT) // ` (dead) -// Row 3 #define PT_CIRC S(PT_TILD) // ^ (dead) #define PT_PIPE S(PT_BSLS) // | -// Row 4 #define PT_RABK S(PT_LABK) // > #define PT_SCLN S(PT_COMM) // ; #define PT_COLN S(PT_DOT) // : #define PT_UNDS S(PT_MINS) // _ - -/* Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ │ │ @ │ € │ £ │ ‰ │ ¶ │ ÷ │ [ │ ] │ ≠ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Œ │ ∑ │ Æ │ ® │ ™ │ ¥ │ † │ ı │ Ø │ π │ ° │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Å │ ß │ ∂ │ ƒ │ ˙ │ ˇ │ ¯ │ „ │ ‘ │ ¸ │ ˜ │ ‹ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≤ │ Ω │ « │ © │ √ │ ∫ │ ¬ │ µ │ “ │ … │ — │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define PT_APPL A(PT_1) // (Apple logo) #define PT_AT A(PT_2) // @ #define PT_EURO A(PT_3) // € @@ -149,7 +107,6 @@ #define PT_LBRC A(PT_8) // [ #define PT_RBRC A(PT_9) // ] #define PT_NEQL A(PT_0) // ≠ -// Row 2 #define PT_OE A(PT_Q) // Œ #define PT_NARS A(PT_W) // ∑ #define PT_AE A(PT_E) // Æ @@ -162,7 +119,6 @@ #define PT_PI A(PT_P) // π #define PT_DEG A(PT_MORD) // ° #define PT_DIAE A(PT_ACUT) // ¨ (dead) -// Row 3 #define PT_ARNG A(PT_A) // å #define PT_SS A(PT_S) // ß #define PT_PDIF A(PT_D) // ∂ @@ -175,7 +131,6 @@ #define PT_CEDL A(PT_CCED) // ¸ #define PT_STIL A(PT_TILD) // ˜ (dead) #define PT_LSAQ A(PT_BSLS) // ‹ -// Row 4 #define PT_LTEQ A(PT_LABK) // ≤ #define PT_OMEG A(PT_Z) // Ω #define PT_LDAQ A(PT_X) // « @@ -187,21 +142,6 @@ #define PT_LDQU A(PT_COMM) // “ #define PT_ELLP A(PT_DOT) // … #define PT_MDSH A(PT_MINS) // — - -/* Shift+Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ │ ¡ │ fi │ fl │ ¢ │ ∞ │ • │ ⁄ │ { │ } │ ≈ │ ¿ │ ◊ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ ‡ │ ˚ │ │ ∏ │ │ ˝ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ ∆ │ │ │ │ │ ‚ │ ’ │ ˛ │ ˆ │ › │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≥ │ │ » │ │ │ │ │ │ ” │ · │ – │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define PT_IEXL S(A(PT_1)) // ¡ #define PT_FI S(A(PT_2)) // fi #define PT_FL S(A(PT_3)) // fl @@ -214,21 +154,19 @@ #define PT_AEQL S(A(PT_0)) // ≈ #define PT_IQUE S(A(PT_QUOT)) // ¿ #define PT_LOZN S(A(PT_PLUS)) // ◊ -// Row 2 #define PT_DDAG S(A(PT_U)) // ‡ #define PT_RNGA S(A(PT_I)) // ˚ #define PT_NARP S(A(PT_P)) // ∏ #define PT_DACU S(A(PT_ACUT)) // ˝ -// Row 3 #define PT_INCR S(A(PT_D)) // ∆ #define PT_SLQU S(A(PT_K)) // ‚ #define PT_RSQU S(A(PT_L)) // ’ #define PT_OGON S(A(PT_CCED)) // ˛ #define PT_DCIR S(A(PT_TILD)) // ˆ (dead) #define PT_RSAQ S(A(PT_BSLS)) // › -// Row 4 #define PT_GTEQ S(A(PT_LABK)) // ≥ #define PT_RDAQ S(A(PT_X)) // » #define PT_RDQU S(A(PT_COMM)) // ” #define PT_MDDT S(A(PT_DOT)) // · #define PT_NDSH S(A(PT_MINS)) // – + diff --git a/quantum/keymap_extras/keymap_romanian.h b/quantum/keymap_extras/keymap_romanian.h index 27086d684c..fb48a0fda7 100644 --- a/quantum/keymap_extras/keymap_romanian.h +++ b/quantum/keymap_extras/keymap_romanian.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ „ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Ă │ Î │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ș │ Ț │  │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define RO_DLQU KC_GRV // „ #define RO_1 KC_1 // 1 #define RO_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define RO_0 KC_0 // 0 #define RO_MINS KC_MINS // - #define RO_EQL KC_EQL // = -// Row 2 #define RO_Q KC_Q // Q #define RO_W KC_W // W #define RO_E KC_E // E @@ -60,7 +53,6 @@ #define RO_P KC_P // P #define RO_ABRV KC_LBRC // Ă #define RO_ICIR KC_RBRC // Î -// Row 3 #define RO_A KC_A // A #define RO_S KC_S // S #define RO_D KC_D // D @@ -73,7 +65,6 @@ #define RO_SCOM KC_SCLN // Ș #define RO_TCOM KC_QUOT // Ț #define RO_ACIR KC_NUHS //  -// Row 4 #define RO_BSLS KC_NUBS // (backslash) #define RO_Z KC_Z // Z #define RO_X KC_X // X @@ -85,21 +76,6 @@ #define RO_COMM KC_COMM // , #define RO_DOT KC_DOT // . #define RO_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ” │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ | │ │ │ │ │ │ │ │ ; │ : │ ? │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define RO_RDQU S(RO_DLQU) // ” #define RO_EXLM S(RO_1) // ! #define RO_AT S(RO_2) // @ @@ -113,26 +89,10 @@ #define RO_RPRN S(RO_0) // ) #define RO_UNDS S(RO_MINS) // _ #define RO_PLUS S(RO_EQL) // + -// Row 4 #define RO_PIPE S(RO_BSLS) // | #define RO_SCLN S(RO_COMM) // ; #define RO_COLN S(RO_DOT) // : #define RO_QUES S(RO_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ ~ │ ˇ │ ^ │ ˘ │ ° │ ˛ │ ` │ ˙ │ ´ │ ˝ │ ¨ │ ¸ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ § │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ ß │ Đ │ │ │ │ │ │ Ł │ │ ' │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ © │ │ │ │ │ < │ > │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define RO_GRV ALGR(RO_DLQU) // ` #define RO_DTIL ALGR(RO_1) // ~ (dead) #define RO_CARN ALGR(RO_2) // ˇ (dead) @@ -146,43 +106,23 @@ #define RO_DACU ALGR(RO_0) // ˝ (dead) #define RO_DIAE ALGR(RO_MINS) // ¨ (dead) #define RO_CEDL ALGR(RO_EQL) // ¸ (dead) -// Row 2 #define RO_EURO ALGR(RO_E) // € #define RO_SECT ALGR(RO_P) // § #define RO_LBRC ALGR(RO_ABRV) // [ #define RO_RBRC ALGR(RO_ICIR) // ] -// Row 3 #define RO_SS ALGR(RO_S) // ß #define RO_DSTR ALGR(RO_D) // Đ #define RO_LSTR ALGR(RO_L) // Ł #define RO_QUOT ALGR(RO_TCOM) // ' -// Row 4 #define RO_COPY ALGR(RO_C) // © #define RO_LABK ALGR(RO_COMM) // < #define RO_RABK ALGR(RO_DOT) // > - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ │ │ │ │ │ │ │ │ │ │ – │ ± │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ " │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ « │ » │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define RO_TILD S(ALGR(RO_DLQU)) // ~ #define RO_NDSH S(ALGR(RO_MINS)) // – #define RO_PLMN S(ALGR(RO_EQL)) // ± -// Row 2 #define RO_LCBR S(ALGR(RO_ABRV)) // { #define RO_RCBR S(ALGR(RO_ICIR)) // } -// Row 3 #define RO_DQUO S(ALGR(RO_TCOM)) // " -// Row 4 #define RO_LDAQ S(ALGR(RO_COMM)) // « #define RO_RDAQ S(ALGR(RO_DOT)) // » + diff --git a/quantum/keymap_extras/keymap_russian.h b/quantum/keymap_extras/keymap_russian.h index 71aece677d..3643718444 100644 --- a/quantum/keymap_extras/keymap_russian.h +++ b/quantum/keymap_extras/keymap_russian.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ Ё │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Й │ Ц │ У │ К │ Е │ Н │ Г │ Ш │ Щ │ З │ Х │ Ъ │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ Ф │ Ы │ В │ А │ П │ Р │ О │ Л │ Д │ Ж │ Э │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Я │ Ч │ С │ М │ И │ Т │ Ь │ Б │ Ю │ . │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define RU_YO KC_GRV // Ё #define RU_1 KC_1 // 1 #define RU_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define RU_0 KC_0 // 0 #define RU_MINS KC_MINS // - #define RU_EQL KC_EQL // = -// Row 2 #define RU_SHTI KC_Q // Й #define RU_TSE KC_W // Ц #define RU_U KC_E // У @@ -61,7 +54,6 @@ #define RU_HA KC_LBRC // Х #define RU_HARD KC_RBRC // Ъ #define RU_BSLS KC_BSLS // (backslash) -// Row 3 #define RU_EF KC_A // Ф #define RU_YERU KC_S // Ы #define RU_VE KC_D // В @@ -73,7 +65,6 @@ #define RU_DE KC_L // Д #define RU_ZHE KC_SCLN // Ж #define RU_E KC_QUOT // Э -// Row 4 #define RU_YA KC_Z // Я #define RU_CHE KC_X // Ч #define RU_ES KC_C // С @@ -84,21 +75,6 @@ #define RU_BE KC_COMM // Б #define RU_YU KC_DOT // Ю #define RU_DOT KC_SLSH // . - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ! │ " │ № │ ; │ % │ : │ ? │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ / │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ │ │ , │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define RU_EXLM S(RU_1) // ! #define RU_DQUO S(RU_2) // " #define RU_NUM S(RU_3) // № @@ -111,23 +87,7 @@ #define RU_RPRN S(RU_0) // ) #define RU_UNDS S(RU_MINS) // _ #define RU_PLUS S(RU_EQL) // + -// Row 2 #define RU_SLSH S(RU_BSLS) // / -// Row 4 #define RU_COMM S(RU_DOT) // , +#define RU_RUBL ALGR(RU_8) // ₽ -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ ₽ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 -#define RU_RUBL ALGR(RU_8) // ₽ diff --git a/quantum/keymap_extras/keymap_serbian.h b/quantum/keymap_extras/keymap_serbian.h index a17dcc5f34..dd1bda7533 100644 --- a/quantum/keymap_extras/keymap_serbian.h +++ b/quantum/keymap_extras/keymap_serbian.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Љ │ Њ │ Е │ Р │ Т │ З │ У │ И │ О │ П │ Ш │ Ђ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ А │ С │ Д │ Ф │ Г │ Х │ Ј │ К │ Л │ Ч │ Ћ │ Ж │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Ѕ │ Џ │ Ц │ В │ Б │ Н │ М │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define RS_GRV KC_GRV // ` #define RS_1 KC_1 // 1 #define RS_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define RS_0 KC_0 // 0 #define RS_QUOT KC_MINS // ' (dead) #define RS_PLUS KC_EQL // + -// Row 2 #define RS_LJE KC_Q // Љ #define RS_NJE KC_W // Њ #define RS_IE KC_E // Е @@ -60,7 +53,6 @@ #define RS_PE KC_P // П #define RS_SHA KC_LBRC // Ш #define RS_DJE KC_RBRC // Ђ -// Row 3 #define RS_A KC_A // А #define RS_ES KC_S // С #define RS_DE KC_D // Д @@ -73,7 +65,6 @@ #define RS_CHE KC_SCLN // Ч #define RS_TSHE KC_QUOT // Ћ #define RS_ZHE KC_NUHS // Ж -// Row 4 #define RS_LABK KC_NUBS // < #define RS_DZE KC_Z // Ѕ #define RS_DZHE KC_X // Џ @@ -85,21 +76,6 @@ #define RS_COMM KC_COMM // , #define RS_DOT KC_DOT // . #define RS_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ * │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define RS_TILD S(RS_GRV) // ~ #define RS_EXLM S(RS_1) // ! #define RS_DQUO S(RS_2) // " @@ -113,24 +89,9 @@ #define RS_EQL S(RS_0) // = #define RS_QUES S(RS_QUOT) // ? #define RS_ASTR S(RS_PLUS) // * -// Row 4 #define RS_RABK S(RS_LABK) // > #define RS_SCLN S(RS_COMM) // ; #define RS_COLN S(RS_DOT) // : #define RS_UNDS S(RS_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 2 #define RS_EURO ALGR(RS_IE) // € + diff --git a/quantum/keymap_extras/keymap_serbian_latin.h b/quantum/keymap_extras/keymap_serbian_latin.h index 13c82eb405..83495b63be 100644 --- a/quantum/keymap_extras/keymap_serbian_latin.h +++ b/quantum/keymap_extras/keymap_serbian_latin.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ‚ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Š │ Đ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Č │ Ć │ Ž │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define RS_SLQU KC_GRV // ‚ (dead) #define RS_1 KC_1 // 1 #define RS_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define RS_0 KC_0 // 0 #define RS_QUOT KC_MINS // ' #define RS_PLUS KC_EQL // + -// Row 2 #define RS_Q KC_Q // Q #define RS_W KC_W // W #define RS_E KC_E // E @@ -60,7 +53,6 @@ #define RS_P KC_P // P #define RS_SCAR KC_LBRC // Š #define RS_DSTR KC_RBRC // Đ -// Row 3 #define RS_A KC_A // A #define RS_S KC_S // S #define RS_D KC_D // D @@ -73,7 +65,6 @@ #define RS_CCAR KC_SCLN // Č #define RS_CACU KC_QUOT // Ć #define RS_ZCAR KC_NUHS // Ž -// Row 4 #define RS_LABK KC_NUBS // < #define RS_Y KC_Z // Y #define RS_X KC_X // X @@ -85,21 +76,6 @@ #define RS_COMM KC_COMM // , #define RS_DOT KC_DOT // . #define RS_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ * │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define RS_TILD S(RS_SLQU) // ~ #define RS_EXLM S(RS_1) // ! #define RS_DQUO S(RS_2) // " @@ -113,26 +89,10 @@ #define RS_EQL S(RS_0) // = #define RS_QUES S(RS_QUOT) // ? #define RS_ASTR S(RS_PLUS) // * -// Row 4 #define RS_RABK S(RS_LABK) // > #define RS_SCLN S(RS_COMM) // ; #define RS_COLN S(RS_DOT) // : #define RS_UNDS S(RS_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ ˇ │ ^ │ ˘ │ ° │ ˛ │ ` │ ˙ │ ´ │ ˝ │ ¨ │ ¸ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ \ │ | │ € │ │ │ │ │ │ │ │ ÷ │ × │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ [ │ ] │ │ │ ł │ Ł │ │ ß │ ¤ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ @ │ { │ } │ § │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define RS_CARN ALGR(RS_2) // ˇ (dead) #define RS_CIRC ALGR(RS_3) // ^ (dead) #define RS_BREV ALGR(RS_4) // ˘ (dead) @@ -144,21 +104,19 @@ #define RS_DACU ALGR(RS_0) // ˝ (dead) #define RS_DIAE ALGR(RS_QUOT) // ¨ (dead) #define RS_CEDL ALGR(RS_PLUS) // ¸ (dead) -// Row 2 #define RS_BSLS ALGR(RS_Q) // (backslash) #define RS_PIPE ALGR(RS_W) // | #define RS_EURO ALGR(RS_E) // € #define RS_DIV ALGR(RS_SCAR) // ÷ #define RS_MUL ALGR(RS_DSTR) // × -// Row 3 #define RS_LBRC ALGR(RS_F) // [ #define RS_RBRC ALGR(RS_G) // ] #define RS_LLST ALGR(RS_K) // ł #define RS_CLST ALGR(RS_L) // Ł #define RS_SS ALGR(RS_CACU) // ß #define RS_CURR ALGR(RS_ZCAR) // ¤ -// Row 4 #define RS_AT ALGR(RS_V) // @ #define RS_LCBR ALGR(RS_B) // { #define RS_RCBR ALGR(RS_N) // } #define RS_SECT ALGR(RS_M) // § + diff --git a/quantum/keymap_extras/keymap_slovak.h b/quantum/keymap_extras/keymap_slovak.h index bf0b7275ce..10714f1be9 100644 --- a/quantum/keymap_extras/keymap_slovak.h +++ b/quantum/keymap_extras/keymap_slovak.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ; │ + │ ľ │ š │ č │ ť │ ž │ ý │ á │ í │ é │ = │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ ú │ ä │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ô │ § │ ň │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ & │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define SK_SCLN KC_GRV // ; #define SK_PLUS KC_1 // + #define SK_LCAR KC_2 // ľ @@ -47,7 +41,6 @@ #define SK_EACU KC_0 // é #define SK_EQL KC_MINS // = #define SK_ACUT KC_EQL // ´ (dead) -// Row 2 #define SK_Q KC_Q // Q #define SK_W KC_W // W #define SK_E KC_E // E @@ -60,7 +53,6 @@ #define SK_P KC_P // P #define SK_UACU KC_LBRC // ú #define SK_ADIA KC_RBRC // ä -// Row 3 #define SK_A KC_A // A #define SK_S KC_S // S #define SK_D KC_D // D @@ -73,7 +65,6 @@ #define SK_OCIR KC_SCLN // ô #define SK_SECT KC_QUOT // § #define SK_NCAR KC_NUHS // ň -// Row 4 #define SK_AMPR KC_NUBS // & #define SK_Y KC_Z // Y #define SK_X KC_X // X @@ -85,21 +76,6 @@ #define SK_COMM KC_COMM // , #define SK_DOT KC_DOT // . #define SK_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ° │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ % │ ˇ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ / │ ( │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ " │ ! │ ) │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ * │ │ │ │ │ │ │ │ ? │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define SK_RNGA S(SK_SCLN) // ° (dead) #define SK_1 S(SK_PLUS) // 1 #define SK_2 S(SK_LCAR) // 2 @@ -113,33 +89,15 @@ #define SK_0 S(SK_EACU) // 0 #define SK_PERC S(SK_EQL) // % #define SK_CARN S(SK_ACUT) // ˇ (dead) -// Row 2 #define SK_SLSH S(SK_UACU) // / #define SK_LPRN S(SK_ADIA) // ( -// Row 3 #define SK_DQUO S(SK_OCIR) // " #define SK_EXLM S(SK_SECT) // ! #define SK_RPRN S(SK_NCAR) // ) -// Row 4 #define SK_ASTR S(SK_AMPR) // * #define SK_QUES S(SK_COMM) // ? #define SK_COLN S(SK_DOT) // : #define SK_UNDS S(SK_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ~ │ │ ^ │ ˘ │ ° │ ˛ │ ` │ ˙ │ │ ˝ │ ¨ │ ¸ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ \ │ | │ € │ │ │ │ │ │ │ ' │ ÷ │ × │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ đ │ Đ │ [ │ ] │ │ │ ł │ Ł │ $ │ ß │ ¤ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ > │ # │ │ @ │ { │ } │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define SK_TILD ALGR(SK_PLUS) // ~ #define SK_CIRC ALGR(SK_SCAR) // ^ (dead) #define SK_BREV ALGR(SK_CCAR) // ˘ (dead) @@ -149,14 +107,12 @@ #define SK_DACU ALGR(SK_EACU) // ˝ (dead) #define SK_DIAE ALGR(SK_EQL) // ¨ (dead) #define SK_CEDL ALGR(SK_ACUT) // ¸ (dead) -// Row 2 #define SK_BSLS ALGR(SK_Q) // (backslash) #define SK_PIPE ALGR(SK_W) // | #define SK_EURO ALGR(SK_E) // € #define SK_QUOT ALGR(SK_P) // ' #define SK_DIV ALGR(SK_UACU) // ÷ #define SK_MUL ALGR(SK_ADIA) // × -// Row 3 #define SK_LDST ALGR(SK_S) // đ #define SK_CDST ALGR(SK_D) // Đ #define SK_LBRC ALGR(SK_F) // [ @@ -166,10 +122,10 @@ #define SK_DLR ALGR(SK_OCIR) // $ #define SK_SS ALGR(SK_SECT) // ß #define SK_CURR ALGR(SK_NCAR) // ¤ -// Row 4 #define SK_LABK ALGR(SK_AMPR) // < #define SK_RABK ALGR(SK_Y) // > #define SK_HASH ALGR(SK_X) // # #define SK_AT ALGR(SK_V) // @ #define SK_LCBR ALGR(SK_B) // { #define SK_RCBR ALGR(SK_N) // } + diff --git a/quantum/keymap_extras/keymap_slovenian.h b/quantum/keymap_extras/keymap_slovenian.h index 827fa06c25..30910530e0 100644 --- a/quantum/keymap_extras/keymap_slovenian.h +++ b/quantum/keymap_extras/keymap_slovenian.h @@ -1,39 +1,33 @@ -/* Copyright 2018 Žan Pevec - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¸ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Š │ Đ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Č │ Ć │ Ž │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define SI_CEDL KC_GRV // ¸ (dead) #define SI_1 KC_1 // 1 #define SI_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define SI_0 KC_0 // 0 #define SI_QUOT KC_MINS // ' #define SI_PLUS KC_EQL // + -// Row 2 #define SI_Q KC_Q // Q #define SI_W KC_W // W #define SI_E KC_E // E @@ -60,7 +53,6 @@ #define SI_P KC_P // P #define SI_SCAR KC_LBRC // Š #define SI_DSTR KC_RBRC // Đ -// Row 3 #define SI_A KC_A // A #define SI_S KC_S // S #define SI_D KC_D // D @@ -73,7 +65,6 @@ #define SI_CCAR KC_SCLN // Č #define SI_CACU KC_QUOT // Ć #define SI_ZCAR KC_NUHS // Ž -// Row 4 #define SI_LABK KC_NUBS // < #define SI_Y KC_Z // Y #define SI_X KC_X // X @@ -85,21 +76,6 @@ #define SI_COMM KC_COMM // , #define SI_DOT KC_DOT // . #define SI_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¨ │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ * │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define SI_DIAE S(SI_CEDL) // ¨ (dead) #define SI_EXLM S(SI_1) // ! #define SI_DQUO S(SI_2) // " @@ -113,26 +89,10 @@ #define SI_EQL S(SI_0) // = #define SI_QUES S(SI_QUOT) // ? #define SI_ASTR S(SI_PLUS) // * -// Row 4 #define SI_RABK S(SI_LABK) // > #define SI_SCLN S(SI_COMM) // ; #define SI_COLN S(SI_DOT) // : #define SI_UNDS S(SI_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ~ │ ˇ │ ^ │ ˘ │ ° │ ˛ │ ` │ ˙ │ ´ │ ˝ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ \ │ | │ € │ │ │ │ │ │ │ │ ÷ │ × │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ [ │ ] │ │ │ ł │ Ł │ │ ß │ ¤ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ @ │ { │ } │ § │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define SI_TILD ALGR(SI_1) // ~ #define SI_CARN ALGR(SI_2) // ˇ (dead) #define SI_CIRC ALGR(SI_3) // ^ (dead) @@ -143,21 +103,19 @@ #define SI_DOTA ALGR(SI_8) // ˙ (dead) #define SI_ACUT ALGR(SI_9) // ´ (dead) #define SI_DACU ALGR(SI_0) // ˝ (dead) -// Row 2 #define SI_BSLS ALGR(SI_Q) // (backslash) #define SI_PIPE ALGR(SI_W) // | #define SI_EURO ALGR(SI_E) // € #define SI_DIV ALGR(SI_SCAR) // ÷ #define SI_MUL ALGR(SI_DSTR) // × -// Row 3 #define SI_LBRC ALGR(SI_F) // [ #define SI_RBRC ALGR(SI_G) // ] #define SI_LLST ALGR(SI_K) // ł #define SI_CLST ALGR(SI_L) // Ł #define SI_SS ALGR(SI_CACU) // ß #define SI_CURR ALGR(SI_ZCAR) // ¤ -// Row 4 #define SI_AT ALGR(SI_V) // @ #define SI_LCBR ALGR(SI_B) // { #define SI_RCBR ALGR(SI_N) // } #define SI_SECT ALGR(SI_M) // § + diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h index 8432c56e99..cac16c08a5 100644 --- a/quantum/keymap_extras/keymap_spanish.h +++ b/quantum/keymap_extras/keymap_spanish.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ º │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ¡ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ` │ + │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ñ │ ´ │ Ç │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define ES_MORD KC_GRV // º #define ES_1 KC_1 // 1 #define ES_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define ES_0 KC_0 // 0 #define ES_QUOT KC_MINS // ' #define ES_IEXL KC_EQL // ¡ -// Row 2 #define ES_Q KC_Q // Q #define ES_W KC_W // W #define ES_E KC_E // E @@ -60,7 +53,6 @@ #define ES_P KC_P // P #define ES_GRV KC_LBRC // ` (dead) #define ES_PLUS KC_RBRC // + -// Row 3 #define ES_A KC_A // A #define ES_S KC_S // S #define ES_D KC_D // D @@ -73,7 +65,6 @@ #define ES_NTIL KC_SCLN // Ñ #define ES_ACUT KC_QUOT // ´ (dead) #define ES_CCED KC_NUHS // Ç -// Row 4 #define ES_LABK KC_NUBS // < #define ES_Z KC_Z // Z #define ES_X KC_X // X @@ -85,21 +76,6 @@ #define ES_COMM KC_COMM // , #define ES_DOT KC_DOT // . #define ES_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ª │ ! │ " │ · │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ¿ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ^ │ * │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define ES_FORD S(ES_MORD) // ª #define ES_EXLM S(ES_1) // ! #define ES_DQUO S(ES_2) // " @@ -113,31 +89,13 @@ #define ES_EQL S(ES_0) // = #define ES_QUES S(ES_QUOT) // ? #define ES_IQUE S(ES_IEXL) // ¿ -// Row 2 #define ES_CIRC S(ES_GRV) // ^ (dead) #define ES_ASTR S(ES_PLUS) // * -// Row 3 #define ES_DIAE S(ES_ACUT) // ¨ (dead) -// Row 4 #define ES_RABK S(ES_LABK) // > #define ES_SCLN S(KC_COMM) // ; #define ES_COLN S(KC_DOT) // : #define ES_UNDS S(ES_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ \ │ | │ @ │ # │ ~ │ € │ ¬ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define ES_BSLS ALGR(ES_MORD) // (backslash) #define ES_PIPE ALGR(ES_1) // | #define ES_AT ALGR(ES_2) // @ @@ -145,9 +103,8 @@ #define ES_TILD ALGR(ES_4) // ~ #define ES_EURO ALGR(ES_5) // € #define ES_NOT ALGR(ES_6) // ¬ -// Row 2 #define ES_LBRC ALGR(ES_GRV) // [ #define ES_RBRC ALGR(ES_PLUS) // ] -// Row 3 #define ES_LCBR ALGR(ES_ACUT) // { #define ES_RCBR ALGR(ES_CCED) // } + diff --git a/quantum/keymap_extras/keymap_spanish_dvorak.h b/quantum/keymap_extras/keymap_spanish_dvorak.h index ea0c93f86a..1feab96b8c 100644 --- a/quantum/keymap_extras/keymap_spanish_dvorak.h +++ b/quantum/keymap_extras/keymap_spanish_dvorak.h @@ -1,39 +1,33 @@ -/* Copyright 2020 José Andrés García - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ º │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ¡ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ . │ , │ Ñ │ P │ Y │ F │ G │ C │ H │ L │ ` │ + │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ O │ E │ U │ I │ D │ R │ T │ N │ S │ ´ │ Ç │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ - │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define DV_MORD KC_GRV // º #define DV_1 KC_1 // 1 #define DV_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define DV_0 KC_0 // 0 #define DV_QUOT KC_MINS // ' #define DV_IEXL KC_EQL // ¡ -// Row 2 #define DV_DOT KC_Q // . #define DV_COMM KC_W // , #define DV_NTIL KC_E // Ñ @@ -60,7 +53,6 @@ #define DV_L KC_P // L #define DV_GRV KC_LBRC // ` (dead) #define DV_PLUS KC_RBRC // + -// Row 3 #define DV_A KC_A // A #define DV_O KC_S // O #define DV_E KC_D // E @@ -73,7 +65,6 @@ #define DV_S KC_SCLN // S #define DV_ACUT KC_QUOT // ´ (dead) #define DV_CCED KC_NUHS // Ç -// Row 4 #define DV_LABK KC_NUBS // < #define DV_MINS KC_Z // - #define DV_Q KC_X // Q @@ -85,21 +76,6 @@ #define DV_W KC_COMM // W #define DV_V KC_DOT // V #define DV_Z KC_SLSH // Z - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ª │ ! │ " │ · │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ¿ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ : │ ; │ │ │ │ │ │ │ │ │ ^ │ * │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ _ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define DV_FORD S(DV_MORD) // ª #define DV_EXLM S(DV_1) // ! #define DV_DQUO S(DV_2) // " @@ -113,31 +89,13 @@ #define DV_EQL S(DV_0) // = #define DV_QUES S(DV_QUOT) // ? #define DV_IQUE S(DV_IEXL) // ¿ -// Row 2 #define DV_COLN S(DV_DOT) // : #define DV_SCLN S(DV_COMM) // ; #define DV_CIRC S(DV_GRV) // ^ (dead) #define DV_ASTR S(DV_PLUS) // * -// Row 3 #define DV_DIAE S(DV_ACUT) // ¨ (dead) -// Row 4 #define DV_RABK S(DV_LABK) // > #define DV_UNDS S(DV_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ \ │ | │ @ │ # │ ~ │ € │ ¬ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define DV_BSLS ALGR(DV_MORD) // (backslash) #define DV_PIPE ALGR(DV_1) // | #define DV_AT ALGR(DV_2) // @ @@ -145,9 +103,8 @@ #define DV_TILD ALGR(DV_4) // ~ #define DV_EURO ALGR(DV_5) // € #define DV_NOT ALGR(DV_6) // ¬ -// Row 2 #define DV_LBRC ALGR(DV_GRV) // [ #define DV_RBRC ALGR(DV_PLUS) // ] -// Row 3 #define DV_LCBR ALGR(DV_ACUT) // { #define DV_RCBR ALGR(DV_CCED) // } + diff --git a/quantum/keymap_extras/keymap_swedish.h b/quantum/keymap_extras/keymap_swedish.h index cadb66d3bd..4cdf4879c3 100644 --- a/quantum/keymap_extras/keymap_swedish.h +++ b/quantum/keymap_extras/keymap_swedish.h @@ -1,39 +1,33 @@ -/* Copyright 2017 Andreas Lindhé - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define SE_SECT KC_GRV // § #define SE_1 KC_1 // 1 #define SE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define SE_0 KC_0 // 0 #define SE_PLUS KC_MINS // + #define SE_ACUT KC_EQL // ´ (dead) -// Row 2 #define SE_Q KC_Q // Q #define SE_W KC_W // W #define SE_E KC_E // E @@ -60,7 +53,6 @@ #define SE_P KC_P // P #define SE_ARNG KC_LBRC // Å #define SE_DIAE KC_RBRC // ¨ (dead) -// Row 3 #define SE_A KC_A // A #define SE_S KC_S // S #define SE_D KC_D // D @@ -73,7 +65,6 @@ #define SE_ODIA KC_SCLN // Ö #define SE_ADIA KC_QUOT // Ä #define SE_QUOT KC_NUHS // ' -// Row 4 #define SE_LABK KC_NUBS // < #define SE_Z KC_Z // Z #define SE_X KC_X // X @@ -85,21 +76,6 @@ #define SE_COMM KC_COMM // , #define SE_DOT KC_DOT // . #define SE_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ½ │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define SE_HALF S(SE_SECT) // ½ #define SE_EXLM S(SE_1) // ! #define SE_DQUO S(SE_2) // " @@ -113,30 +89,12 @@ #define SE_EQL S(SE_0) // = #define SE_QUES S(SE_PLUS) // ? #define SE_GRV S(SE_ACUT) // ` (dead) -// Row 2 #define SE_CIRC S(SE_DIAE) // ^ (dead) -// Row 3 #define SE_ASTR S(SE_QUOT) // * -// Row 4 #define SE_RABK S(SE_LABK) // > #define SE_SCLN S(SE_COMM) // ; #define SE_COLN S(SE_DOT) // : #define SE_UNDS S(SE_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ @ │ £ │ $ │ € │ │ { │ [ │ ] │ } │ \ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ | │ │ │ │ │ │ │ µ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define SE_AT ALGR(SE_2) // @ #define SE_PND ALGR(SE_3) // £ #define SE_DLR ALGR(SE_4) // $ @@ -146,11 +104,7 @@ #define SE_RBRC ALGR(SE_9) // ] #define SE_RCBR ALGR(SE_0) // } #define SE_BSLS ALGR(SE_PLUS) // (backslash) -// Row 2 #define SE_TILD ALGR(SE_DIAE) // ~ (dead) -// Row 4 #define SE_PIPE ALGR(SE_LABK) // | #define SE_MICR ALGR(SE_M) // µ -// DEPRECATED -#include "keymap_nordic.h" diff --git a/quantum/keymap_extras/keymap_swedish_mac_ansi.h b/quantum/keymap_extras/keymap_swedish_mac_ansi.h index 0d0426f866..9649f59dd0 100644 --- a/quantum/keymap_extras/keymap_swedish_mac_ansi.h +++ b/quantum/keymap_extras/keymap_swedish_mac_ansi.h @@ -1,39 +1,33 @@ -/* Copyright 2021 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ < │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ ' │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 +// Aliases #define SE_LABK KC_GRV // < #define SE_1 KC_1 // 1 #define SE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define SE_0 KC_0 // 0 #define SE_PLUS KC_MINS // + #define SE_ACUT KC_EQL // ´ (dead) -// Row 2 #define SE_Q KC_Q // Q #define SE_W KC_W // W #define SE_E KC_E // E @@ -61,7 +54,6 @@ #define SE_ARNG KC_LBRC // Å #define SE_DIAE KC_RBRC // ¨ (dead) #define SE_QUOT KC_NUHS // ' -// Row 3 #define SE_A KC_A // A #define SE_S KC_S // S #define SE_D KC_D // D @@ -73,7 +65,6 @@ #define SE_L KC_L // L #define SE_ODIA KC_SCLN // Ö #define SE_ADIA KC_QUOT // Ä -// Row 4 #define SE_Z KC_Z // Z #define SE_X KC_X // X #define SE_C KC_C // C @@ -84,21 +75,6 @@ #define SE_COMM KC_COMM // , #define SE_DOT KC_DOT // . #define SE_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ > │ ! │ " │ # │ € │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ * │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define SE_RABK S(SE_LABK) // > #define SE_EXLM S(SE_1) // ! #define SE_DQUO S(SE_2) // " @@ -112,29 +88,11 @@ #define SE_EQL S(SE_0) // = #define SE_QUES S(SE_PLUS) // ? #define SE_GRV S(SE_ACUT) // ` -// Row 2 #define SE_CIRC S(SE_DIAE) // ^ (dead) #define SE_ASTR S(SE_QUOT) // * -// Row 4 #define SE_SCLN S(SE_COMM) // ; #define SE_COLN S(SE_DOT) // : #define SE_UNDS S(SE_MINS) // _ - -/* Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ≤ │ © │ ™ │ £ │ $ │ ∞ │ § │ | │ [ │ ] │ ≈ │ ± │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ • │ Ω │ É │ ® │ † │ µ │ Ü │ ı │ Œ │ π │ ˙ │ ~ │ @ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ │ ß │ ∂ │ ƒ │ ¸ │ ˛ │ √ │ ª │ fi │ Ø │ Æ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ ÷ │ │ Ç │ ‹ │ › │ ‘ │ ’ │ ‚ │ … │ – │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - * - */ -// Row 1 #define SE_LTEQ A(SE_LABK) // ≤ #define SE_COPY A(SE_1) // © #define SE_TM A(SE_2) // ™ @@ -147,7 +105,6 @@ #define SE_RBRC A(SE_9) // ] #define SE_AEQL A(SE_0) // ≈ #define SE_PLMN A(SE_PLUS) // ± -// Row 2 #define SE_BULT A(SE_Q) // • #define SE_OMEG A(SE_W) // Ω #define SE_EACU A(SE_E) // É @@ -161,7 +118,6 @@ #define SE_DOTA A(SE_ARNG) // ˙ #define SE_TILD A(SE_DIAE) // ~ (dead) #define SE_AT A(SE_QUOT) // @ -// Row 3 #define SE_APPL A(SE_A) // (Apple logo) #define SE_SS A(SE_S) // ß #define SE_PDIF A(SE_D) // ∂ @@ -173,7 +129,6 @@ #define SE_FI A(SE_L) // fi #define SE_OSTR A(SE_ODIA) // Ø #define SE_AE A(SE_ADIA) // Æ -// Row 4 #define SE_DIV A(SE_Z) // ÷ #define SE_CCED A(SE_C) // Ç #define SE_LSAQ A(SE_V) // ‹ @@ -183,22 +138,6 @@ #define SE_SLQU A(SE_COMM) // ‚ #define SE_ELLP A(SE_DOT) // … #define SE_NDSH A(SE_MINS) // – - -/* Shift+Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ≥ │ ¡ │ │ ¥ │ ¢ │ ‰ │ ¶ │ \ │ { │ } │ ≠ │ ¿ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ ° │ ˝ │ │ │ ‡ │ ˜ │ │ ˆ │ │ ∏ │ ˚ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ ◊ │ ∑ │ ∆ │ ∫ │ ¯ │ ˘ │ ¬ │ º │ fl │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ ⁄ │ ˇ │ │ « │ » │ “ │ ” │ „ │ · │ — │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - * - */ -// Row 1 #define SE_GTEQ S(A(SE_LABK)) // ≥ #define SE_IEXL S(A(SE_1)) // ¡ #define SE_YEN S(A(SE_3)) // ¥ @@ -210,7 +149,6 @@ #define SE_RCBR S(A(SE_9)) // } #define SE_NEQL S(A(SE_0)) // ≠ #define SE_IQUE S(A(SE_PLUS)) // ¿ -// Row 2 #define SE_DEG S(A(SE_Q)) // ° #define SE_DACU S(A(SE_W)) // ˝ #define SE_DDAG S(A(SE_T)) // ‡ @@ -218,7 +156,6 @@ #define SE_DCIR S(A(SE_I)) // ˆ #define SE_NARP S(A(SE_P)) // ∏ #define SE_RNGA S(A(SE_ARNG)) // ˚ -// Row 3 #define SE_LOZN S(A(SE_A)) // ◊ #define SE_NARS S(A(SE_S)) // ∑ #define SE_INCR S(A(SE_D)) // ∆ @@ -228,7 +165,6 @@ #define SE_NOT S(A(SE_J)) // ¬ #define SE_MORD S(A(SE_K)) // º #define SE_FL S(A(SE_L)) // fl -// Row 4 #define SE_FRSL S(A(SE_Z)) // ⁄ #define SE_CARN S(A(SE_X)) // ˇ #define SE_LDAQ S(A(SE_V)) // « @@ -238,3 +174,4 @@ #define SE_DLQU S(A(SE_COMM)) // „ #define SE_MDDT S(A(SE_DOT)) // · #define SE_MDSH S(A(SE_MINS)) // — + diff --git a/quantum/keymap_extras/keymap_swedish_mac_iso.h b/quantum/keymap_extras/keymap_swedish_mac_iso.h index ab155530ae..068c81b020 100644 --- a/quantum/keymap_extras/keymap_swedish_mac_iso.h +++ b/quantum/keymap_extras/keymap_swedish_mac_iso.h @@ -1,39 +1,33 @@ -/* Copyright 2021 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 +// Aliases #define SE_SECT KC_GRV // § #define SE_1 KC_1 // 1 #define SE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define SE_0 KC_0 // 0 #define SE_PLUS KC_MINS // + #define SE_ACUT KC_EQL // ´ (dead) -// Row 2 #define SE_Q KC_Q // Q #define SE_W KC_W // W #define SE_E KC_E // E @@ -60,7 +53,6 @@ #define SE_P KC_P // P #define SE_ARNG KC_LBRC // Å #define SE_DIAE KC_RBRC // ¨ (dead) -// Row 3 #define SE_A KC_A // A #define SE_S KC_S // S #define SE_D KC_D // D @@ -73,7 +65,6 @@ #define SE_ODIA KC_SCLN // Ö #define SE_ADIA KC_QUOT // Ä #define SE_QUOT KC_NUHS // ' -// Row 4 #define SE_LABK KC_NUBS // < #define SE_Z KC_Z // Z #define SE_X KC_X // X @@ -85,22 +76,7 @@ #define SE_COMM KC_COMM // , #define SE_DOT KC_DOT // . #define SE_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ° │ ! │ " │ # │ € │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 -#define SE_DEG S(SE_SECT) // ° +#define SE_DEG S(SE_SECT) // ° #define SE_EXLM S(SE_1) // ! #define SE_DQUO S(SE_2) // " #define SE_HASH S(SE_3) // # @@ -113,30 +89,12 @@ #define SE_EQL S(SE_0) // = #define SE_QUES S(SE_PLUS) // ? #define SE_GRV S(SE_ACUT) // ` -// Row 2 #define SE_CIRC S(SE_DIAE) // ^ (dead) -// Row 3 #define SE_ASTR S(SE_QUOT) // * -// Row 4 #define SE_RABK S(SE_LABK) // > #define SE_SCLN S(SE_COMM) // ; #define SE_COLN S(SE_DOT) // : #define SE_UNDS S(SE_MINS) // _ - -/* Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ¶ │ © │ ™ │ £ │ $ │ ∞ │ │ | │ [ │ ] │ ≈ │ ± │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ • │ Ω │ É │ ® │ † │ µ │ Ü │ ı │ Œ │ π │ ˙ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ ß │ ∂ │ ƒ │ ¸ │ ˛ │ √ │ ª │ fi │ Ø │ Æ │ @ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≤ │ ÷ │ │ Ç │ ‹ │ › │ ‘ │ ’ │ ‚ │ … │ – │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define SE_PILC A(SE_SECT) // ¶ #define SE_COPY A(SE_1) // © #define SE_TM A(SE_2) // ™ @@ -148,7 +106,6 @@ #define SE_RBRC A(SE_9) // ] #define SE_AEQL A(SE_0) // ≈ #define SE_PLMN A(SE_PLUS) // ± -// Row 2 #define SE_BULT A(SE_Q) // • #define SE_OMEG A(SE_W) // Ω #define SE_EACU A(SE_E) // É @@ -161,7 +118,6 @@ #define SE_PI A(SE_P) // π #define SE_DOTA A(SE_ARNG) // ˙ #define SE_TILD A(SE_DIAE) // ~ (dead) -// Row 3 #define SE_APPL A(SE_A) // (Apple logo) #define SE_SS A(SE_S) // ß #define SE_PDIF A(SE_D) // ∂ @@ -174,7 +130,6 @@ #define SE_OSTR A(SE_ODIA) // Ø #define SE_AE A(SE_ADIA) // Æ #define SE_AT A(SE_QUOT) // @ -// Row 4 #define SE_LTEQ A(SE_LABK) // ≤ #define SE_DIV A(SE_Z) // ÷ #define SE_CCED A(SE_C) // Ç @@ -185,21 +140,6 @@ #define SE_SLQU A(SE_COMM) // ‚ #define SE_ELLP A(SE_DOT) // … #define SE_NDSH A(SE_MINS) // – - -/* Shift+Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ │ ¡ │ ” │ ¥ │ ¢ │ ‰ │ │ \ │ { │ } │ ≠ │ ¿ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ ˝ │ │ │ ‡ │ ˜ │ │ ˆ │ │ ∏ │ ˚ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ ◊ │ ∑ │ ∆ │ ∫ │ ¯ │ ˘ │ ¬ │ º │ fl │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≥ │ ⁄ │ ˇ │ │ « │ » │ “ │ ” │ „ │ · │ — │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define SE_IEXL S(A(SE_1)) // ¡ #define SE_YEN S(A(SE_3)) // ¥ #define SE_CENT S(A(SE_4)) // ¢ @@ -209,14 +149,12 @@ #define SE_RCBR S(A(SE_9)) // } #define SE_NEQL S(A(SE_0)) // ≠ #define SE_IQUE S(A(SE_PLUS)) // ¿ -// Row 2 #define SE_DACU S(A(SE_W)) // ˝ #define SE_DDAG S(A(SE_T)) // ‡ #define SE_STIL S(A(SE_Y)) // ˜ #define SE_DCIR S(A(SE_I)) // ˆ #define SE_NARP S(A(SE_P)) // ∏ #define SE_RNGA S(A(SE_ARNG)) // ˚ -// Row 3 #define SE_LOZN S(A(SE_A)) // ◊ #define SE_NARS S(A(SE_S)) // ∑ #define SE_INCR S(A(SE_D)) // ∆ @@ -226,7 +164,6 @@ #define SE_NOT S(A(SE_J)) // ¬ #define SE_MORD S(A(SE_K)) // º #define SE_FL S(A(SE_L)) // fl -// Row 4 #define SE_GTEQ S(A(SE_LABK)) // ≥ #define SE_FRSL S(A(SE_Z)) // ⁄ #define SE_CARN S(A(SE_X)) // ˇ @@ -237,3 +174,4 @@ #define SE_DLQU S(A(SE_COMM)) // „ #define SE_MDDT S(A(SE_DOT)) // · #define SE_MDSH S(A(SE_MINS)) // — + diff --git a/quantum/keymap_extras/keymap_swedish_pro_mac_ansi.h b/quantum/keymap_extras/keymap_swedish_pro_mac_ansi.h index 9b44517625..c0692ababd 100644 --- a/quantum/keymap_extras/keymap_swedish_pro_mac_ansi.h +++ b/quantum/keymap_extras/keymap_swedish_pro_mac_ansi.h @@ -1,39 +1,33 @@ -/* Copyright 2021 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ < │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ ' │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 +// Aliases #define SE_LABK KC_GRV // < #define SE_1 KC_1 // 1 #define SE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define SE_0 KC_0 // 0 #define SE_PLUS KC_MINS // + #define SE_ACUT KC_EQL // ´ (dead) -// Row 2 #define SE_Q KC_Q // Q #define SE_W KC_W // W #define SE_E KC_E // E @@ -61,7 +54,6 @@ #define SE_ARNG KC_LBRC // Å #define SE_DIAE KC_RBRC // ¨ (dead) #define SE_QUOT KC_NUHS // ' -// Row 3 #define SE_A KC_A // A #define SE_S KC_S // S #define SE_D KC_D // D @@ -73,7 +65,6 @@ #define SE_L KC_L // L #define SE_ODIA KC_SCLN // Ö #define SE_ADIA KC_QUOT // Ä -// Row 4 #define SE_Z KC_Z // Z #define SE_X KC_X // X #define SE_C KC_C // C @@ -84,21 +75,6 @@ #define SE_COMM KC_COMM // , #define SE_DOT KC_DOT // . #define SE_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ > │ ! │ " │ # │ € │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ * │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define SE_RABK S(SE_LABK) // > #define SE_EXLM S(SE_1) // ! #define SE_DQUO S(SE_2) // " @@ -112,29 +88,11 @@ #define SE_EQL S(SE_0) // = #define SE_QUES S(SE_PLUS) // ? #define SE_GRV S(SE_ACUT) // ` -// Row 2 #define SE_CIRC S(SE_DIAE) // ^ (dead) #define SE_ASTR S(SE_QUOT) // * -// Row 4 #define SE_SCLN S(SE_COMM) // ; #define SE_COLN S(SE_DOT) // : #define SE_UNDS S(SE_MINS) // _ - -/* Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ≤ │ © │ @ │ £ │ $ │ ∞ │ § │ | │ [ │ ] │ ≈ │ ± │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ • │ Ω │ É │ ® │ † │ µ │ Ü │ ı │ Œ │ π │ ˙ │ ~ │ ™ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ │ ß │ ∂ │ ƒ │ ¸ │ ˛ │ √ │ ª │ fi │ Ø │ Æ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ ÷ │ │ Ç │ ‹ │ › │ ‘ │ ’ │ ‚ │ … │ – │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - * - */ -// Row 1 #define SE_LTEQ A(SE_LABK) // ≤ #define SE_COPY A(SE_1) // © #define SE_AT A(SE_2) // @ @@ -147,7 +105,6 @@ #define SE_RBRC A(SE_9) // ] #define SE_AEQL A(SE_0) // ≈ #define SE_PLMN A(SE_PLUS) // ± -// Row 2 #define SE_BULT A(SE_Q) // • #define SE_OMEG A(SE_W) // Ω #define SE_EACU A(SE_E) // É @@ -161,7 +118,6 @@ #define SE_DOTA A(SE_ARNG) // ˙ #define SE_TILD A(SE_DIAE) // ~ (dead) #define SE_TM A(SE_QUOT) // ™ -// Row 3 #define SE_APPL A(SE_A) // (Apple logo) #define SE_SS A(SE_S) // ß #define SE_PDIF A(SE_D) // ∂ @@ -173,7 +129,6 @@ #define SE_FI A(SE_L) // fi #define SE_OSTR A(SE_ODIA) // Ø #define SE_AE A(SE_ADIA) // Æ -// Row 4 #define SE_DIV A(SE_Z) // ÷ #define SE_CCED A(SE_C) // Ç #define SE_LSAQ A(SE_V) // ‹ @@ -183,22 +138,6 @@ #define SE_SLQU A(SE_COMM) // ‚ #define SE_ELLP A(SE_DOT) // … #define SE_NDSH A(SE_MINS) // – - -/* Shift+Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ≥ │ ¡ │ │ ¥ │ ¢ │ ‰ │ ¶ │ \ │ { │ } │ ≠ │ ¿ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ ° │ ˝ │ │ │ ‡ │ ˜ │ │ ˆ │ │ ∏ │ ˚ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ - * │ │ ◊ │ ∑ │ ∆ │ ∫ │ ¯ │ ˘ │ ¬ │ º │ fl │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ - * │ │ ⁄ │ ˇ │ │ « │ » │ “ │ ” │ „ │ · │ — │ │ - * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - * - */ -// Row 1 #define SE_GTEQ S(A(SE_LABK)) // ≥ #define SE_IEXL S(A(SE_1)) // ¡ #define SE_YEN S(A(SE_3)) // ¥ @@ -210,7 +149,6 @@ #define SE_RCBR S(A(SE_9)) // } #define SE_NEQL S(A(SE_0)) // ≠ #define SE_IQUE S(A(SE_PLUS)) // ¿ -// Row 2 #define SE_DEG S(A(SE_Q)) // ° #define SE_DACU S(A(SE_W)) // ˝ #define SE_DDAG S(A(SE_T)) // ‡ @@ -218,7 +156,6 @@ #define SE_DCIR S(A(SE_I)) // ˆ #define SE_NARP S(A(SE_P)) // ∏ #define SE_RNGA S(A(SE_ARNG)) // ˚ -// Row 3 #define SE_LOZN S(A(SE_A)) // ◊ #define SE_NARS S(A(SE_S)) // ∑ #define SE_INCR S(A(SE_D)) // ∆ @@ -228,7 +165,6 @@ #define SE_NOT S(A(SE_J)) // ¬ #define SE_MORD S(A(SE_K)) // º #define SE_FL S(A(SE_L)) // fl -// Row 4 #define SE_FRSL S(A(SE_Z)) // ⁄ #define SE_CARN S(A(SE_X)) // ˇ #define SE_LDAQ S(A(SE_V)) // « @@ -238,3 +174,4 @@ #define SE_DLQU S(A(SE_COMM)) // „ #define SE_MDDT S(A(SE_DOT)) // · #define SE_MDSH S(A(SE_MINS)) // — + diff --git a/quantum/keymap_extras/keymap_swedish_pro_mac_iso.h b/quantum/keymap_extras/keymap_swedish_pro_mac_iso.h index f2d6605865..e01f0a7dc3 100644 --- a/quantum/keymap_extras/keymap_swedish_pro_mac_iso.h +++ b/quantum/keymap_extras/keymap_swedish_pro_mac_iso.h @@ -1,39 +1,33 @@ -/* Copyright 2021 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 +// Aliases #define SE_SECT KC_GRV // § #define SE_1 KC_1 // 1 #define SE_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define SE_0 KC_0 // 0 #define SE_PLUS KC_MINS // + #define SE_ACUT KC_EQL // ´ (dead) -// Row 2 #define SE_Q KC_Q // Q #define SE_W KC_W // W #define SE_E KC_E // E @@ -60,7 +53,6 @@ #define SE_P KC_P // P #define SE_ARNG KC_LBRC // Å #define SE_DIAE KC_RBRC // ¨ (dead) -// Row 3 #define SE_A KC_A // A #define SE_S KC_S // S #define SE_D KC_D // D @@ -73,7 +65,6 @@ #define SE_ODIA KC_SCLN // Ö #define SE_ADIA KC_QUOT // Ä #define SE_QUOT KC_NUHS // ' -// Row 4 #define SE_LABK KC_NUBS // < #define SE_Z KC_Z // Z #define SE_X KC_X // X @@ -85,22 +76,7 @@ #define SE_COMM KC_COMM // , #define SE_DOT KC_DOT // . #define SE_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ° │ ! │ " │ # │ € │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 -#define SE_DEG S(SE_SECT) // ° +#define SE_DEG S(SE_SECT) // ° #define SE_EXLM S(SE_1) // ! #define SE_DQUO S(SE_2) // " #define SE_HASH S(SE_3) // # @@ -113,30 +89,12 @@ #define SE_EQL S(SE_0) // = #define SE_QUES S(SE_PLUS) // ? #define SE_GRV S(SE_ACUT) // ` -// Row 2 #define SE_CIRC S(SE_DIAE) // ^ (dead) -// Row 3 #define SE_ASTR S(SE_QUOT) // * -// Row 4 #define SE_RABK S(SE_LABK) // > #define SE_SCLN S(SE_COMM) // ; #define SE_COLN S(SE_DOT) // : #define SE_UNDS S(SE_MINS) // _ - -/* Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ ¶ │ © │ @ │ £ │ $ │ ∞ │ │ | │ [ │ ] │ ≈ │ ± │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ • │ Ω │ É │ ® │ † │ µ │ Ü │ ı │ Œ │ π │ ˙ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ ß │ ∂ │ ƒ │ ¸ │ ˛ │ √ │ ª │ fi │ Ø │ Æ │ ™ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≤ │ ÷ │ │ Ç │ ‹ │ › │ ‘ │ ’ │ ‚ │ … │ – │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define SE_PILC A(SE_SECT) // ¶ #define SE_COPY A(SE_1) // © #define SE_AT A(SE_2) // @ @@ -148,7 +106,6 @@ #define SE_RBRC A(SE_9) // ] #define SE_AEQL A(SE_0) // ≈ #define SE_PLMN A(SE_PLUS) // ± -// Row 2 #define SE_BULT A(SE_Q) // • #define SE_OMEG A(SE_W) // Ω #define SE_EACU A(SE_E) // É @@ -161,7 +118,6 @@ #define SE_PI A(SE_P) // π #define SE_DOTA A(SE_ARNG) // ˙ #define SE_TILD A(SE_DIAE) // ~ (dead) -// Row 3 #define SE_APPL A(SE_A) // (Apple logo) #define SE_SS A(SE_S) // ß #define SE_PDIF A(SE_D) // ∂ @@ -174,7 +130,6 @@ #define SE_OSTR A(SE_ODIA) // Ø #define SE_AE A(SE_ADIA) // Æ #define SE_TM A(SE_QUOT) // ™ -// Row 4 #define SE_LTEQ A(SE_LABK) // ≤ #define SE_DIV A(SE_Z) // ÷ #define SE_CCED A(SE_C) // Ç @@ -185,21 +140,6 @@ #define SE_SLQU A(SE_COMM) // ‚ #define SE_ELLP A(SE_DOT) // … #define SE_NDSH A(SE_MINS) // – - -/* Shift+Alted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ - * │ │ ¡ │ ” │ ¥ │ ¢ │ ‰ │ │ \ │ { │ } │ ≠ │ ¿ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ - * │ │ │ ˝ │ │ │ ‡ │ ˜ │ │ ˆ │ │ ∏ │ ˚ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ ◊ │ ∑ │ ∆ │ ∫ │ ¯ │ ˘ │ ¬ │ º │ fl │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ - * │ │ ≥ │ ⁄ │ ˇ │ │ « │ » │ “ │ ” │ „ │ · │ — │ │ - * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ - * │ │ │ │ │ │ │ │ - * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ - */ -// Row 1 #define SE_IEXL S(A(SE_1)) // ¡ #define SE_YEN S(A(SE_3)) // ¥ #define SE_CENT S(A(SE_4)) // ¢ @@ -209,14 +149,12 @@ #define SE_RCBR S(A(SE_9)) // } #define SE_NEQL S(A(SE_0)) // ≠ #define SE_IQUE S(A(SE_PLUS)) // ¿ -// Row 2 #define SE_DACU S(A(SE_W)) // ˝ #define SE_DDAG S(A(SE_T)) // ‡ #define SE_STIL S(A(SE_Y)) // ˜ #define SE_DCIR S(A(SE_I)) // ˆ #define SE_NARP S(A(SE_P)) // ∏ #define SE_RNGA S(A(SE_ARNG)) // ˚ -// Row 3 #define SE_LOZN S(A(SE_A)) // ◊ #define SE_NARS S(A(SE_S)) // ∑ #define SE_INCR S(A(SE_D)) // ∆ @@ -226,7 +164,6 @@ #define SE_NOT S(A(SE_J)) // ¬ #define SE_MORD S(A(SE_K)) // º #define SE_FL S(A(SE_L)) // fl -// Row 4 #define SE_GTEQ S(A(SE_LABK)) // ≥ #define SE_FRSL S(A(SE_Z)) // ⁄ #define SE_CARN S(A(SE_X)) // ˇ @@ -237,3 +174,4 @@ #define SE_DLQU S(A(SE_COMM)) // „ #define SE_MDDT S(A(SE_DOT)) // · #define SE_MDSH S(A(SE_MINS)) // — + diff --git a/quantum/keymap_extras/keymap_swiss_de.h b/quantum/keymap_extras/keymap_swiss_de.h index 6723836870..0a6e6e4918 100644 --- a/quantum/keymap_extras/keymap_swiss_de.h +++ b/quantum/keymap_extras/keymap_swiss_de.h @@ -1,44 +1,33 @@ -/* Copyright 2016 heartsekai - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -#ifdef CH_H -// The ChibiOS ch.h file defines this... -# undef CH_H -#endif - -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ^ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ ü │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ö │ ä │ $ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define CH_SECT KC_GRV // § #define CH_1 KC_1 // 1 #define CH_2 KC_2 // 2 @@ -52,7 +41,6 @@ #define CH_0 KC_0 // 0 #define CH_QUOT KC_MINS // ' #define CH_CIRC KC_EQL // ^ (dead) -// Row 2 #define CH_Q KC_Q // Q #define CH_W KC_W // W #define CH_E KC_E // E @@ -65,7 +53,6 @@ #define CH_P KC_P // P #define CH_UDIA KC_LBRC // ü #define CH_DIAE KC_RBRC // ¨ (dead) -// Row 3 #define CH_A KC_A // A #define CH_S KC_S // S #define CH_D KC_D // D @@ -78,7 +65,6 @@ #define CH_ODIA KC_SCLN // ö #define CH_ADIA KC_QUOT // ä #define CH_DLR KC_NUHS // $ -// Row 4 #define CH_LABK KC_NUBS // < #define CH_Y KC_Z // Y #define CH_X KC_X // X @@ -90,21 +76,6 @@ #define CH_COMM KC_COMM // , #define CH_DOT KC_DOT // . #define CH_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ° │ + │ " │ * │ ç │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ è │ ! │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ é │ à │ £ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CH_DEG S(CH_SECT) // ° #define CH_PLUS S(CH_1) // + #define CH_DQUO S(CH_2) // " @@ -118,33 +89,15 @@ #define CH_EQL S(CH_0) // = #define CH_QUES S(CH_QUOT) // ? #define CH_GRV S(CH_CIRC) // ` (dead) -// Row 2 #define CH_EGRV S(CH_UDIA) // è #define CH_EXLM S(CH_DIAE) // ! -// Row 3 #define CH_EACU S(CH_ODIA) // é #define CH_AGRV S(CH_ADIA) // à #define CH_PND S(CH_DLR) // £ -// Row 4 #define CH_RABK S(CH_LABK) // > #define CH_SCLN S(CH_COMM) // ; #define CH_COLN S(CH_DOT) // : #define CH_UNDS S(CH_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ¦ │ @ │ # │ │ │ ¬ │ | │ ¢ │ │ │ ´ │ ~ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ \ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CH_BRKP ALGR(CH_1) // ¦ #define CH_AT ALGR(CH_2) // @ #define CH_HASH ALGR(CH_3) // # @@ -153,12 +106,10 @@ #define CH_CENT ALGR(CH_8) // ¢ #define CH_ACUT ALGR(CH_QUOT) // ´ (dead) #define CH_TILD ALGR(CH_CIRC) // ~ (dead) -// Row 2 #define CH_EURO ALGR(CH_E) // € #define CH_LBRC ALGR(CH_UDIA) // [ #define CH_RBRC ALGR(CH_DIAE) // ] -// Row 3 #define CH_LCBR ALGR(CH_ADIA) // { #define CH_RCBR ALGR(CH_DLR) // } -// Row 4 #define CH_BSLS ALGR(CH_LABK) // (backslash) + diff --git a/quantum/keymap_extras/keymap_swiss_fr.h b/quantum/keymap_extras/keymap_swiss_fr.h index b1f2455a68..05a4a4c279 100644 --- a/quantum/keymap_extras/keymap_swiss_fr.h +++ b/quantum/keymap_extras/keymap_swiss_fr.h @@ -1,44 +1,33 @@ -/* Copyright 2016 Vincent Pochet - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -#ifdef CH_H -// The ChibiOS ch.h file defines this... -# undef CH_H -#endif - -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ^ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ è │ ¨ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ é │ à │ $ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define CH_SECT KC_GRV // § #define CH_1 KC_1 // 1 #define CH_2 KC_2 // 2 @@ -52,7 +41,6 @@ #define CH_0 KC_0 // 0 #define CH_QUOT KC_MINS // ' #define CH_CIRC KC_EQL // ^ (dead) -// Row 2 #define CH_Q KC_Q // Q #define CH_W KC_W // W #define CH_E KC_E // E @@ -65,7 +53,6 @@ #define CH_P KC_P // P #define CH_EGRV KC_LBRC // è #define CH_DIAE KC_RBRC // ¨ (dead) -// Row 3 #define CH_A KC_A // A #define CH_S KC_S // S #define CH_D KC_D // D @@ -78,7 +65,6 @@ #define CH_EACU KC_SCLN // é #define CH_AGRV KC_QUOT // à #define CH_DLR KC_NUHS // $ -// Row 4 #define CH_LABK KC_NUBS // < #define CH_Y KC_Z // Y #define CH_X KC_X // X @@ -90,21 +76,6 @@ #define CH_COMM KC_COMM // , #define CH_DOT KC_DOT // . #define CH_MINS KC_SLSH // - - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ° │ + │ " │ * │ ç │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ ü │ ! │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ ö │ ä │ £ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CH_DEG S(CH_SECT) // ° #define CH_PLUS S(CH_1) // + #define CH_DQUO S(CH_2) // " @@ -118,33 +89,15 @@ #define CH_EQL S(CH_0) // = #define CH_QUES S(CH_QUOT) // ? #define CH_GRV S(CH_CIRC) // ` (dead) -// Row 2 #define CH_UDIA S(CH_EGRV) // ü #define CH_EXLM S(CH_DIAE) // ! -// Row 3 #define CH_ODIA S(CH_EACU) // ö #define CH_ADIA S(CH_AGRV) // ä #define CH_PND S(CH_DLR) // £ -// Row 4 #define CH_RABK S(CH_LABK) // > #define CH_SCLN S(CH_COMM) // ; #define CH_COLN S(CH_DOT) // : #define CH_UNDS S(CH_MINS) // _ - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ¦ │ @ │ # │ │ │ ¬ │ | │ ¢ │ │ │ ´ │ ~ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ € │ │ │ │ │ │ │ │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ \ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define CH_BRKP ALGR(CH_1) // ¦ #define CH_AT ALGR(CH_2) // @ #define CH_HASH ALGR(CH_3) // # @@ -153,12 +106,10 @@ #define CH_CENT ALGR(CH_8) // ¢ #define CH_ACUT ALGR(CH_QUOT) // ´ (dead) #define CH_TILD ALGR(CH_CIRC) // ~ (dead) -// Row 2 #define CH_EURO ALGR(CH_E) // € #define CH_LBRC ALGR(CH_EGRV) // [ #define CH_RBRC ALGR(CH_DIAE) // ] -// Row 3 #define CH_LCBR ALGR(CH_AGRV) // { #define CH_RCBR ALGR(CH_DLR) // } -// Row 4 #define CH_BSLS ALGR(CH_LABK) // (backslash) + diff --git a/quantum/keymap_extras/keymap_turkish_f.h b/quantum/keymap_extras/keymap_turkish_f.h index aaee2aa480..0dfc0236e8 100644 --- a/quantum/keymap_extras/keymap_turkish_f.h +++ b/quantum/keymap_extras/keymap_turkish_f.h @@ -1,39 +1,33 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ + │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ / │ - │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ F │ G │ Ğ │ I │ O │ D │ R │ N │ H │ P │ Q │ W │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ U │ İ │ E │ A │ Ü │ T │ K │ M │ L │ Y │ Ş │ X │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ J │ Ö │ V │ C │ Ç │ Z │ S │ B │ . │ , │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define TR_PLUS KC_GRV // + #define TR_1 KC_1 // 1 #define TR_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define TR_0 KC_0 // 0 #define TR_SLSH KC_MINS // / #define TR_MINS KC_EQL // - -// Row 2 #define TR_F KC_Q // F #define TR_G KC_W // G #define TR_GBRV KC_E // Ğ @@ -60,7 +53,6 @@ #define TR_P KC_P // P #define TR_Q KC_LBRC // Q #define TR_W KC_RBRC // W -// Row 3 #define TR_U KC_A // U #define TR_IDOT KC_S // İ #define TR_E KC_D // E @@ -73,7 +65,6 @@ #define TR_Y KC_SCLN // Y #define TR_SCED KC_QUOT // Ş #define TR_X KC_NUHS // X -// Row 4 #define TR_LABK KC_NUBS // < #define TR_J KC_Z // J #define TR_ODIA KC_X // Ö @@ -85,21 +76,6 @@ #define TR_B KC_COMM // B #define TR_DOT KC_DOT // . #define TR_COMM KC_SLSH // , - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ * │ ! │ " │ ^ │ $ │ % │ & │ ' │ ( │ ) │ = │ ? │ _ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ │ : │ ; │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define TR_ASTR S(TR_PLUS) // * #define TR_EXLM S(TR_1) // ! #define TR_DQUO S(TR_2) // " @@ -113,25 +89,9 @@ #define TR_EQL S(TR_0) // = #define TR_QUES S(TR_SLSH) // ? #define TR_UNDS S(TR_MINS) // _ -// Row 4 #define TR_RABK S(TR_LABK) // > #define TR_COLN S(TR_DOT) // : #define TR_SCLN S(TR_COMM) // ; - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¬ │ ¹ │ ² │ # │ ¼ │ ½ │ ¾ │ { │ [ │ ] │ } │ \ │ | │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ @ │ │ │ ¶ │ │ ¥ │ │ │ Ø │ £ │ ¨ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Æ │ ß │ € │ │ │ ₺ │ │ │ │ ´ │ │ ` │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ « │ » │ ¢ │ │ │ │ µ │ × │ ÷ │ - │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define TR_NOT ALGR(TR_PLUS) // ¬ #define TR_SUP1 ALGR(TR_1) // ¹ #define TR_SUP2 ALGR(TR_2) // ² @@ -145,7 +105,6 @@ #define TR_RCBR ALGR(TR_0) // } #define TR_BSLS ALGR(TR_SLSH) // (backslash) #define TR_PIPE ALGR(TR_MINS) // | -// Row 2 #define TR_AT ALGR(TR_F) // @ #define TR_PILC ALGR(TR_I) // ¶ #define TR_YEN ALGR(TR_D) // ¥ @@ -153,14 +112,12 @@ #define TR_PND ALGR(TR_P) // £ #define TR_DIAE ALGR(TR_Q) // ¨ (dead) #define TR_TILD ALGR(TR_W) // ~ (dead) -// Row 3 #define TR_AE ALGR(TR_U) // Æ #define TR_SS ALGR(TR_IDOT) // ß #define TR_EURO ALGR(TR_E) // € #define TR_LIRA ALGR(TR_T) // ₺ #define TR_ACUT ALGR(TR_Y) // ´ (dead) #define TR_GRV ALGR(TR_X) // ` (dead) -// Row 4 #define TR_LDAQ ALGR(TR_J) // « #define TR_RDAQ ALGR(TR_ODIA) // » #define TR_CENT ALGR(TR_V) // ¢ @@ -168,30 +125,13 @@ #define TR_MUL ALGR(TR_B) // × #define TR_DIV ALGR(TR_DOT) // ÷ #define TR_SHYP ALGR(TR_COMM) // (soft hyphen) - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ ³ │ ¤ │ │ │ │ │ │ │ ¿ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ ® │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ § │ │ ª │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ ¦ │ │ │ © │ │ │ │ º │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define TR_SUP3 S(ALGR(TR_3)) // ³ #define TR_CURR S(ALGR(TR_4)) // ¤ #define TR_IQUE S(ALGR(TR_SLSH)) // ¿ -// Row 2 #define TR_REGD S(ALGR(TR_I)) // ® -// Row 3 #define TR_SECT S(ALGR(TR_IDOT)) // § #define TR_FORD S(ALGR(TR_A)) // ª -// Row 4 #define TR_BRKP S(ALGR(TR_LABK)) // ¦ #define TR_COPY S(ALGR(TR_V)) // © #define TR_MORD S(ALGR(TR_S)) // º + diff --git a/quantum/keymap_extras/keymap_turkish_q.h b/quantum/keymap_extras/keymap_turkish_q.h index 120e2b8d92..cc64300b18 100644 --- a/quantum/keymap_extras/keymap_turkish_q.h +++ b/quantum/keymap_extras/keymap_turkish_q.h @@ -1,39 +1,33 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ " │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ * │ - │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Ğ │ Ü │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ş │ İ │ , │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ < │ Z │ X │ C │ V │ B │ N │ M │ Ö │ Ç │ . │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define TR_DQUO KC_GRV // " #define TR_1 KC_1 // 1 #define TR_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define TR_0 KC_0 // 0 #define TR_ASTR KC_MINS // * #define TR_MINS KC_EQL // - -// Row 2 #define TR_Q KC_Q // Q #define TR_W KC_W // W #define TR_E KC_E // E @@ -60,7 +53,6 @@ #define TR_P KC_P // P #define TR_GBRV KC_LBRC // Ğ #define TR_UDIA KC_RBRC // Ü -// Row 3 #define TR_A KC_A // A #define TR_S KC_S // S #define TR_D KC_D // D @@ -73,7 +65,6 @@ #define TR_SCED KC_SCLN // Ş #define TR_IDOT KC_QUOT // İ #define TR_COMM KC_NUHS // , -// Row 4 #define TR_LABK KC_NUBS // < #define TR_Z KC_Z // Z #define TR_X KC_X // X @@ -85,21 +76,6 @@ #define TR_ODIA KC_COMM // Ö #define TR_CCED KC_DOT // Ç #define TR_DOT KC_SLSH // . - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ é │ ! │ ' │ ^ │ + │ % │ & │ / │ ( │ ) │ = │ ? │ _ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ; │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ > │ │ │ │ │ │ │ │ │ │ : │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define TR_EACU S(TR_DQUO) // é #define TR_EXLM S(TR_1) // ! #define TR_QUOT S(TR_2) // ' @@ -113,26 +89,9 @@ #define TR_EQL S(TR_0) // = #define TR_QUES S(TR_ASTR) // ? #define TR_UNDS S(TR_MINS) // _ -// Row 3 #define TR_SCLN S(TR_COMM) // ; -// Row 4 #define TR_RABK S(TR_LABK) // > #define TR_COLN S(TR_DOT) // : - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ £ │ # │ $ │ ½ │ │ { │ [ │ ] │ } │ \ │ | │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ @ │ │ € │ │ ₺ │ │ │ │ │ │ ¨ │ ~ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Æ │ ß │ │ │ │ │ │ │ │ ´ │ │ ` │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define TR_PND ALGR(TR_2) // £ #define TR_HASH ALGR(TR_3) // # #define TR_DLR ALGR(TR_4) // $ @@ -143,14 +102,13 @@ #define TR_RCBR ALGR(TR_0) // } #define TR_BSLS ALGR(TR_ASTR) // (backslash) #define TR_PIPE ALGR(TR_MINS) // | -// Row 2 #define TR_AT ALGR(TR_Q) // @ #define TR_EURO ALGR(TR_E) // € #define TR_LIRA ALGR(TR_T) // ₺ #define TR_DIAE ALGR(TR_GBRV) // ¨ (dead) #define TR_TILD ALGR(TR_UDIA) // ~ (dead) -// Row 3 #define TR_AE ALGR(TR_A) // Æ #define TR_SS ALGR(TR_S) // ß #define TR_ACUT ALGR(TR_SCED) // ´ (dead) #define TR_GRV ALGR(TR_COMM) // ` (dead) + diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h index 03fe8149f0..ff6f8c9c2e 100644 --- a/quantum/keymap_extras/keymap_uk.h +++ b/quantum/keymap_extras/keymap_uk.h @@ -1,39 +1,33 @@ -/* Copyright 2015-2016 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define UK_GRV KC_GRV // ` #define UK_1 KC_1 // 1 #define UK_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define UK_0 KC_0 // 0 #define UK_MINS KC_MINS // - #define UK_EQL KC_EQL // = -// Row 2 #define UK_Q KC_Q // Q #define UK_W KC_W // W #define UK_E KC_E // E @@ -60,7 +53,6 @@ #define UK_P KC_P // P #define UK_LBRC KC_LBRC // [ #define UK_RBRC KC_RBRC // ] -// Row 3 #define UK_A KC_A // A #define UK_S KC_S // S #define UK_D KC_D // D @@ -73,7 +65,6 @@ #define UK_SCLN KC_SCLN // ; #define UK_QUOT KC_QUOT // ' #define UK_HASH KC_NUHS // # -// Row 4 #define UK_BSLS KC_NUBS // (backslash) #define UK_Z KC_Z // Z #define UK_X KC_X // X @@ -85,21 +76,6 @@ #define UK_COMM KC_COMM // , #define UK_DOT KC_DOT // . #define UK_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¬ │ ! │ " │ £ │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ │ │ │ │ │ │ │ │ │ : │ @ │ ~ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ | │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define UK_NOT S(UK_GRV) // ¬ #define UK_EXLM S(UK_1) // ! #define UK_DQUO S(UK_2) // " @@ -113,39 +89,20 @@ #define UK_RPRN S(UK_0) // ) #define UK_UNDS S(UK_MINS) // _ #define UK_PLUS S(UK_EQL) // + -// Row 2 #define UK_LCBR S(UK_LBRC) // { #define UK_RCBR S(UK_RBRC) // } -// Row 3 #define UK_COLN S(UK_SCLN) // : #define UK_AT S(UK_QUOT) // @ #define UK_TILD S(UK_HASH) // ~ -// Row 4 #define UK_PIPE S(UK_BSLS) // | #define UK_LABK S(UK_COMM) // < #define UK_RABK S(UK_DOT) // > #define UK_QUES S(UK_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ¦ │ │ │ │ € │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ É │ │ │ │ Ú │ Í │ Ó │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ - * │ │ Á │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define UK_BRKP ALGR(UK_GRV) // ¦ #define UK_EURO ALGR(UK_4) // € -// Row 2 #define UK_EACU ALGR(KC_E) // É #define UK_UACU ALGR(KC_U) // Ú #define UK_IACU ALGR(KC_I) // Í #define UK_OACU ALGR(KC_O) // Ó -// Row 3 #define UK_AACU ALGR(KC_A) // Á + diff --git a/quantum/keymap_extras/keymap_ukrainian.h b/quantum/keymap_extras/keymap_ukrainian.h index e5cd80f3d2..b954bb2398 100644 --- a/quantum/keymap_extras/keymap_ukrainian.h +++ b/quantum/keymap_extras/keymap_ukrainian.h @@ -1,39 +1,33 @@ -/* Copyright 2022 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ' │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Й │ Ц │ У │ К │ Е │ Н │ Г │ Ш │ Щ │ З │ Х │ Ї │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ Ф │ І │ В │ А │ П │ Р │ О │ Л │ Д │ Ж │ Є │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Я │ Ч │ С │ М │ И │ Т │ Ь │ Б │ Ю │ . │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define UA_QUOT KC_GRV // ' #define UA_1 KC_1 // 1 #define UA_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define UA_0 KC_0 // 0 #define UA_MINS KC_MINS // - #define UA_EQL KC_EQL // = -// Row 2 #define UA_YOT KC_Q // Й #define UA_TSE KC_W // Ц #define UA_U KC_E // У @@ -61,7 +54,6 @@ #define UA_KHA KC_LBRC // Х #define UA_YI KC_RBRC // Ї #define UA_BSLS KC_BSLS // (backslash) -// Row 3 #define UA_EF KC_A // Ф #define UA_I KC_S // І #define UA_VE KC_D // В @@ -73,7 +65,6 @@ #define UA_DE KC_L // Д #define UA_ZHE KC_SCLN // Ж #define UA_YE KC_QUOT // Є -// Row 4 #define UA_YA KC_Z // Я #define UA_CHE KC_X // Ч #define UA_ES KC_C // С @@ -84,21 +75,6 @@ #define UA_BE KC_COMM // Б #define UA_YU KC_DOT // Ю #define UA_DOT KC_SLSH // . - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ₴ │ ! │ " │ № │ ; │ % │ : │ ? │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ / │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ │ │ , │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define UA_HRYV S(UA_QUOT) // ₴ #define UA_EXLM S(UA_1) // ! #define UA_DQUO S(UA_2) // " @@ -112,23 +88,7 @@ #define UA_RPRN S(UA_0) // ) #define UA_UNDS S(UA_MINS) // _ #define UA_PLUS S(UA_EQL) // + -// Row 2 #define UA_SLSH S(UA_BSLS) // / -// Row 4 #define UA_COMM S(UA_DOT) // , +#define UA_GE ALGR(UA_HE) // ґ -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ ґ │ │ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 2 -#define UA_GE ALGR(UA_HE) // ґ diff --git a/quantum/keymap_extras/keymap_us.h b/quantum/keymap_extras/keymap_us.h index b18c701679..38df8c6336 100644 --- a/quantum/keymap_extras/keymap_us.h +++ b/quantum/keymap_extras/keymap_us.h @@ -1,52 +1,55 @@ -// Copyright 2022 QMK +// Copyright 2023 QMK // SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define KC_TILD S(KC_GRAVE) // ~ -#define KC_EXLM S(KC_1) // ! -#define KC_AT S(KC_2) // @ -#define KC_HASH S(KC_3) // # -#define KC_DLR S(KC_4) // $ -#define KC_PERC S(KC_5) // % -#define KC_CIRC S(KC_6) // ^ -#define KC_AMPR S(KC_7) // & -#define KC_ASTR S(KC_8) // * -#define KC_LPRN S(KC_9) // ( -#define KC_RPRN S(KC_0) // ) +#define KC_EXLM S(KC_1) // ! +#define KC_AT S(KC_2) // @ +#define KC_HASH S(KC_3) // # +#define KC_DLR S(KC_4) // $ +#define KC_PERC S(KC_5) // % +#define KC_CIRC S(KC_6) // ^ +#define KC_AMPR S(KC_7) // & +#define KC_ASTR S(KC_8) // * +#define KC_LPRN S(KC_9) // ( +#define KC_RPRN S(KC_0) // ) #define KC_UNDS S(KC_MINUS) // _ #define KC_PLUS S(KC_EQUAL) // + -// Row 2 -#define KC_LCBR S(KC_LEFT_BRACKET) // { +#define KC_LCBR S(KC_LEFT_BRACKET) // { #define KC_RCBR S(KC_RIGHT_BRACKET) // } -#define KC_PIPE S(KC_BACKSLASH) // | -// Row 3 +#define KC_PIPE S(KC_BACKSLASH) // | #define KC_COLN S(KC_SEMICOLON) // : -#define KC_DQUO S(KC_QUOTE) // " -// Row 4 +#define KC_DQUO S(KC_QUOTE) // " #define KC_LABK S(KC_COMMA) // < -#define KC_RABK S(KC_DOT) // > +#define KC_RABK S(KC_DOT) // > #define KC_QUES S(KC_SLASH) // ? -// alias stuff #define KC_TILDE KC_TILD #define KC_EXCLAIM KC_EXLM #define KC_DOLLAR KC_DLR @@ -57,14 +60,11 @@ #define KC_LEFT_PAREN KC_LPRN #define KC_RIGHT_PAREN KC_RPRN #define KC_UNDERSCORE KC_UNDS - #define KC_LEFT_CURLY_BRACE KC_LCBR #define KC_RIGHT_CURLY_BRACE KC_RCBR - #define KC_COLON KC_COLN #define KC_DOUBLE_QUOTE KC_DQUO #define KC_DQT KC_DQUO - #define KC_LEFT_ANGLE_BRACKET KC_LABK #define KC_LT KC_LABK #define KC_RIGHT_ANGLE_BRACKET KC_RABK diff --git a/quantum/keymap_extras/keymap_us_extended.h b/quantum/keymap_extras/keymap_us_extended.h index 8e71a8de25..c4f627c30d 100644 --- a/quantum/keymap_extras/keymap_us_extended.h +++ b/quantum/keymap_extras/keymap_us_extended.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define US_GRV KC_GRV // ` #define US_1 KC_1 // 1 #define US_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define US_0 KC_0 // 0 #define US_MINS KC_MINS // - #define US_EQL KC_EQL // = -// Row 2 #define US_Q KC_Q // Q #define US_W KC_W // W #define US_E KC_E // E @@ -61,7 +54,6 @@ #define US_LBRC KC_LBRC // [ #define US_RBRC KC_RBRC // ] #define US_BSLS KC_BSLS // (backslash) -// Row 3 #define US_A KC_A // A #define US_S KC_S // S #define US_D KC_D // D @@ -73,7 +65,6 @@ #define US_L KC_L // L #define US_SCLN KC_SCLN // ; #define US_QUOT KC_QUOT // ' -// Row 4 #define US_Z KC_Z // Z #define US_X KC_X // X #define US_C KC_C // C @@ -84,21 +75,6 @@ #define US_COMM KC_COMM // , #define US_DOT KC_DOT // . #define US_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define US_TILD S(US_GRV) // ~ #define US_EXLM S(US_1) // ! #define US_AT S(US_2) // @ @@ -112,32 +88,14 @@ #define US_RPRN S(US_0) // ) #define US_UNDS S(US_MINS) // _ #define US_PLUS S(US_EQL) // + -// Row 2 #define US_LCBR S(US_LBRC) // { #define US_RCBR S(US_RBRC) // } #define US_PIPE S(US_BSLS) // | -// Row 3 #define US_COLN S(US_SCLN) // : #define US_DQUO S(US_QUOT) // " -// Row 4 #define US_LABK S(US_COMM) // < #define US_RABK S(US_DOT) // > #define US_QUES S(US_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ ¹ │ ² │ ³ │ ¤ │ € │ ^ │ ̛ │ ¾ │ ‘ │ ’ │ ¥ │ × │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Ä │ Å │ É │ ® │ Þ │ Ü │ Ú │ Í │ Ó │ Ö │ « │ » │ ¬ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ Á │ ß │ Ð │ │ │ │ Ï │ Œ │ Ø │ ¶ │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Æ │ │ © │ │ │ Ñ │ µ │ Ç │ ˙ │ ¿ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define US_DGRV ALGR(US_GRV) // ` (dead) #define US_SUP1 ALGR(US_1) // ¹ #define US_SUP2 ALGR(US_2) // ² @@ -145,13 +103,12 @@ #define US_CURR ALGR(US_4) // ¤ #define US_EURO ALGR(US_5) // € #define US_DCIR ALGR(US_6) // ^ (dead) -#define US_HORN ALGR(US_7) // ̛ (dead) +#define US_HORN ALGR(US_7) // ̛ (dead) #define US_OGON ALGR(US_8) // ˛ (dead) #define US_LSQU ALGR(US_9) // ‘ #define US_RSQU ALGR(US_0) // ’ #define US_YEN ALGR(US_MINS) // ¥ #define US_MUL ALGR(US_EQL) // × -// Row 2 #define US_ADIA ALGR(US_Q) // Ä #define US_ARNG ALGR(US_W) // Å #define US_EACU ALGR(US_E) // É @@ -165,7 +122,6 @@ #define US_LDAQ ALGR(US_LBRC) // « #define US_RDAQ ALGR(US_RBRC) // » #define US_NOT ALGR(US_BSLS) // ¬ -// Row 3 #define US_AACU ALGR(US_A) // Á #define US_SS ALGR(US_S) // ß #define US_ETH ALGR(US_D) // Ð @@ -174,7 +130,6 @@ #define US_OSTR ALGR(US_L) // Ø #define US_PILC ALGR(US_SCLN) // ¶ #define US_ACUT ALGR(US_QUOT) // ´ (dead) -// Row 4 #define US_AE ALGR(US_Z) // Æ #define US_OE_2 ALGR(US_X) // Œ #define US_COPY ALGR(US_C) // © @@ -184,21 +139,6 @@ #define US_CCED ALGR(US_COMM) // Ç #define US_DOTA ALGR(US_DOT) // ˙ (dead) #define US_IQUE ALGR(US_SLSH) // ¿ - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ¡ │ ˝ │ ¯ │ £ │ ¸ │ ¼ │ ½ │ ¾ │ ˘ │ ° │ ̣ │ ÷ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ “ │ ” │ ¦ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ § │ │ │ │ │ │ │ │ ° │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ ¢ │ │ │ │ │ │ ˇ │ ̉ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define US_DTIL S(ALGR(US_GRV)) // ~ (dead) #define US_IEXL S(ALGR(US_1)) // ¡ #define US_DACU S(ALGR(US_2)) // ˝ (dead) @@ -210,18 +150,15 @@ #define US_TQTR S(ALGR(US_8)) // ¾ #define US_BREV S(ALGR(US_9)) // ˘ (dead) #define US_RNGA S(ALGR(US_0)) // ° (dead) -#define US_DOTB S(ALGR(US_MINS)) // ̣ (dead) +#define US_DOTB S(ALGR(US_MINS)) // ̣ (dead) #define US_DIV S(ALGR(US_EQL)) // ÷ -// Row 2 #define US_LDQU S(ALGR(US_LBRC)) // “ #define US_RDQU S(ALGR(US_RBRC)) // ” #define US_BRKP S(ALGR(US_BSLS)) // ¦ -// Row 3 #define US_SECT S(ALGR(US_S)) // § #define US_DEG S(ALGR(US_SCLN)) // ° #define US_DIAE S(ALGR(US_QUOT)) // ¨ (dead) -// Row 4 #define US_CENT S(ALGR(US_C)) // ¢ #define US_CARN S(ALGR(US_DOT)) // ˇ (dead) -#define US_HOKA S(ALGR(US_SLSH)) // ̉ (dead) +#define US_HOKA S(ALGR(US_SLSH)) // ̉ (dead) diff --git a/quantum/keymap_extras/keymap_us_international.h b/quantum/keymap_extras/keymap_us_international.h index d491a38f52..1f2bc33476 100644 --- a/quantum/keymap_extras/keymap_us_international.h +++ b/quantum/keymap_extras/keymap_us_international.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ´ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define US_DGRV KC_GRV // ` (dead) #define US_1 KC_1 // 1 #define US_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define US_0 KC_0 // 0 #define US_MINS KC_MINS // - #define US_EQL KC_EQL // = -// Row 2 #define US_Q KC_Q // Q #define US_W KC_W // W #define US_E KC_E // E @@ -61,7 +54,6 @@ #define US_LBRC KC_LBRC // [ #define US_RBRC KC_RBRC // ] #define US_BSLS KC_BSLS // (backslash) -// Row 3 #define US_A KC_A // A #define US_S KC_S // S #define US_D KC_D // D @@ -73,7 +65,6 @@ #define US_L KC_L // L #define US_SCLN KC_SCLN // ; #define US_ACUT KC_QUOT // ´ (dead) -// Row 4 #define US_Z KC_Z // Z #define US_X KC_X // X #define US_C KC_C // C @@ -84,21 +75,6 @@ #define US_COMM KC_COMM // , #define US_DOT KC_DOT // . #define US_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ ¨ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define US_DTIL S(US_DGRV) // ~ (dead) #define US_EXLM S(US_1) // ! #define US_AT S(US_2) // @ @@ -112,32 +88,14 @@ #define US_RPRN S(US_0) // ) #define US_UNDS S(US_MINS) // _ #define US_PLUS S(US_EQL) // + -// Row 2 #define US_LCBR S(US_LBRC) // { #define US_RCBR S(US_RBRC) // } #define US_PIPE S(US_BSLS) // | -// Row 3 #define US_COLN S(US_SCLN) // : #define US_DIAE S(US_ACUT) // ¨ (dead) -// Row 4 #define US_LABK S(US_COMM) // < #define US_RABK S(US_DOT) // > #define US_QUES S(US_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ¡ │ ² │ ³ │ ¤ │ € │ ¼ │ ½ │ ¾ │ ‘ │ ’ │ ¥ │ × │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Ä │ Å │ É │ ® │ Þ │ Ü │ Ú │ Í │ Ó │ Ö │ « │ » │ ¬ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ Á │ ß │ Ð │ │ │ │ │ │ Ø │ ¶ │ ´ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Æ │ │ © │ │ │ Ñ │ µ │ Ç │ │ ¿ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define US_IEXL ALGR(US_1) // ¡ #define US_SUP2 ALGR(US_2) // ² #define US_SUP3 ALGR(US_3) // ³ @@ -150,7 +108,6 @@ #define US_RSQU ALGR(US_0) // ’ #define US_YEN ALGR(US_MINS) // ¥ #define US_MUL ALGR(US_EQL) // × -// Row 2 #define US_ADIA ALGR(US_Q) // Ä #define US_ARNG ALGR(US_W) // Å #define US_EACU ALGR(US_E) // É @@ -164,43 +121,24 @@ #define US_LDAQ ALGR(US_LBRC) // « #define US_RDAQ ALGR(US_RBRC) // » #define US_NOT ALGR(US_BSLS) // ¬ -// Row 3 #define US_AACU ALGR(US_A) // Á #define US_SS ALGR(US_S) // ß #define US_ETH ALGR(US_D) // Ð #define US_OSTR ALGR(US_L) // Ø #define US_PILC ALGR(US_SCLN) // ¶ #define US_NDAC ALGR(US_ACUT) // ´ -// Row 4 #define US_AE ALGR(US_Z) // Æ #define US_COPY ALGR(US_C) // © #define US_NTIL ALGR(US_N) // Ñ #define US_MICR ALGR(US_M) // µ #define US_CCED ALGR(US_COMM) // Ç #define US_IQUE ALGR(US_SLSH) // ¿ - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ ¹ │ │ │ £ │ │ │ │ │ │ │ │ ÷ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ¦ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ § │ │ │ │ │ │ │ │ ° │ ¨ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ ¢ │ │ │ │ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define US_SUP1 S(ALGR(US_1)) // ¹ #define US_PND S(ALGR(US_4)) // £ #define US_DIV S(ALGR(US_EQL)) // ÷ -// Row 2 #define US_BRKP S(ALGR(US_BSLS)) // ¦ -// Row 3 #define US_SECT S(ALGR(US_S)) // § #define US_DEG S(ALGR(US_SCLN)) // ° #define US_NDDR S(ALGR(US_ACUT)) // ¨ -// Row 4 #define US_CENT S(ALGR(US_C)) // ¢ + diff --git a/quantum/keymap_extras/keymap_us_international_linux.h b/quantum/keymap_extras/keymap_us_international_linux.h index e0c08200b9..16d072cc5b 100644 --- a/quantum/keymap_extras/keymap_us_international_linux.h +++ b/quantum/keymap_extras/keymap_us_international_linux.h @@ -1,39 +1,33 @@ -/* Copyright 2020 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ´ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define US_DGRV KC_GRV // ` (dead) #define US_1 KC_1 // 1 #define US_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define US_0 KC_0 // 0 #define US_MINS KC_MINS // - #define US_EQL KC_EQL // = -// Row 2 #define US_Q KC_Q // Q #define US_W KC_W // W #define US_E KC_E // E @@ -61,7 +54,6 @@ #define US_LBRC KC_LBRC // [ #define US_RBRC KC_RBRC // ] #define US_BSLS KC_BSLS // (backslash) -// Row 3 #define US_A KC_A // A #define US_S KC_S // S #define US_D KC_D // D @@ -73,7 +65,6 @@ #define US_L KC_L // L #define US_SCLN KC_SCLN // ; #define US_ACUT KC_QUOT // ´ (dead) -// Row 4 #define US_Z KC_Z // Z #define US_X KC_X // X #define US_C KC_C // C @@ -84,21 +75,6 @@ #define US_COMM KC_COMM // , #define US_DOT KC_DOT // . #define US_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ ¨ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define US_DTIL S(US_DGRV) // ~ (dead) #define US_EXLM S(US_1) // ! #define US_AT S(US_2) // @ @@ -112,33 +88,14 @@ #define US_RPRN S(US_0) // ) #define US_UNDS S(US_MINS) // _ #define US_PLUS S(US_EQL) // + -// Row 2 #define US_LCBR S(US_LBRC) // { #define US_RCBR S(US_RBRC) // } #define US_PIPE S(US_BSLS) // | -// Row 3 #define US_COLN S(US_SCLN) // : #define US_DIAE S(US_ACUT) // ¨ (dead) -// Row 4 #define US_LABK S(US_COMM) // < #define US_RABK S(US_DOT) // > #define US_QUES S(US_SLSH) // ? - -/* AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ ¡ │ ² │ ³ │ ¤ │ € │ ¼ │ ½ │ ¾ │ ‘ │ ’ │ ¥ │ × │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Ä │ Å │ É │ ® │ Þ │ Ü │ Ú │ Í │ Ó │ Ö │ « │ » │ ¬ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ Á │ ß │ Ð │ │ │ │ │ Œ │ Ø │ ¶ │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Æ │ │ © │ │ │ Ñ │ µ │ Ç │ ˙ │ ¿ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ - -// Row 1 #define US_GRV ALGR(US_DGRV) // ` #define US_IEXL ALGR(US_1) // ¡ #define US_SUP2 ALGR(US_2) // ² @@ -152,7 +109,6 @@ #define US_RSQU ALGR(US_0) // ’ #define US_YEN ALGR(US_MINS) // ¥ #define US_MUL ALGR(US_EQL) // × -// Row 2 #define US_ADIA ALGR(US_Q) // Ä #define US_ARNG ALGR(US_W) // Å #define US_EACU ALGR(US_E) // É @@ -166,7 +122,6 @@ #define US_LDAQ ALGR(US_LBRC) // « #define US_RDAQ ALGR(US_RBRC) // » #define US_NOT ALGR(US_BSLS) // ¬ -// Row 3 #define US_AACU ALGR(US_A) // Á #define US_SS ALGR(US_S) // ß #define US_ETH ALGR(US_D) // Ð @@ -174,7 +129,6 @@ #define US_OSTR ALGR(US_L) // Ø #define US_PILC ALGR(US_SCLN) // ¶ #define US_QUOT ALGR(US_ACUT) // ' -// Row 4 #define US_AE ALGR(US_Z) // Æ #define US_COPY ALGR(US_C) // © #define US_NTIL ALGR(US_N) // Ñ @@ -182,21 +136,6 @@ #define US_CCED ALGR(US_COMM) // Ç #define US_DOTA ALGR(US_DOT) // ˙ (dead) #define US_IQUE ALGR(US_SLSH) // ¿ - -/* Shift+AltGr symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ¹ │ ˝ │ ¯ │ £ │ ¸ │ ^ │ ̛ │ ˛ │ ˘ │ ° │ ̣ │ ÷ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ “ │ ” │ ¦ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ § │ │ │ │ │ │ │ │ ° │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ ¢ │ │ │ │ │ │ ˇ │ ̉ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define US_TILD S(ALGR(US_DGRV)) // ~ #define US_SUP1 S(ALGR(US_1)) // ¹ #define US_DACU S(ALGR(US_2)) // ˝ (dead) @@ -204,21 +143,19 @@ #define US_PND S(ALGR(US_4)) // £ #define US_CEDL S(ALGR(US_5)) // ¸ (dead) #define US_CIRC S(ALGR(US_6)) // ^ -#define US_HORN S(ALGR(US_7)) // ̛ (dead) +#define US_HORN S(ALGR(US_7)) // ̛ (dead) #define US_OGON S(ALGR(US_8)) // ˛ (dead) #define US_BREV S(ALGR(US_9)) // ˘ (dead) #define US_RNGA S(ALGR(US_0)) // ° (dead) -#define US_DOTB S(ALGR(US_MINS)) // ̣ (dead) +#define US_DOTB S(ALGR(US_MINS)) // ̣ (dead) #define US_DIV S(ALGR(US_EQL)) // ÷ -// Row 2 #define US_LDQU S(ALGR(US_LBRC)) // “ #define US_RDQU S(ALGR(US_RBRC)) // ” #define US_BRKP S(ALGR(US_BSLS)) // ¦ -// Row 3 #define US_SECT S(ALGR(US_S)) // § #define US_DEG S(ALGR(US_SCLN)) // ° #define US_DQUO S(ALGR(US_ACUT)) // " -// Row 4 #define US_CENT S(ALGR(US_C)) // ¢ #define US_CARN S(ALGR(US_DOT)) // ˇ (dead) -#define US_HOKA S(ALGR(US_SLSH)) // ̉ (dead) +#define US_HOKA S(ALGR(US_SLSH)) // ̉ (dead) + diff --git a/quantum/keymap_extras/keymap_workman.h b/quantum/keymap_extras/keymap_workman.h index 6367d68351..5fe9d36b16 100644 --- a/quantum/keymap_extras/keymap_workman.h +++ b/quantum/keymap_extras/keymap_workman.h @@ -1,39 +1,33 @@ -/* Copyright 2018 Jacob Jerrell - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ D │ R │ W │ B │ J │ F │ U │ P │ ; │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ S │ H │ T │ G │ Y │ N │ E │ O │ I │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ M │ C │ V │ K │ L │ , │ . │ / │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define WK_GRV KC_GRV // ` #define WK_1 KC_1 // 1 #define WK_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define WK_0 KC_0 // 0 #define WK_MINS KC_MINS // - #define WK_EQL KC_EQL // = -// Row 2 #define WK_Q KC_Q // Q #define WK_D KC_W // D #define WK_R KC_E // R @@ -61,7 +54,6 @@ #define WK_LBRC KC_LBRC // [ #define WK_RBRC KC_RBRC // ] #define WK_BSLS KC_BSLS // (backslash) -// Row 3 #define WK_A KC_A // A #define WK_S KC_S // S #define WK_H KC_D // H @@ -73,7 +65,6 @@ #define WK_O KC_L // O #define WK_I KC_SCLN // I #define WK_QUOT KC_QUOT // ' -// Row 4 #define WK_Z KC_Z // Z #define WK_X KC_X // X #define WK_M KC_C // M @@ -84,21 +75,6 @@ #define WK_COMM KC_COMM // , #define WK_DOT KC_DOT // . #define WK_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define WK_TILD S(WK_GRV) // ~ #define WK_EXLM S(WK_1) // ! #define WK_AT S(WK_2) // @ @@ -112,14 +88,12 @@ #define WK_RPRN S(WK_0) // ) #define WK_UNDS S(WK_MINS) // _ #define WK_PLUS S(WK_EQL) // + -// Row 2 #define WK_COLN S(WK_SCLN) // : #define WK_LCBR S(WK_LBRC) // { #define WK_RCBR S(WK_RBRC) // } #define WK_PIPE S(WK_BSLS) // | -// Row 3 #define WK_DQUO S(WK_QUOT) // " -// Row 4 #define WK_LABK S(WK_COMM) // < #define WK_RABK S(WK_DOT) // > #define WK_QUES S(WK_SLSH) // ? + diff --git a/quantum/keymap_extras/keymap_workman_zxcvm.h b/quantum/keymap_extras/keymap_workman_zxcvm.h index 01eb83c397..757f98e912 100644 --- a/quantum/keymap_extras/keymap_workman_zxcvm.h +++ b/quantum/keymap_extras/keymap_workman_zxcvm.h @@ -1,39 +1,33 @@ -/* Copyright 2018 Jacob Jerrell - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ +#pragma once #include "keymap.h" - // clang-format off -/* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ Q │ D │ R │ W │ B │ J │ F │ U │ P │ ; │ [ │ ] │ \ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ A │ S │ H │ T │ G │ Y │ N │ E │ O │ I │ ' │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ Z │ X │ C │ V │ M │ K │ L │ , │ . │ / │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 +// Aliases #define WK_GRV KC_GRV // ` #define WK_1 KC_1 // 1 #define WK_2 KC_2 // 2 @@ -47,7 +41,6 @@ #define WK_0 KC_0 // 0 #define WK_MINS KC_MINS // - #define WK_EQL KC_EQL // = -// Row 2 #define WK_Q KC_Q // Q #define WK_D KC_W // D #define WK_R KC_E // R @@ -61,7 +54,6 @@ #define WK_LBRC KC_LBRC // [ #define WK_RBRC KC_RBRC // ] #define WK_BSLS KC_BSLS // (backslash) -// Row 3 #define WK_A KC_A // A #define WK_S KC_S // S #define WK_H KC_D // H @@ -73,7 +65,6 @@ #define WK_O KC_L // O #define WK_I KC_SCLN // I #define WK_QUOT KC_QUOT // ' -// Row 4 #define WK_Z KC_Z // Z #define WK_X KC_X // X #define WK_C KC_C // C @@ -84,21 +75,6 @@ #define WK_COMM KC_COMM // , #define WK_DOT KC_DOT // . #define WK_SLSH KC_SLSH // / - -/* Shifted symbols - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │ │ │ │ │ │ │ │ │ │ : │ { │ } │ | │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ " │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ - * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ - * │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ - */ -// Row 1 #define WK_TILD S(WK_GRV) // ~ #define WK_EXLM S(WK_1) // ! #define WK_AT S(WK_2) // @ @@ -112,14 +88,12 @@ #define WK_RPRN S(WK_0) // ) #define WK_UNDS S(WK_MINS) // _ #define WK_PLUS S(WK_EQL) // + -// Row 2 #define WK_COLN S(WK_SCLN) // : #define WK_LCBR S(WK_LBRC) // { #define WK_RCBR S(WK_RBRC) // } #define WK_PIPE S(WK_BSLS) // | -// Row 3 #define WK_DQUO S(WK_QUOT) // " -// Row 4 #define WK_LABK S(WK_COMM) // < #define WK_RABK S(WK_DOT) // > #define WK_QUES S(WK_SLSH) // ? + diff --git a/quantum/keymap_introspection.c b/quantum/keymap_introspection.c index 93aab82fcc..2459ad0df5 100644 --- a/quantum/keymap_introspection.c +++ b/quantum/keymap_introspection.c @@ -11,40 +11,58 @@ #include "keymap_introspection.h" -#define NUM_KEYMAP_LAYERS ((uint8_t)(sizeof(keymaps) / ((MATRIX_ROWS) * (MATRIX_COLS) * sizeof(uint16_t)))) +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Key mapping -uint8_t keymap_layer_count(void) { - return NUM_KEYMAP_LAYERS; +#define NUM_KEYMAP_LAYERS_RAW ((uint8_t)(sizeof(keymaps) / ((MATRIX_ROWS) * (MATRIX_COLS) * sizeof(uint16_t)))) + +uint8_t keymap_layer_count_raw(void) { + return NUM_KEYMAP_LAYERS_RAW; +} + +__attribute__((weak)) uint8_t keymap_layer_count(void) { + return keymap_layer_count_raw(); } -_Static_assert(NUM_KEYMAP_LAYERS <= MAX_LAYER, "Number of keymap layers exceeds maximum set by LAYER_STATE_(8|16|32)BIT"); +#ifdef DYNAMIC_KEYMAP_ENABLE +_Static_assert(NUM_KEYMAP_LAYERS_RAW <= MAX_LAYER, "Number of keymap layers exceeds maximum set by DYNAMIC_KEYMAP_LAYER_COUNT"); +#else +_Static_assert(NUM_KEYMAP_LAYERS_RAW <= MAX_LAYER, "Number of keymap layers exceeds maximum set by LAYER_STATE_(8|16|32)BIT"); +#endif uint16_t keycode_at_keymap_location_raw(uint8_t layer_num, uint8_t row, uint8_t column) { - if (layer_num < NUM_KEYMAP_LAYERS && row < MATRIX_ROWS && column < MATRIX_COLS) { + if (layer_num < NUM_KEYMAP_LAYERS_RAW && row < MATRIX_ROWS && column < MATRIX_COLS) { return pgm_read_word(&keymaps[layer_num][row][column]); } - return KC_NO; + return KC_TRNS; } __attribute__((weak)) uint16_t keycode_at_keymap_location(uint8_t layer_num, uint8_t row, uint8_t column) { return keycode_at_keymap_location_raw(layer_num, row, column); } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Encoder mapping + #if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) -# define NUM_ENCODERMAP_LAYERS ((uint8_t)(sizeof(encoder_map) / ((NUM_ENCODERS) * (2) * sizeof(uint16_t)))) +# define NUM_ENCODERMAP_LAYERS_RAW ((uint8_t)(sizeof(encoder_map) / ((NUM_ENCODERS) * (2) * sizeof(uint16_t)))) + +uint8_t encodermap_layer_count_raw(void) { + return NUM_ENCODERMAP_LAYERS_RAW; +} -uint8_t encodermap_layer_count(void) { - return NUM_ENCODERMAP_LAYERS; +__attribute__((weak)) uint8_t encodermap_layer_count(void) { + return encodermap_layer_count_raw(); } -_Static_assert(NUM_KEYMAP_LAYERS == NUM_ENCODERMAP_LAYERS, "Number of encoder_map layers doesn't match the number of keymap layers"); +_Static_assert(NUM_KEYMAP_LAYERS_RAW == NUM_ENCODERMAP_LAYERS_RAW, "Number of encoder_map layers doesn't match the number of keymap layers"); uint16_t keycode_at_encodermap_location_raw(uint8_t layer_num, uint8_t encoder_idx, bool clockwise) { - if (layer_num < NUM_ENCODERMAP_LAYERS && encoder_idx < NUM_ENCODERS) { + if (layer_num < NUM_ENCODERMAP_LAYERS_RAW && encoder_idx < NUM_ENCODERS) { return pgm_read_word(&encoder_map[layer_num][encoder_idx][clockwise ? 0 : 1]); } - return KC_NO; + return KC_TRNS; } __attribute__((weak)) uint16_t keycode_at_encodermap_location(uint8_t layer_num, uint8_t encoder_idx, bool clockwise) { diff --git a/quantum/keymap_introspection.h b/quantum/keymap_introspection.h index 9de706a021..a8df3928a6 100644 --- a/quantum/keymap_introspection.h +++ b/quantum/keymap_introspection.h @@ -4,7 +4,12 @@ #include <stdint.h> -// Get the number of layers defined in the keymap +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Key mapping + +// Get the number of layers defined in the keymap, stored in firmware rather than any other persistent storage +uint8_t keymap_layer_count_raw(void); +// Get the number of layers defined in the keymap, potentially stored dynamically uint8_t keymap_layer_count(void); // Get the keycode for the keymap location, stored in firmware rather than any other persistent storage @@ -12,9 +17,14 @@ uint16_t keycode_at_keymap_location_raw(uint8_t layer_num, uint8_t row, uint8_t // Get the keycode for the keymap location, potentially stored dynamically uint16_t keycode_at_keymap_location(uint8_t layer_num, uint8_t row, uint8_t column); +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Encoder mapping + #if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) -// Get the number of layers defined in the encoder map +// Get the number of layers defined in the encoder map, stored in firmware rather than any other persistent storage +uint8_t encodermap_layer_count_raw(void); +// Get the number of layers defined in the encoder map, potentially stored dynamically uint8_t encodermap_layer_count(void); // Get the keycode for the encoder mapping location, stored in firmware rather than any other persistent storage diff --git a/quantum/leader.c b/quantum/leader.c new file mode 100644 index 0000000000..272609ad0c --- /dev/null +++ b/quantum/leader.c @@ -0,0 +1,101 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "leader.h" +#include "timer.h" +#include "util.h" + +#include <string.h> + +#ifndef LEADER_TIMEOUT +# define LEADER_TIMEOUT 300 +#endif + +// Leader key stuff +bool leading = false; +uint16_t leader_time = 0; +uint16_t leader_sequence[5] = {0, 0, 0, 0, 0}; +uint8_t leader_sequence_size = 0; + +__attribute__((weak)) void leader_start_user(void) {} + +__attribute__((weak)) void leader_end_user(void) {} + +void leader_start(void) { + if (leading) { + return; + } + leader_start_user(); + leading = true; + leader_time = timer_read(); + leader_sequence_size = 0; + memset(leader_sequence, 0, sizeof(leader_sequence)); +} + +void leader_end(void) { + leading = false; + leader_end_user(); +} + +void leader_task(void) { + if (leader_sequence_active() && leader_sequence_timed_out()) { + leader_end(); + } +} + +bool leader_sequence_active(void) { + return leading; +} + +bool leader_sequence_add(uint16_t keycode) { + if (leader_sequence_size >= ARRAY_SIZE(leader_sequence)) { + return false; + } + +#if defined(LEADER_NO_TIMEOUT) + if (leader_sequence_size == 0) { + leader_reset_timer(); + } +#endif + + leader_sequence[leader_sequence_size] = keycode; + leader_sequence_size++; + + return true; +} + +bool leader_sequence_timed_out(void) { +#if defined(LEADER_NO_TIMEOUT) + return leader_sequence_size > 0 && timer_elapsed(leader_time) > LEADER_TIMEOUT; +#else + return timer_elapsed(leader_time) > LEADER_TIMEOUT; +#endif +} + +void leader_reset_timer(void) { + leader_time = timer_read(); +} + +bool leader_sequence_is(uint16_t kc1, uint16_t kc2, uint16_t kc3, uint16_t kc4, uint16_t kc5) { + return leader_sequence[0] == kc1 && leader_sequence[1] == kc2 && leader_sequence[2] == kc3 && leader_sequence[3] == kc4 && leader_sequence[4] == kc5; +} + +bool leader_sequence_one_key(uint16_t kc) { + return leader_sequence_is(kc, 0, 0, 0, 0); +} + +bool leader_sequence_two_keys(uint16_t kc1, uint16_t kc2) { + return leader_sequence_is(kc1, kc2, 0, 0, 0); +} + +bool leader_sequence_three_keys(uint16_t kc1, uint16_t kc2, uint16_t kc3) { + return leader_sequence_is(kc1, kc2, kc3, 0, 0); +} + +bool leader_sequence_four_keys(uint16_t kc1, uint16_t kc2, uint16_t kc3, uint16_t kc4) { + return leader_sequence_is(kc1, kc2, kc3, kc4, 0); +} + +bool leader_sequence_five_keys(uint16_t kc1, uint16_t kc2, uint16_t kc3, uint16_t kc4, uint16_t kc5) { + return leader_sequence_is(kc1, kc2, kc3, kc4, kc5); +} diff --git a/quantum/leader.h b/quantum/leader.h new file mode 100644 index 0000000000..1999006c56 --- /dev/null +++ b/quantum/leader.h @@ -0,0 +1,119 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include <stdbool.h> +#include <stdint.h> + +/** + * \defgroup leader + * + * Leader Key + * \{ + */ + +/** + * \brief User callback, invoked when the leader sequence begins. + */ +void leader_start_user(void); + +/** + * \brief User callback, invoked when the leader sequence ends. + */ +void leader_end_user(void); + +/** + * Begin the leader sequence, resetting the buffer and timer. + */ +void leader_start(void); + +/** + * End the leader sequence. + */ +void leader_end(void); + +void leader_task(void); + +/** + * Whether the leader sequence is active. + */ +bool leader_sequence_active(void); + +/** + * Add the given keycode to the sequence buffer. + * + * If `LEADER_NO_TIMEOUT` is defined, the timer is reset if the buffer is empty. + * + * \param keycode The keycode to add. + * + * \return `true` if the keycode was added, `false` if the buffer is full. + */ +bool leader_sequence_add(uint16_t keycode); + +/** + * Whether the leader sequence has reached the timeout. + * + * If `LEADER_NO_TIMEOUT` is defined, the buffer must also contain at least one key. + */ +bool leader_sequence_timed_out(void); + +/** + * Reset the leader sequence timer. + */ +void leader_reset_timer(void); + +/** + * Check the sequence buffer for the given keycode. + * + * \param kc The keycode to check. + * + * \return `true` if the sequence buffer matches. + */ +bool leader_sequence_one_key(uint16_t kc); + +/** + * Check the sequence buffer for the given keycodes. + * + * \param kc1 The first keycode to check. + * \param kc2 The second keycode to check. + * + * \return `true` if the sequence buffer matches. + */ +bool leader_sequence_two_keys(uint16_t kc1, uint16_t kc2); + +/** + * Check the sequence buffer for the given keycodes. + * + * \param kc1 The first keycode to check. + * \param kc2 The second keycode to check. + * \param kc3 The third keycode to check. + * + * \return `true` if the sequence buffer matches. + */ +bool leader_sequence_three_keys(uint16_t kc1, uint16_t kc2, uint16_t kc3); + +/** + * Check the sequence buffer for the given keycodes. + * + * \param kc1 The first keycode to check. + * \param kc2 The second keycode to check. + * \param kc3 The third keycode to check. + * \param kc4 The fourth keycode to check. + * + * \return `true` if the sequence buffer matches. + */ +bool leader_sequence_four_keys(uint16_t kc1, uint16_t kc2, uint16_t kc3, uint16_t kc4); + +/** + * Check the sequence buffer for the given keycodes. + * + * \param kc1 The first keycode to check. + * \param kc2 The second keycode to check. + * \param kc3 The third keycode to check. + * \param kc4 The fourth keycode to check. + * \param kc5 The fifth keycode to check. + * + * \return `true` if the sequence buffer matches. + */ +bool leader_sequence_five_keys(uint16_t kc1, uint16_t kc2, uint16_t kc3, uint16_t kc4, uint16_t kc5); + +/** \} */ diff --git a/quantum/led.c b/quantum/led.c index 7db38bb88c..42144566fd 100644 --- a/quantum/led.c +++ b/quantum/led.c @@ -69,14 +69,6 @@ uint32_t last_led_activity_elapsed(void) { */ __attribute__((weak)) void led_set_user(uint8_t usb_led) {} -/** \brief Lock LED set callback - keyboard level - * - * \deprecated Use led_update_kb() instead. - */ -__attribute__((weak)) void led_set_kb(uint8_t usb_led) { - led_set_user(usb_led); -} - /** \brief Lock LED update callback - keymap/user level * * \return True if led_update_kb() should run its own code, false otherwise. @@ -154,7 +146,7 @@ __attribute__((weak)) void led_set(uint8_t usb_led) { handle_backlight_caps_lock((led_t)usb_led); #endif - led_set_kb(usb_led); + led_set_user(usb_led); led_update_kb((led_t)usb_led); } diff --git a/quantum/led.h b/quantum/led.h index d12e519ea2..b9ad7ed9ae 100644 --- a/quantum/led.h +++ b/quantum/led.h @@ -55,9 +55,10 @@ void led_wakeup(void); void led_task(void); -/* Callbacks */ +/* Deprecated callbacks */ void led_set_user(uint8_t usb_led); -void led_set_kb(uint8_t usb_led); + +/* Callbacks */ bool led_update_user(led_t led_state); bool led_update_kb(led_t led_state); void led_update_ports(led_t led_state); diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 577331d916..828d61641a 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -19,7 +19,6 @@ #include "led_matrix.h" #include "progmem.h" -#include "config.h" #include "eeprom.h" #include <string.h> #include <math.h> diff --git a/quantum/logging/nodebug.h b/quantum/logging/nodebug.h deleted file mode 100644 index 0b176684bd..0000000000 --- a/quantum/logging/nodebug.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2013 Jun Wako <wakojun@gmail.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#ifndef NO_DEBUG -# define NO_DEBUG -# include "debug.h" -# undef NO_DEBUG -#else -# include "debug.h" -#endif diff --git a/quantum/main.c b/quantum/main.c index 2d5911b708..3b101c522c 100644 --- a/quantum/main.c +++ b/quantum/main.c @@ -60,9 +60,9 @@ int main(void) { protocol_task(); #ifdef QUANTUM_PAINTER_ENABLE - // Run Quantum Painter animations - void qp_internal_animation_tick(void); - qp_internal_animation_tick(); + // Run Quantum Painter task + void qp_internal_task(void); + qp_internal_task(); #endif #ifdef DEFERRED_EXEC_ENABLE diff --git a/quantum/matrix.c b/quantum/matrix.c index db683104ed..97d41caedd 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -46,6 +46,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define SPLIT_MUTABLE_COL const #endif +#ifndef MATRIX_INPUT_PRESSED_STATE +# define MATRIX_INPUT_PRESSED_STATE 0 +#endif + #ifdef DIRECT_PINS static SPLIT_MUTABLE pin_t direct_pins[ROWS_PER_HAND][MATRIX_COLS] = DIRECT_PINS; #elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) @@ -93,7 +97,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) { static inline uint8_t readMatrixPin(pin_t pin) { if (pin != NO_PIN) { - return readPin(pin); + return (readPin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1; } else { return 1; } @@ -121,9 +125,7 @@ __attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[] matrix_row_t row_shifter = MATRIX_ROW_SHIFTER; for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++, row_shifter <<= 1) { pin_t pin = direct_pins[current_row][col_index]; - if (pin != NO_PIN) { - current_row_value |= readPin(pin) ? 0 : row_shifter; - } + current_row_value |= readMatrixPin(pin) ? 0 : row_shifter; } // Update the matrix @@ -306,7 +308,7 @@ void matrix_init(void) { debounce_init(ROWS_PER_HAND); - matrix_init_quantum(); + matrix_init_kb(); } #ifdef SPLIT_KEYBOARD @@ -340,7 +342,7 @@ uint8_t matrix_scan(void) { changed = debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed) | matrix_post_scan(); #else changed = debounce(raw_matrix, matrix, ROWS_PER_HAND, changed); - matrix_scan_quantum(); + matrix_scan_kb(); #endif return (uint8_t)changed; } diff --git a/quantum/matrix.h b/quantum/matrix.h index d968efeb0f..a5b628fc59 100644 --- a/quantum/matrix.h +++ b/quantum/matrix.h @@ -19,6 +19,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <stdint.h> #include <stdbool.h> +#include "gpio.h" + +/* diode directions */ +#define COL2ROW 0 +#define ROW2COL 1 #if (MATRIX_COLS <= 8) typedef uint8_t matrix_row_t; @@ -46,6 +51,8 @@ void matrix_setup(void); void matrix_init(void); /* scan all key states on matrix */ uint8_t matrix_scan(void); +/* whether matrix scanning operations should be executed */ +bool matrix_can_read(void); /* whether a switch is on */ bool matrix_is_on(uint8_t row, uint8_t col); /* matrix state on row */ @@ -62,10 +69,6 @@ void matrix_io_delay(void); void matrix_power_up(void); void matrix_power_down(void); -/* executes code for Quantum */ -void matrix_init_quantum(void); -void matrix_scan_quantum(void); - void matrix_init_kb(void); void matrix_scan_kb(void); diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index f2b9d58937..3173351888 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c @@ -111,7 +111,7 @@ bool matrix_post_scan(void) { if (changed) memcpy(matrix + thatHand, slave_matrix, sizeof(slave_matrix)); - matrix_scan_quantum(); + matrix_scan_kb(); } else { transport_slave(matrix + thatHand, matrix + thisHand); @@ -162,7 +162,7 @@ __attribute__((weak)) void matrix_init(void) { debounce_init(ROWS_PER_HAND); - matrix_init_quantum(); + matrix_init_kb(); } __attribute__((weak)) uint8_t matrix_scan(void) { @@ -172,7 +172,7 @@ __attribute__((weak)) uint8_t matrix_scan(void) { changed = debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed) | matrix_post_scan(); #else changed = debounce(raw_matrix, matrix, ROWS_PER_HAND, changed); - matrix_scan_quantum(); + matrix_scan_kb(); #endif return changed; diff --git a/quantum/midi/Config/LUFAConfig.h b/quantum/midi/Config/LUFAConfig.h new file mode 100644 index 0000000000..dead96de78 --- /dev/null +++ b/quantum/midi/Config/LUFAConfig.h @@ -0,0 +1,91 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#pragma once + +#if (ARCH == ARCH_AVR8) + +/* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + +/* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + +/* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG +# define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) +# define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + +/* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS +# define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL +# define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} +# define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + +/* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + +#else + +# error Unsupported architecture for this LUFA configuration file. + +#endif diff --git a/quantum/midi/bytequeue/COPYING b/quantum/midi/bytequeue/COPYING new file mode 100755 index 0000000000..94a9ed024d --- /dev/null +++ b/quantum/midi/bytequeue/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/quantum/midi/bytequeue/bytequeue.c b/quantum/midi/bytequeue/bytequeue.c new file mode 100644 index 0000000000..0dd18680f0 --- /dev/null +++ b/quantum/midi/bytequeue/bytequeue.c @@ -0,0 +1,64 @@ +// this is a single reader [maybe multiple writer?] byte queue +// Copyright 2008 Alex Norman +// writen by Alex Norman +// +// This file is part of avr-bytequeue. +// +// avr-bytequeue is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-bytequeue is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. + +#include "bytequeue.h" +#include "interrupt_setting.h" + +void bytequeue_init(byteQueue_t* queue, uint8_t* dataArray, byteQueueIndex_t arrayLen) { + queue->length = arrayLen; + queue->data = dataArray; + queue->start = queue->end = 0; +} + +bool bytequeue_enqueue(byteQueue_t* queue, uint8_t item) { + interrupt_setting_t setting = store_and_clear_interrupt(); + // full + if (((queue->end + 1) % queue->length) == queue->start) { + restore_interrupt_setting(setting); + return false; + } else { + queue->data[queue->end] = item; + queue->end = (queue->end + 1) % queue->length; + restore_interrupt_setting(setting); + return true; + } +} + +byteQueueIndex_t bytequeue_length(byteQueue_t* queue) { + byteQueueIndex_t len; + interrupt_setting_t setting = store_and_clear_interrupt(); + if (queue->end >= queue->start) + len = queue->end - queue->start; + else + len = (queue->length - queue->start) + queue->end; + restore_interrupt_setting(setting); + return len; +} + +// we don't need to avoid interrupts if there is only one reader +uint8_t bytequeue_get(byteQueue_t* queue, byteQueueIndex_t index) { + return queue->data[(queue->start + index) % queue->length]; +} + +// we just update the start index to remove elements +void bytequeue_remove(byteQueue_t* queue, byteQueueIndex_t numToRemove) { + interrupt_setting_t setting = store_and_clear_interrupt(); + queue->start = (queue->start + numToRemove) % queue->length; + restore_interrupt_setting(setting); +} diff --git a/quantum/midi/bytequeue/bytequeue.h b/quantum/midi/bytequeue/bytequeue.h new file mode 100644 index 0000000000..29d15abbd3 --- /dev/null +++ b/quantum/midi/bytequeue/bytequeue.h @@ -0,0 +1,55 @@ +// this is a single reader [maybe multiple writer?] byte queue +// Copyright 2008 Alex Norman +// writen by Alex Norman +// +// This file is part of avr-bytequeue. +// +// avr-bytequeue is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-bytequeue is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include <inttypes.h> +#include <stdbool.h> + +typedef uint8_t byteQueueIndex_t; + +typedef struct { + byteQueueIndex_t start; + byteQueueIndex_t end; + byteQueueIndex_t length; + uint8_t* data; +} byteQueue_t; + +// you must have a queue, an array of data which the queue will use, and the length of that array +void bytequeue_init(byteQueue_t* queue, uint8_t* dataArray, byteQueueIndex_t arrayLen); + +// add an item to the queue, returns false if the queue is full +bool bytequeue_enqueue(byteQueue_t* queue, uint8_t item); + +// get the length of the queue +byteQueueIndex_t bytequeue_length(byteQueue_t* queue); + +// this grabs data at the index given [starting at queue->start] +uint8_t bytequeue_get(byteQueue_t* queue, byteQueueIndex_t index); + +// update the index in the queue to reflect data that has been dealt with +void bytequeue_remove(byteQueue_t* queue, byteQueueIndex_t numToRemove); + +#ifdef __cplusplus +} +#endif diff --git a/quantum/midi/bytequeue/interrupt_setting.c b/quantum/midi/bytequeue/interrupt_setting.c new file mode 100644 index 0000000000..d9c0035946 --- /dev/null +++ b/quantum/midi/bytequeue/interrupt_setting.c @@ -0,0 +1,47 @@ +// Copyright 20010 Alex Norman +// writen by Alex Norman +// +// This file is part of avr-bytequeue. +// +// avr-bytequeue is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-bytequeue is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. + +// AVR specific code +// should be able to port to other systems by simply providing chip specific +// implementations of the typedef and these functions + +#include "interrupt_setting.h" +#if defined(__AVR__) +# include <avr/interrupt.h> + +interrupt_setting_t store_and_clear_interrupt(void) { + uint8_t sreg = SREG; + cli(); + return sreg; +} + +void restore_interrupt_setting(interrupt_setting_t setting) { + SREG = setting; +} +#elif defined(__arm__) +# include <ch.h> + +interrupt_setting_t store_and_clear_interrupt(void) { + chSysLock(); + return 0; +} + +void restore_interrupt_setting(interrupt_setting_t setting) { + chSysUnlock(); +} +#endif diff --git a/quantum/midi/bytequeue/interrupt_setting.h b/quantum/midi/bytequeue/interrupt_setting.h new file mode 100644 index 0000000000..78294f0765 --- /dev/null +++ b/quantum/midi/bytequeue/interrupt_setting.h @@ -0,0 +1,35 @@ +// Copyright 20010 Alex Norman +// writen by Alex Norman +// +// This file is part of avr-bytequeue. +// +// avr-bytequeue is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-bytequeue is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include <inttypes.h> + +// AVR specific typedef +typedef uint8_t interrupt_setting_t; + +interrupt_setting_t store_and_clear_interrupt(void); +void restore_interrupt_setting(interrupt_setting_t setting); + +#ifdef __cplusplus +} +#endif diff --git a/quantum/midi/midi.c b/quantum/midi/midi.c new file mode 100644 index 0000000000..1ba3e73a40 --- /dev/null +++ b/quantum/midi/midi.c @@ -0,0 +1,247 @@ +// midi for embedded chips, +// Copyright 2010 Alex Norman +// +// This file is part of avr-midi. +// +// avr-midi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-midi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-midi. If not, see <http://www.gnu.org/licenses/>. + +#include "midi.h" +#include <string.h> //for memcpy + +#ifndef MIN +# define MIN(x, y) (((x) < (y)) ? (x) : (y)) +#endif + +#ifndef NULL +# define NULL 0 +#endif + +bool midi_is_statusbyte(uint8_t theByte) { + return (bool)(theByte & MIDI_STATUSMASK); +} + +bool midi_is_realtime(uint8_t theByte) { + return (theByte >= MIDI_CLOCK); +} + +midi_packet_length_t midi_packet_length(uint8_t status) { + switch (status & 0xF0) { + case MIDI_CC: + case MIDI_NOTEON: + case MIDI_NOTEOFF: + case MIDI_AFTERTOUCH: + case MIDI_PITCHBEND: + return THREE; + case MIDI_PROGCHANGE: + case MIDI_CHANPRESSURE: + case MIDI_SONGSELECT: + return TWO; + case 0xF0: + switch (status) { + case MIDI_CLOCK: + case MIDI_TICK: + case MIDI_START: + case MIDI_CONTINUE: + case MIDI_STOP: + case MIDI_ACTIVESENSE: + case MIDI_RESET: + case MIDI_TUNEREQUEST: + return ONE; + case MIDI_SONGPOSITION: + return THREE; + case MIDI_TC_QUARTERFRAME: + case MIDI_SONGSELECT: + return TWO; + case SYSEX_END: + case SYSEX_BEGIN: + default: + return UNDEFINED; + } + default: + return UNDEFINED; + } +} + +void midi_send_cc(MidiDevice* device, uint8_t chan, uint8_t num, uint8_t val) { + // CC Status: 0xB0 to 0xBF where the low nibble is the MIDI channel. + // CC Data: Controller Num, Controller Val + device->send_func(device, 3, MIDI_CC | (chan & MIDI_CHANMASK), num & 0x7F, val & 0x7F); +} + +void midi_send_noteon(MidiDevice* device, uint8_t chan, uint8_t num, uint8_t vel) { + // Note Data: Note Num, Note Velocity + device->send_func(device, 3, MIDI_NOTEON | (chan & MIDI_CHANMASK), num & 0x7F, vel & 0x7F); +} + +void midi_send_noteoff(MidiDevice* device, uint8_t chan, uint8_t num, uint8_t vel) { + // Note Data: Note Num, Note Velocity + device->send_func(device, 3, MIDI_NOTEOFF | (chan & MIDI_CHANMASK), num & 0x7F, vel & 0x7F); +} + +void midi_send_aftertouch(MidiDevice* device, uint8_t chan, uint8_t note_num, uint8_t amt) { + device->send_func(device, 3, MIDI_AFTERTOUCH | (chan & MIDI_CHANMASK), note_num & 0x7F, amt & 0x7F); +} + +// XXX does this work right? +// amt in range -0x2000, 0x1fff +// uAmt should be in range.. +// 0x0000 to 0x3FFF +void midi_send_pitchbend(MidiDevice* device, uint8_t chan, int16_t amt) { + uint16_t uAmt; + // check range + if (amt > 0x1fff) { + uAmt = 0x3FFF; + } else if (amt < -0x2000) { + uAmt = 0; + } else { + uAmt = amt + 0x2000; + } + device->send_func(device, 3, MIDI_PITCHBEND | (chan & MIDI_CHANMASK), uAmt & 0x7F, (uAmt >> 7) & 0x7F); +} + +void midi_send_programchange(MidiDevice* device, uint8_t chan, uint8_t num) { + device->send_func(device, 2, MIDI_PROGCHANGE | (chan & MIDI_CHANMASK), num & 0x7F, 0); +} + +void midi_send_channelpressure(MidiDevice* device, uint8_t chan, uint8_t amt) { + device->send_func(device, 2, MIDI_CHANPRESSURE | (chan & MIDI_CHANMASK), amt & 0x7F, 0); +} + +void midi_send_clock(MidiDevice* device) { + device->send_func(device, 1, MIDI_CLOCK, 0, 0); +} + +void midi_send_tick(MidiDevice* device) { + device->send_func(device, 1, MIDI_TICK, 0, 0); +} + +void midi_send_start(MidiDevice* device) { + device->send_func(device, 1, MIDI_START, 0, 0); +} + +void midi_send_continue(MidiDevice* device) { + device->send_func(device, 1, MIDI_CONTINUE, 0, 0); +} + +void midi_send_stop(MidiDevice* device) { + device->send_func(device, 1, MIDI_STOP, 0, 0); +} + +void midi_send_activesense(MidiDevice* device) { + device->send_func(device, 1, MIDI_ACTIVESENSE, 0, 0); +} + +void midi_send_reset(MidiDevice* device) { + device->send_func(device, 1, MIDI_RESET, 0, 0); +} + +void midi_send_tcquarterframe(MidiDevice* device, uint8_t time) { + device->send_func(device, 2, MIDI_TC_QUARTERFRAME, time & 0x7F, 0); +} + +// XXX is this right? +void midi_send_songposition(MidiDevice* device, uint16_t pos) { + device->send_func(device, 3, MIDI_SONGPOSITION, pos & 0x7F, (pos >> 7) & 0x7F); +} + +void midi_send_songselect(MidiDevice* device, uint8_t song) { + device->send_func(device, 2, MIDI_SONGSELECT, song & 0x7F, 0); +} + +void midi_send_tunerequest(MidiDevice* device) { + device->send_func(device, 1, MIDI_TUNEREQUEST, 0, 0); +} + +void midi_send_byte(MidiDevice* device, uint8_t b) { + device->send_func(device, 1, b, 0, 0); +} + +void midi_send_data(MidiDevice* device, uint16_t count, uint8_t byte0, uint8_t byte1, uint8_t byte2) { + // ensure that the count passed along is always 3 or lower + if (count > 3) { + // TODO how to do this correctly? + } + device->send_func(device, count, byte0, byte1, byte2); +} + +void midi_send_array(MidiDevice* device, uint16_t count, uint8_t* array) { + uint16_t i; + for (i = 0; i < count; i += 3) { + uint8_t b[3] = {0, 0, 0}; + uint16_t to_send = count - i; + to_send = (to_send > 3) ? 3 : to_send; + memcpy(b, array + i, to_send); + midi_send_data(device, to_send, b[0], b[1], b[2]); + } +} + +void midi_register_cc_callback(MidiDevice* device, midi_three_byte_func_t func) { + device->input_cc_callback = func; +} + +void midi_register_noteon_callback(MidiDevice* device, midi_three_byte_func_t func) { + device->input_noteon_callback = func; +} + +void midi_register_noteoff_callback(MidiDevice* device, midi_three_byte_func_t func) { + device->input_noteoff_callback = func; +} + +void midi_register_aftertouch_callback(MidiDevice* device, midi_three_byte_func_t func) { + device->input_aftertouch_callback = func; +} + +void midi_register_pitchbend_callback(MidiDevice* device, midi_three_byte_func_t func) { + device->input_pitchbend_callback = func; +} + +void midi_register_songposition_callback(MidiDevice* device, midi_three_byte_func_t func) { + device->input_songposition_callback = func; +} + +void midi_register_progchange_callback(MidiDevice* device, midi_two_byte_func_t func) { + device->input_progchange_callback = func; +} + +void midi_register_chanpressure_callback(MidiDevice* device, midi_two_byte_func_t func) { + device->input_chanpressure_callback = func; +} + +void midi_register_songselect_callback(MidiDevice* device, midi_two_byte_func_t func) { + device->input_songselect_callback = func; +} + +void midi_register_tc_quarterframe_callback(MidiDevice* device, midi_two_byte_func_t func) { + device->input_tc_quarterframe_callback = func; +} + +void midi_register_realtime_callback(MidiDevice* device, midi_one_byte_func_t func) { + device->input_realtime_callback = func; +} + +void midi_register_tunerequest_callback(MidiDevice* device, midi_one_byte_func_t func) { + device->input_tunerequest_callback = func; +} + +void midi_register_sysex_callback(MidiDevice* device, midi_sysex_func_t func) { + device->input_sysex_callback = func; +} + +void midi_register_fallthrough_callback(MidiDevice* device, midi_var_byte_func_t func) { + device->input_fallthrough_callback = func; +} + +void midi_register_catchall_callback(MidiDevice* device, midi_var_byte_func_t func) { + device->input_catchall_callback = func; +} diff --git a/quantum/midi/midi.h b/quantum/midi/midi.h new file mode 100644 index 0000000000..34547077e4 --- /dev/null +++ b/quantum/midi/midi.h @@ -0,0 +1,487 @@ +// midi for embedded chips, +// Copyright 2010 Alex Norman +// +// This file is part of avr-midi. +// +// avr-midi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-midi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-midi. If not, see <http://www.gnu.org/licenses/>. + +/** + * @file + * @brief The main midi functions + * + * This file includes all of the functions you need to set up and process a + * midi device, send midi, and register midi callbacks. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include "midi_device.h" +#include "midi_function_types.h" + +/** + * @defgroup midi_device_setup_process Device initialization and processing + * @brief These are method that you must use to initialize and run a device + * + * @{ + */ + +/** + * @brief Initialize a device + * + * You must call this before using the device in question. + * + * @param device the device to initialize + */ +void midi_device_init(MidiDevice* device); // [implementation in midi_device.c] + +/** + * @brief Process input data + * + * This method drives the input processing, you must call this method frequently + * if you expect to have your input callbacks called. + * + * @param device the device to process + */ +void midi_device_process(MidiDevice* device); // [implementation in midi_device.c] + +/**@}*/ + +/** + * @defgroup send_functions Midi send functions + * @brief These are the functions you use to send midi data through a device. + * @{ + */ + +/** + * @brief Send a control change message (cc) via the given device. + * + * @param device the device to use for sending + * @param chan the channel to send on, 0-15 + * @param num the cc num + * @param val the value of that cc num + */ +void midi_send_cc(MidiDevice* device, uint8_t chan, uint8_t num, uint8_t val); + +/** + * @brief Send a note on message via the given device. + * + * @param device the device to use for sending + * @param chan the channel to send on, 0-15 + * @param num the note number + * @param vel the note velocity + */ +void midi_send_noteon(MidiDevice* device, uint8_t chan, uint8_t num, uint8_t vel); + +/** + * @brief Send a note off message via the given device. + * + * @param device the device to use for sending + * @param chan the channel to send on, 0-15 + * @param num the note number + * @param vel the note velocity + */ +void midi_send_noteoff(MidiDevice* device, uint8_t chan, uint8_t num, uint8_t vel); + +/** + * @brief Send an after touch message via the given device. + * + * @param device the device to use for sending + * @param chan the channel to send on, 0-15 + * @param note_num the note number + * @param amt the after touch amount + */ +void midi_send_aftertouch(MidiDevice* device, uint8_t chan, uint8_t note_num, uint8_t amt); + +/** + * @brief Send a pitch bend message via the given device. + * + * @param device the device to use for sending + * @param chan the channel to send on, 0-15 + * @param amt the bend amount range: -8192..8191, 0 means no bend + */ +void midi_send_pitchbend(MidiDevice* device, uint8_t chan, int16_t amt); // range -8192, 8191 + +/** + * @brief Send a program change message via the given device. + * + * @param device the device to use for sending + * @param chan the channel to send on, 0-15 + * @param num the program to change to + */ +void midi_send_programchange(MidiDevice* device, uint8_t chan, uint8_t num); + +/** + * @brief Send a channel pressure message via the given device. + * + * @param device the device to use for sending + * @param chan the channel to send on, 0-15 + * @param amt the amount of channel pressure + */ +void midi_send_channelpressure(MidiDevice* device, uint8_t chan, uint8_t amt); + +/** + * @brief Send a clock message via the given device. + * + * @param device the device to use for sending + */ +void midi_send_clock(MidiDevice* device); + +/** + * @brief Send a tick message via the given device. + * + * @param device the device to use for sending + */ +void midi_send_tick(MidiDevice* device); + +/** + * @brief Send a start message via the given device. + * + * @param device the device to use for sending + */ +void midi_send_start(MidiDevice* device); + +/** + * @brief Send a continue message via the given device. + * + * @param device the device to use for sending + */ +void midi_send_continue(MidiDevice* device); + +/** + * @brief Send a stop message via the given device. + * + * @param device the device to use for sending + */ +void midi_send_stop(MidiDevice* device); + +/** + * @brief Send an active sense message via the given device. + * + * @param device the device to use for sending + */ +void midi_send_activesense(MidiDevice* device); + +/** + * @brief Send a reset message via the given device. + * + * @param device the device to use for sending + */ +void midi_send_reset(MidiDevice* device); + +/** + * @brief Send a tc quarter frame message via the given device. + * + * @param device the device to use for sending + * @param time the time of this quarter frame, range 0..16383 + */ +void midi_send_tcquarterframe(MidiDevice* device, uint8_t time); + +/** + * @brief Send a song position message via the given device. + * + * @param device the device to use for sending + * @param pos the song position + */ +void midi_send_songposition(MidiDevice* device, uint16_t pos); + +/** + * @brief Send a song select message via the given device. + * + * @param device the device to use for sending + * @param song the song to select + */ +void midi_send_songselect(MidiDevice* device, uint8_t song); + +/** + * @brief Send a tune request message via the given device. + * + * @param device the device to use for sending + */ +void midi_send_tunerequest(MidiDevice* device); + +/** + * @brief Send a byte via the given device. + * + * This is a generic method for sending data via the given midi device. + * This would be useful for sending sysex data or messages that are not + * implemented in this API, if there are any. Please contact the author + * if you find some so we can add them. + * + * @param device the device to use for sending + * @param b the byte to send + */ +void midi_send_byte(MidiDevice* device, uint8_t b); + +/** + * @brief Send up to 3 bytes of data + * + * % 4 is applied to count so that you can use this to pass sysex through + * + * @param device the device to use for sending + * @param count the count of bytes to send, %4 is applied + * @param byte0 the first byte + * @param byte1 the second byte, ignored if cnt % 4 != 2 + * @param byte2 the third byte, ignored if cnt % 4 != 3 + */ +void midi_send_data(MidiDevice* device, uint16_t count, uint8_t byte0, uint8_t byte1, uint8_t byte2); + +/** + * @brief Send an array of formatted midi data. + * + * Can be used for sysex. + * + * @param device the device to use for sending + * @param count the count of bytes to send + * @param array the array of bytes + */ +void midi_send_array(MidiDevice* device, uint16_t count, uint8_t* array); + +/**@}*/ + +/** + * @defgroup input_callback_reg Input callback registration functions + * + * @brief These are the functions you use to register your input callbacks. + * + * The functions are called when the appropriate midi message is matched on the + * associated device's input. + * + * @{ + */ + +// three byte funcs + +/** + * @brief Register a control change message (cc) callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_cc_callback(MidiDevice* device, midi_three_byte_func_t func); + +/** + * @brief Register a note on callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_noteon_callback(MidiDevice* device, midi_three_byte_func_t func); + +/** + * @brief Register a note off callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_noteoff_callback(MidiDevice* device, midi_three_byte_func_t func); + +/** + * @brief Register an after touch callback. + * + * @param device the device associate with + * @param func the callback function to register + */ + +void midi_register_aftertouch_callback(MidiDevice* device, midi_three_byte_func_t func); + +/** + * @brief Register a pitch bend callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_pitchbend_callback(MidiDevice* device, midi_three_byte_func_t func); + +/** + * @brief Register a song position callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_songposition_callback(MidiDevice* device, midi_three_byte_func_t func); + +// two byte funcs + +/** + * @brief Register a program change callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_progchange_callback(MidiDevice* device, midi_two_byte_func_t func); + +/** + * @brief Register a channel pressure callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_chanpressure_callback(MidiDevice* device, midi_two_byte_func_t func); + +/** + * @brief Register a song select callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_songselect_callback(MidiDevice* device, midi_two_byte_func_t func); + +/** + * @brief Register a tc quarter frame callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_tc_quarterframe_callback(MidiDevice* device, midi_two_byte_func_t func); + +// one byte funcs + +/** + * @brief Register a realtime callback. + * + * The callback will be called for all of the real time message types. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_realtime_callback(MidiDevice* device, midi_one_byte_func_t func); + +/** + * @brief Register a tune request callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_tunerequest_callback(MidiDevice* device, midi_one_byte_func_t func); + +/** + * @brief Register a sysex callback. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_sysex_callback(MidiDevice* device, midi_sysex_func_t func); + +/** + * @brief Register fall through callback. + * + * This is only called if a more specific callback is not matched and called. + * For instance, if you don't register a note on callback but you get a note on message + * the fall through callback will be called, if it is registered. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_fallthrough_callback(MidiDevice* device, midi_var_byte_func_t func); + +/** + * @brief Register a catch all callback. + * + * If registered, the catch all callback is called for every message that is + * matched, even if a more specific or the fallthrough callback is registered. + * + * @param device the device associate with + * @param func the callback function to register + */ +void midi_register_catchall_callback(MidiDevice* device, midi_var_byte_func_t func); + +/**@}*/ + +/** + * @defgroup midi_util Device independent utility functions. + * @{ + */ + +/** + * \enum midi_packet_length_t + * + * An enumeration of the possible packet length values. + */ +typedef enum { UNDEFINED = 0, ONE = 1, TWO = 2, THREE = 3 } midi_packet_length_t; + +/** + * @brief Test to see if the byte given is a status byte + * @param theByte the byte to test + * @return true if the byte given is a midi status byte + */ +bool midi_is_statusbyte(uint8_t theByte); + +/** + * @brief Test to see if the byte given is a realtime message + * @param theByte the byte to test + * @return true if it is a realtime message, false otherwise + */ +bool midi_is_realtime(uint8_t theByte); + +/** + * @brief Find the length of the packet associated with the status byte given + * @param status the status byte + * @return the length of the packet, will return UNDEFINED if the byte is not + * a status byte or if it is a sysex status byte + */ +midi_packet_length_t midi_packet_length(uint8_t status); + +/**@}*/ + +/** + * @defgroup defines Midi status and miscellaneous utility #defines + * + * @{ + */ + +#define SYSEX_BEGIN 0xF0 +#define SYSEX_END 0xF7 + +// if you and this with a byte and you get anything non-zero +// it is a status message +#define MIDI_STATUSMASK 0x80 +// if you and this with a status message that contains channel info, +// you'll get the channel +#define MIDI_CHANMASK 0x0F + +#define MIDI_CC 0xB0 +#define MIDI_NOTEON 0x90 +#define MIDI_NOTEOFF 0x80 +#define MIDI_AFTERTOUCH 0xA0 +#define MIDI_PITCHBEND 0xE0 +#define MIDI_PROGCHANGE 0xC0 +#define MIDI_CHANPRESSURE 0xD0 + +// midi realtime +#define MIDI_CLOCK 0xF8 +#define MIDI_TICK 0xF9 +#define MIDI_START 0xFA +#define MIDI_CONTINUE 0xFB +#define MIDI_STOP 0xFC +#define MIDI_ACTIVESENSE 0xFE +#define MIDI_RESET 0xFF + +#define MIDI_TC_QUARTERFRAME 0xF1 +#define MIDI_SONGPOSITION 0xF2 +#define MIDI_SONGSELECT 0xF3 +#define MIDI_TUNEREQUEST 0xF6 + +// This ID is for educational or development use only +#define SYSEX_EDUMANUFID 0x7D + +/**@}*/ + +#ifdef __cplusplus +} +#endif diff --git a/quantum/midi/midi_device.c b/quantum/midi/midi_device.c new file mode 100644 index 0000000000..77c010b156 --- /dev/null +++ b/quantum/midi/midi_device.c @@ -0,0 +1,277 @@ +// midi for embedded chips, +// Copyright 2010 Alex Norman +// +// This file is part of avr-midi. +// +// avr-midi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-midi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-midi. If not, see <http://www.gnu.org/licenses/>. + +#include "midi_device.h" +#include "midi.h" + +#ifndef NULL +# define NULL 0 +#endif + +// forward declarations, internally used to call the callbacks +void midi_input_callbacks(MidiDevice* device, uint16_t cnt, uint8_t byte0, uint8_t byte1, uint8_t byte2); +void midi_process_byte(MidiDevice* device, uint8_t input); + +void midi_device_init(MidiDevice* device) { + device->input_state = IDLE; + device->input_count = 0; + bytequeue_init(&device->input_queue, device->input_queue_data, MIDI_INPUT_QUEUE_LENGTH); + + // three byte funcs + device->input_cc_callback = NULL; + device->input_noteon_callback = NULL; + device->input_noteoff_callback = NULL; + device->input_aftertouch_callback = NULL; + device->input_pitchbend_callback = NULL; + device->input_songposition_callback = NULL; + + // two byte funcs + device->input_progchange_callback = NULL; + device->input_chanpressure_callback = NULL; + device->input_songselect_callback = NULL; + device->input_tc_quarterframe_callback = NULL; + + // one byte funcs + device->input_realtime_callback = NULL; + device->input_tunerequest_callback = NULL; + + // var byte functions + device->input_sysex_callback = NULL; + device->input_fallthrough_callback = NULL; + device->input_catchall_callback = NULL; + + device->pre_input_process_callback = NULL; +} + +void midi_device_input(MidiDevice* device, uint8_t cnt, uint8_t* input) { + uint8_t i; + for (i = 0; i < cnt; i++) + bytequeue_enqueue(&device->input_queue, input[i]); +} + +void midi_device_set_send_func(MidiDevice* device, midi_var_byte_func_t send_func) { + device->send_func = send_func; +} + +void midi_device_set_pre_input_process_func(MidiDevice* device, midi_no_byte_func_t pre_process_func) { + device->pre_input_process_callback = pre_process_func; +} + +void midi_device_process(MidiDevice* device) { + // call the pre_input_process_callback if there is one + if (device->pre_input_process_callback) device->pre_input_process_callback(device); + + // pull stuff off the queue and process + byteQueueIndex_t len = bytequeue_length(&device->input_queue); + uint16_t i; + // TODO limit number of bytes processed? + for (i = 0; i < len; i++) { + uint8_t val = bytequeue_get(&device->input_queue, 0); + midi_process_byte(device, val); + bytequeue_remove(&device->input_queue, 1); + } +} + +void midi_process_byte(MidiDevice* device, uint8_t input) { + if (midi_is_realtime(input)) { + // call callback, store and restore state + input_state_t state = device->input_state; + device->input_state = ONE_BYTE_MESSAGE; + midi_input_callbacks(device, 1, input, 0, 0); + device->input_state = state; + } else if (midi_is_statusbyte(input)) { + // store the byte + if (device->input_state != SYSEX_MESSAGE) { + device->input_buffer[0] = input; + device->input_count = 1; + } + switch (midi_packet_length(input)) { + case ONE: + device->input_state = ONE_BYTE_MESSAGE; + ; + midi_input_callbacks(device, 1, input, 0, 0); + device->input_state = IDLE; + break; + case TWO: + device->input_state = TWO_BYTE_MESSAGE; + break; + case THREE: + device->input_state = THREE_BYTE_MESSAGE; + break; + case UNDEFINED: + switch (input) { + case SYSEX_BEGIN: + device->input_state = SYSEX_MESSAGE; + device->input_buffer[0] = input; + device->input_count = 1; + break; + case SYSEX_END: + // send what is left in the input buffer, set idle + device->input_buffer[device->input_count % 3] = input; + device->input_count += 1; + // call the callback + midi_input_callbacks(device, device->input_count, device->input_buffer[0], device->input_buffer[1], device->input_buffer[2]); + device->input_state = IDLE; + break; + default: + device->input_state = IDLE; + device->input_count = 0; + } + + break; + default: + device->input_state = IDLE; + device->input_count = 0; + break; + } + } else { + if (device->input_state != IDLE) { + // store the byte + device->input_buffer[device->input_count % 3] = input; + // increment count + uint16_t prev = device->input_count; + device->input_count += 1; + + switch (prev % 3) { + case 2: + // call callback + midi_input_callbacks(device, device->input_count, device->input_buffer[0], device->input_buffer[1], device->input_buffer[2]); + if (device->input_state != SYSEX_MESSAGE) { + // set to 1, keeping status byte, allowing for running status + device->input_count = 1; + } + break; + case 1: + if (device->input_state == TWO_BYTE_MESSAGE) { + // call callback + midi_input_callbacks(device, device->input_count, device->input_buffer[0], device->input_buffer[1], 0); + if (device->input_state != SYSEX_MESSAGE) { + // set to 1, keeping status byte, allowing for running status + device->input_count = 1; + } + } + break; + case 0: + default: + // one byte messages are dealt with directly + break; + } + } + } +} + +void midi_input_callbacks(MidiDevice* device, uint16_t cnt, uint8_t byte0, uint8_t byte1, uint8_t byte2) { + // did we end up calling a callback? + bool called = false; + if (device->input_state == SYSEX_MESSAGE) { + if (device->input_sysex_callback) { + const uint16_t start = ((cnt - 1) / 3) * 3; + const uint8_t length = (cnt - start); + uint8_t data[3]; + data[0] = byte0; + data[1] = byte1; + data[2] = byte2; + device->input_sysex_callback(device, start, length, data); + called = true; + } + } else { + switch (cnt) { + case 3: { + midi_three_byte_func_t func = NULL; + switch (byte0 & 0xF0) { + case MIDI_CC: + func = device->input_cc_callback; + break; + case MIDI_NOTEON: + func = device->input_noteon_callback; + break; + case MIDI_NOTEOFF: + func = device->input_noteoff_callback; + break; + case MIDI_AFTERTOUCH: + func = device->input_aftertouch_callback; + break; + case MIDI_PITCHBEND: + func = device->input_pitchbend_callback; + break; + case 0xF0: + if (byte0 == MIDI_SONGPOSITION) func = device->input_songposition_callback; + break; + default: + break; + } + if (func) { + // mask off the channel for non song position functions + if (byte0 == MIDI_SONGPOSITION) + func(device, byte0, byte1, byte2); + else + func(device, byte0 & 0x0F, byte1, byte2); + called = true; + } + } break; + case 2: { + midi_two_byte_func_t func = NULL; + switch (byte0 & 0xF0) { + case MIDI_PROGCHANGE: + func = device->input_progchange_callback; + break; + case MIDI_CHANPRESSURE: + func = device->input_chanpressure_callback; + break; + case 0xF0: + if (byte0 == MIDI_SONGSELECT) + func = device->input_songselect_callback; + else if (byte0 == MIDI_TC_QUARTERFRAME) + func = device->input_tc_quarterframe_callback; + break; + default: + break; + } + if (func) { + // mask off the channel + if (byte0 == MIDI_SONGSELECT || byte0 == MIDI_TC_QUARTERFRAME) + func(device, byte0, byte1); + else + func(device, byte0 & 0x0F, byte1); + called = true; + } + } break; + case 1: { + midi_one_byte_func_t func = NULL; + if (midi_is_realtime(byte0)) + func = device->input_realtime_callback; + else if (byte0 == MIDI_TUNEREQUEST) + func = device->input_tunerequest_callback; + if (func) { + func(device, byte0); + called = true; + } + } break; + default: + // just in case + if (cnt > 3) cnt = 0; + break; + } + } + + // if there is fallthrough default callback and we haven't called a more specific one, + // call the fallthrough + if (!called && device->input_fallthrough_callback) device->input_fallthrough_callback(device, cnt, byte0, byte1, byte2); + // always call the catch all if it exists + if (device->input_catchall_callback) device->input_catchall_callback(device, cnt, byte0, byte1, byte2); +} diff --git a/quantum/midi/midi_device.h b/quantum/midi/midi_device.h new file mode 100644 index 0000000000..79e8f7a936 --- /dev/null +++ b/quantum/midi/midi_device.h @@ -0,0 +1,148 @@ +// midi for embedded chips, +// Copyright 2010 Alex Norman +// +// This file is part of avr-midi. +// +// avr-midi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-midi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-midi. If not, see <http://www.gnu.org/licenses/>. + +/** + * @file + * @brief Device implementation functions + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup midi_device Functions used when implementing your own midi device. + * + * You use the functions when you are implementing your own midi device. + * + * You set a send function to actually send bytes via your device, this method + * is called when you call a send function with this device, for instance + * midi_send_cc + * + * You use the midi_device_input to process input data from the device and pass + * it through the device's associated callbacks. + * + * You use the midi_device_set_pre_input_process_func if you want to have a + * function called at the beginning of the device's process function, generally + * to poll for input and pass that into midi_device_input + * + * @{ + */ + +#include "midi_function_types.h" +#include "bytequeue/bytequeue.h" +#define MIDI_INPUT_QUEUE_LENGTH 192 + +typedef enum { IDLE, ONE_BYTE_MESSAGE = 1, TWO_BYTE_MESSAGE = 2, THREE_BYTE_MESSAGE = 3, SYSEX_MESSAGE } input_state_t; + +typedef void (*midi_no_byte_func_t)(MidiDevice* device); + +/** + * \struct _midi_device + * + * @brief This structure represents the input and output functions and + * processing data for a midi device. + * + * A device can represent an actual physical device [serial port, usb port] or + * something virtual. + * You should not need to modify this structure directly. + */ +struct _midi_device { + // output send function + midi_var_byte_func_t send_func; + + //********input callbacks + // three byte funcs + midi_three_byte_func_t input_cc_callback; + midi_three_byte_func_t input_noteon_callback; + midi_three_byte_func_t input_noteoff_callback; + midi_three_byte_func_t input_aftertouch_callback; + midi_three_byte_func_t input_pitchbend_callback; + midi_three_byte_func_t input_songposition_callback; + // two byte funcs + midi_two_byte_func_t input_progchange_callback; + midi_two_byte_func_t input_chanpressure_callback; + midi_two_byte_func_t input_songselect_callback; + midi_two_byte_func_t input_tc_quarterframe_callback; + // one byte funcs + midi_one_byte_func_t input_realtime_callback; + midi_one_byte_func_t input_tunerequest_callback; + + // sysex + midi_sysex_func_t input_sysex_callback; + + // only called if more specific callback is not matched + midi_var_byte_func_t input_fallthrough_callback; + // called if registered, independent of other callbacks + midi_var_byte_func_t input_catchall_callback; + + // pre input processing function + midi_no_byte_func_t pre_input_process_callback; + + // for internal input processing + uint8_t input_buffer[3]; + input_state_t input_state; + uint16_t input_count; + + // for queueing data between the input and the processing functions + uint8_t input_queue_data[MIDI_INPUT_QUEUE_LENGTH]; + byteQueue_t input_queue; +}; + +/** + * @brief Process input bytes. This function parses bytes and calls the + * appropriate callbacks associated with the given device. You use this + * function if you are creating a custom device and you want to have midi + * input. + * + * @param device the midi device to associate the input with + * @param cnt the number of bytes you are processing + * @param input the bytes to process + */ +void midi_device_input(MidiDevice* device, uint8_t cnt, uint8_t* input); + +/** + * @brief Set the callback function that will be used for sending output + * data bytes. This is only used if you're creating a custom device. + * You'll most likely want the callback function to disable interrupts so + * that you can call the various midi send functions without worrying about + * locking. + * + * \param device the midi device to associate this callback with + * \param send_func the callback function that will do the sending + */ +void midi_device_set_send_func(MidiDevice* device, midi_var_byte_func_t send_func); + +/** + * @brief Set a callback which is called at the beginning of the + * midi_device_process call. This can be used to poll for input + * data and send the data through the midi_device_input function. + * You'll probably only use this if you're creating a custom device. + * + * \param device the midi device to associate this callback with + * \param midi_no_byte_func_t the actual callback function + */ +void midi_device_set_pre_input_process_func(MidiDevice* device, midi_no_byte_func_t pre_process_func); + +/**@}*/ + +#ifdef __cplusplus +} +#endif diff --git a/quantum/midi/midi_function_types.h b/quantum/midi/midi_function_types.h new file mode 100644 index 0000000000..6f98a72981 --- /dev/null +++ b/quantum/midi/midi_function_types.h @@ -0,0 +1,47 @@ +// midi for embedded chips, +// Copyright 2010 Alex Norman +// +// This file is part of avr-midi. +// +// avr-midi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-midi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-midi. If not, see <http://www.gnu.org/licenses/>. + +/** + * @file + * @brief Function signature definitions + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include <inttypes.h> +#include <stdbool.h> + +// forward declaration +typedef struct _midi_device MidiDevice; + +typedef void (*midi_one_byte_func_t)(MidiDevice *device, uint8_t byte); +typedef void (*midi_two_byte_func_t)(MidiDevice *device, uint8_t byte0, uint8_t byte1); +typedef void (*midi_three_byte_func_t)(MidiDevice *device, uint8_t byte0, uint8_t byte1, uint8_t byte2); +// all bytes after count bytes should be ignored +typedef void (*midi_var_byte_func_t)(MidiDevice *device, uint16_t count, uint8_t byte0, uint8_t byte1, uint8_t byte2); + +// the start byte tells you how far into the sysex message you are, the data_length tells you how many bytes data is +typedef void (*midi_sysex_func_t)(MidiDevice *device, uint16_t start_byte, uint8_t data_length, uint8_t *data); + +#ifdef __cplusplus +} +#endif diff --git a/quantum/midi/qmk_midi.c b/quantum/midi/qmk_midi.c new file mode 100644 index 0000000000..f6a5d92281 --- /dev/null +++ b/quantum/midi/qmk_midi.c @@ -0,0 +1,135 @@ +#include <LUFA/Drivers/USB/USB.h> +#include "qmk_midi.h" +#include "sysex_tools.h" +#include "midi.h" +#include "usb_descriptor.h" +#include "process_midi.h" + +/******************************************************************************* + * MIDI + ******************************************************************************/ + +MidiDevice midi_device; + +#define SYSEX_START_OR_CONT 0x40 +#define SYSEX_ENDS_IN_1 0x50 +#define SYSEX_ENDS_IN_2 0x60 +#define SYSEX_ENDS_IN_3 0x70 + +#define SYS_COMMON_1 0x50 +#define SYS_COMMON_2 0x20 +#define SYS_COMMON_3 0x30 + +static void usb_send_func(MidiDevice* device, uint16_t cnt, uint8_t byte0, uint8_t byte1, uint8_t byte2) { + MIDI_EventPacket_t event; + event.Data1 = byte0; + event.Data2 = byte1; + event.Data3 = byte2; + + uint8_t cable = 0; + + // if the length is undefined we assume it is a SYSEX message + if (midi_packet_length(byte0) == UNDEFINED) { + switch (cnt) { + case 3: + if (byte2 == SYSEX_END) + event.Event = MIDI_EVENT(cable, SYSEX_ENDS_IN_3); + else + event.Event = MIDI_EVENT(cable, SYSEX_START_OR_CONT); + break; + case 2: + if (byte1 == SYSEX_END) + event.Event = MIDI_EVENT(cable, SYSEX_ENDS_IN_2); + else + event.Event = MIDI_EVENT(cable, SYSEX_START_OR_CONT); + break; + case 1: + if (byte0 == SYSEX_END) + event.Event = MIDI_EVENT(cable, SYSEX_ENDS_IN_1); + else + event.Event = MIDI_EVENT(cable, SYSEX_START_OR_CONT); + break; + default: + return; // invalid cnt + } + } else { + // deal with 'system common' messages + // TODO are there any more? + switch (byte0 & 0xF0) { + case MIDI_SONGPOSITION: + event.Event = MIDI_EVENT(cable, SYS_COMMON_3); + break; + case MIDI_SONGSELECT: + case MIDI_TC_QUARTERFRAME: + event.Event = MIDI_EVENT(cable, SYS_COMMON_2); + break; + default: + event.Event = MIDI_EVENT(cable, byte0); + break; + } + } + + send_midi_packet(&event); +} + +static void usb_get_midi(MidiDevice* device) { + MIDI_EventPacket_t event; + while (recv_midi_packet(&event)) { + midi_packet_length_t length = midi_packet_length(event.Data1); + uint8_t input[3]; + input[0] = event.Data1; + input[1] = event.Data2; + input[2] = event.Data3; + if (length == UNDEFINED) { + // sysex + if (event.Event == MIDI_EVENT(0, SYSEX_START_OR_CONT) || event.Event == MIDI_EVENT(0, SYSEX_ENDS_IN_3)) { + length = 3; + } else if (event.Event == MIDI_EVENT(0, SYSEX_ENDS_IN_2)) { + length = 2; + } else if (event.Event == MIDI_EVENT(0, SYSEX_ENDS_IN_1)) { + length = 1; + } else { + // XXX what to do? + } + } + + // pass the data to the device input function + if (length != UNDEFINED) midi_device_input(device, length, input); + } +} + +static void fallthrough_callback(MidiDevice* device, uint16_t cnt, uint8_t byte0, uint8_t byte1, uint8_t byte2) { +#ifdef AUDIO_ENABLE + if (cnt == 3) { + switch (byte0 & 0xF0) { + case MIDI_NOTEON: + play_note(((double)261.6) * pow(2.0, -4.0) * pow(2.0, (byte1 & 0x7F) / 12.0), (byte2 & 0x7F) / 8); + break; + case MIDI_NOTEOFF: + stop_note(((double)261.6) * pow(2.0, -4.0) * pow(2.0, (byte1 & 0x7F) / 12.0)); + break; + } + } + if (byte0 == MIDI_STOP) { + stop_all_notes(); + } +#endif +} + +static void cc_callback(MidiDevice* device, uint8_t chan, uint8_t num, uint8_t val) { + // sending it back on the next channel + // midi_send_cc(device, (chan + 1) % 16, num, val); +} + +void midi_init(void); + +void setup_midi(void) { +#ifdef MIDI_ADVANCED + midi_init(); +#endif + midi_device_init(&midi_device); + midi_device_set_send_func(&midi_device, usb_send_func); + midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); + midi_register_fallthrough_callback(&midi_device, fallthrough_callback); + midi_register_cc_callback(&midi_device, cc_callback); +} diff --git a/quantum/midi/qmk_midi.h b/quantum/midi/qmk_midi.h new file mode 100644 index 0000000000..819087a405 --- /dev/null +++ b/quantum/midi/qmk_midi.h @@ -0,0 +1,10 @@ +#pragma once + +#ifdef MIDI_ENABLE +# include "midi.h" +# include <LUFA/Drivers/USB/USB.h> +extern MidiDevice midi_device; +void setup_midi(void); +void send_midi_packet(MIDI_EventPacket_t* event); +bool recv_midi_packet(MIDI_EventPacket_t* const event); +#endif diff --git a/quantum/midi/sysex_tools.c b/quantum/midi/sysex_tools.c new file mode 100644 index 0000000000..c9a9d03285 --- /dev/null +++ b/quantum/midi/sysex_tools.c @@ -0,0 +1,97 @@ +// midi for embedded chips, +// Copyright 2010 Alex Norman +// +// This file is part of avr-midi. +// +// avr-midi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-midi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-midi. If not, see <http://www.gnu.org/licenses/>. + +#include "sysex_tools.h" + +uint16_t sysex_encoded_length(uint16_t decoded_length) { + uint8_t remainder = decoded_length % 7; + if (remainder) + return (decoded_length / 7) * 8 + remainder + 1; + else + return (decoded_length / 7) * 8; +} + +uint16_t sysex_decoded_length(uint16_t encoded_length) { + uint8_t remainder = encoded_length % 8; + if (remainder) + return (encoded_length / 8) * 7 + remainder - 1; + else + return (encoded_length / 8) * 7; +} + +uint16_t sysex_encode(uint8_t *encoded, const uint8_t *source, const uint16_t length) { + uint16_t encoded_full = length / 7; // number of full 8 byte sections from 7 bytes of input + uint16_t i, j; + + // fill out the fully encoded sections + for (i = 0; i < encoded_full; i++) { + uint16_t encoded_msb_idx = i * 8; + uint16_t input_start_idx = i * 7; + encoded[encoded_msb_idx] = 0; + for (j = 0; j < 7; j++) { + uint8_t current = source[input_start_idx + j]; + encoded[encoded_msb_idx] |= (0x80 & current) >> (1 + j); + encoded[encoded_msb_idx + 1 + j] = 0x7F & current; + } + } + + // fill out the rest if there is any more + uint8_t remainder = length % 7; + if (remainder) { + uint16_t encoded_msb_idx = encoded_full * 8; + uint16_t input_start_idx = encoded_full * 7; + encoded[encoded_msb_idx] = 0; + for (j = 0; j < remainder; j++) { + uint8_t current = source[input_start_idx + j]; + encoded[encoded_msb_idx] |= (0x80 & current) >> (1 + j); + encoded[encoded_msb_idx + 1 + j] = 0x7F & current; + } + return encoded_msb_idx + remainder + 1; + } else { + return encoded_full * 8; + } +} + +uint16_t sysex_decode(uint8_t *decoded, const uint8_t *source, const uint16_t length) { + uint16_t decoded_full = length / 8; + uint16_t i, j; + + if (length < 2) return 0; + + // fill out the fully encoded sections + for (i = 0; i < decoded_full; i++) { + uint16_t encoded_msb_idx = i * 8; + uint16_t output_start_index = i * 7; + for (j = 0; j < 7; j++) { + decoded[output_start_index + j] = 0x7F & source[encoded_msb_idx + j + 1]; + decoded[output_start_index + j] |= (0x80 & (source[encoded_msb_idx] << (1 + j))); + } + } + uint8_t remainder = length % 8; + if (remainder) { + uint16_t encoded_msb_idx = decoded_full * 8; + uint16_t output_start_index = decoded_full * 7; + for (j = 0; j < (remainder - 1); j++) { + decoded[output_start_index + j] = 0x7F & source[encoded_msb_idx + j + 1]; + decoded[output_start_index + j] |= (0x80 & (source[encoded_msb_idx] << (1 + j))); + } + return decoded_full * 7 + remainder - 1; + } else { + return decoded_full * 7; + } +} diff --git a/quantum/midi/sysex_tools.h b/quantum/midi/sysex_tools.h new file mode 100644 index 0000000000..7d7f10d24e --- /dev/null +++ b/quantum/midi/sysex_tools.h @@ -0,0 +1,92 @@ +// midi for embedded chips, +// Copyright 2010 Alex Norman +// +// This file is part of avr-midi. +// +// avr-midi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +// avr-midi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with avr-midi. If not, see <http://www.gnu.org/licenses/>. + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include <inttypes.h> + +/** + * @file + * @brief Sysex utility functions + * + * These functions are for converting data to and from a "midi-safe" format, + * which can be use to send data with sysex messages. Sysex messages may only + * contain data where the to bit is not set. + * + * An "encoded" midi message is one that contains all of the data from its + * original state, but does not have any of the top bits set. + * + * Every 7 bytes of decoded data is converted into 8 bytes of encoded data and + * visa-versa. If you'd like to operate on small segments, make sure that you + * encode in 7 byte increments and decode in 8 byte increments. + * + */ + +/** @defgroup sysex_tools Sysex utility functions + * @{ + */ + +/** + * @brief Compute the length of a message after it is encoded. + * + * @param decoded_length The length, in bytes, of the message to encode. + * + * @return The length, in bytes, of the message after encodeing. + */ +uint16_t sysex_encoded_length(uint16_t decoded_length); + +/** + * @brief Compute the length of a message after it is decoded. + * + * @param encoded_length The length, in bytes, of the encoded message. + * + * @return The length, in bytes, of the message after it is decoded. + */ +uint16_t sysex_decoded_length(uint16_t encoded_length); + +/** + * @brief Encode data so that it can be transmitted safely in a sysex message. + * + * @param encoded The output data buffer, must be at least sysex_encoded_length(length) bytes long. + * @param source The input buffer of data to be encoded. + * @param length The number of bytes from the input buffer to encode. + * + * @return number of bytes encoded. + */ +uint16_t sysex_encode(uint8_t *encoded, const uint8_t *source, uint16_t length); + +/** + * @brief Decode encoded data. + * + * @param decoded The output data buffer, must be at least sysex_decoded_length(length) bytes long. + * @param source The input buffer of data to be decoded. + * @param length The number of bytes from the input buffer to decode. + * + * @return number of bytes decoded. + */ +uint16_t sysex_decode(uint8_t *decoded, const uint8_t *source, uint16_t length); + +/**@}*/ + +#ifdef __cplusplus +} +#endif diff --git a/quantum/mousekey.c b/quantum/mousekey.c index 703fb39fa6..df8aa613be 100644 --- a/quantum/mousekey.c +++ b/quantum/mousekey.c @@ -24,7 +24,7 @@ #include "debug.h" #include "mousekey.h" -inline int8_t times_inv_sqrt2(int8_t x) { +static inline int8_t times_inv_sqrt2(int8_t x) { // 181/256 is pretty close to 1/sqrt(2) // 0.70703125 0.707106781 // 1 too small for x=99 and x=198 diff --git a/quantum/os_detection.c b/quantum/os_detection.c new file mode 100644 index 0000000000..b1511afb14 --- /dev/null +++ b/quantum/os_detection.c @@ -0,0 +1,129 @@ +/* Copyright 2022 Ruslan Sayfutdinov (@KapJI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "os_detection.h" + +#include <string.h> + +#ifdef OS_DETECTION_DEBUG_ENABLE +# include "eeconfig.h" +# include "eeprom.h" +# include "print.h" + +# define STORED_USB_SETUPS 50 +# define EEPROM_USER_OFFSET (uint8_t*)EECONFIG_SIZE + +uint16_t usb_setups[STORED_USB_SETUPS]; +#endif + +#ifdef OS_DETECTION_ENABLE +struct setups_data_t { + uint8_t count; + uint8_t cnt_02; + uint8_t cnt_04; + uint8_t cnt_ff; + uint16_t last_wlength; + os_variant_t detected_os; +}; + +struct setups_data_t setups_data = { + .count = 0, + .cnt_02 = 0, + .cnt_04 = 0, + .cnt_ff = 0, + .detected_os = OS_UNSURE, +}; + +// Some collected sequences of wLength can be found in tests. +void make_guess(void) { + if (setups_data.count < 3) { + return; + } + if (setups_data.cnt_ff >= 2 && setups_data.cnt_04 >= 1) { + setups_data.detected_os = OS_WINDOWS; + return; + } + if (setups_data.count == setups_data.cnt_ff) { + // Linux has 3 packets with 0xFF. + setups_data.detected_os = OS_LINUX; + return; + } + if (setups_data.count == 5 && setups_data.last_wlength == 0xFF && setups_data.cnt_ff == 1 && setups_data.cnt_02 == 2) { + setups_data.detected_os = OS_MACOS; + return; + } + if (setups_data.count == 4 && setups_data.cnt_ff == 0 && setups_data.cnt_02 == 2) { + // iOS and iPadOS don't have the last 0xFF packet. + setups_data.detected_os = OS_IOS; + return; + } + if (setups_data.cnt_ff == 0 && setups_data.cnt_02 == 3 && setups_data.cnt_04 == 1) { + // This is actually PS5. + setups_data.detected_os = OS_LINUX; + return; + } + if (setups_data.cnt_ff >= 1 && setups_data.cnt_02 == 0 && setups_data.cnt_04 == 0) { + // This is actually Quest 2 or Nintendo Switch. + setups_data.detected_os = OS_LINUX; + return; + } +} + +void process_wlength(const uint16_t w_length) { +# ifdef OS_DETECTION_DEBUG_ENABLE + usb_setups[setups_data.count] = w_length; +# endif + setups_data.count++; + setups_data.last_wlength = w_length; + if (w_length == 0x2) { + setups_data.cnt_02++; + } else if (w_length == 0x4) { + setups_data.cnt_04++; + } else if (w_length == 0xFF) { + setups_data.cnt_ff++; + } + make_guess(); +} + +os_variant_t detected_host_os(void) { + return setups_data.detected_os; +} + +void erase_wlength_data(void) { + memset(&setups_data, 0, sizeof(setups_data)); +} +#endif // OS_DETECTION_ENABLE + +#ifdef OS_DETECTION_DEBUG_ENABLE +void print_stored_setups(void) { +# ifdef CONSOLE_ENABLE + uint8_t cnt = eeprom_read_byte(EEPROM_USER_OFFSET); + for (uint16_t i = 0; i < cnt; ++i) { + uint16_t* addr = (uint16_t*)EEPROM_USER_OFFSET + i * sizeof(uint16_t) + sizeof(uint8_t); + xprintf("i: %d, wLength: 0x%02X\n", i, eeprom_read_word(addr)); + } +# endif +} + +void store_setups_in_eeprom(void) { + eeprom_update_byte(EEPROM_USER_OFFSET, setups_data.count); + for (uint16_t i = 0; i < setups_data.count; ++i) { + uint16_t* addr = (uint16_t*)EEPROM_USER_OFFSET + i * sizeof(uint16_t) + sizeof(uint8_t); + eeprom_update_word(addr, usb_setups[i]); + } +} + +#endif // OS_DETECTION_DEBUG_ENABLE diff --git a/quantum/os_detection.h b/quantum/os_detection.h new file mode 100644 index 0000000000..e643dcd27f --- /dev/null +++ b/quantum/os_detection.h @@ -0,0 +1,38 @@ +/* Copyright 2022 Ruslan Sayfutdinov (@KapJI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include <stdint.h> + +#ifdef OS_DETECTION_ENABLE +typedef enum { + OS_UNSURE, + OS_LINUX, + OS_WINDOWS, + OS_MACOS, + OS_IOS, +} os_variant_t; + +void process_wlength(const uint16_t w_length); +os_variant_t detected_host_os(void); +void erase_wlength_data(void); +#endif + +#ifdef OS_DETECTION_DEBUG_ENABLE +void print_stored_setups(void); +void store_setups_in_eeprom(void); +#endif diff --git a/quantum/os_detection/tests/os_detection.cpp b/quantum/os_detection/tests/os_detection.cpp new file mode 100644 index 0000000000..102349852e --- /dev/null +++ b/quantum/os_detection/tests/os_detection.cpp @@ -0,0 +1,164 @@ +/* Copyright 2022 Ruslan Sayfutdinov (@KapJI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "gtest/gtest.h" + +extern "C" { +#include "os_detection.h" +} + +class OsDetectionTest : public ::testing::Test { + protected: + void SetUp() override { + erase_wlength_data(); + } +}; + +os_variant_t check_sequence(const std::vector<uint16_t> &w_lengths) { + for (auto &w_length : w_lengths) { + process_wlength(w_length); + } + return detected_host_os(); +} + +/* Some collected data. + +ChibiOS: +Windows 10: [FF, FF, 4, 24, 4, 24, 4, FF, 24, FF, 4, FF, 24, 4, 24, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A, 20A] +Windows 10 (another host): [FF, FF, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24] +macOS 12.5: [2, 24, 2, 28, FF] +iOS/iPadOS 15.6: [2, 24, 2, 28] +Linux (including Android, Raspberry Pi and WebOS TV): [FF, FF, FF] +PS5: [2, 4, 2, 28, 2, 24] +Nintendo Switch: [82, FF, 40, 40, FF, 40, 40, FF, 40, 40, FF, 40, 40, FF, 40, 40] +Quest 2: [FF, FF, FF, FE, FF, FE, FF, FE, FF, FE, FF] + +LUFA: +Windows 10 (first connect): [12, FF, FF, 4, 10, FF, FF, FF, 4, 10, 20A, 20A, 20A, 20A, 20A, 20A] +Windows 10 (subsequent connect): [FF, FF, 4, 10, FF, 4, FF, 10, FF, 20A, 20A, 20A, 20A, 20A, 20A] +Windows 10 (another host): [FF, FF, 4, 10, 4, 10] +macOS: [2, 10, 2, E, FF] +iOS/iPadOS: [2, 10, 2, E] +Linux: [FF, FF, FF] +PS5: [2, 4, 2, E, 2, 10] +Nintendo Switch: [82, FF, 40, 40, FF, 40, 40] + +V-USB: +Windows 10: [FF, FF, 4, E, FF] +Windows 10 (another host): [FF, FF, 4, E, 4] +macOS: [2, E, 2, E, FF] +iOS/iPadOS: [2, E, 2, E] +Linux: [FF, FF, FF] +PS5: [2, 4, 2, E, 2] +Nintendo Switch: [82, FF, 40, 40] +Quest 2: [FF, FF, FF, FE] + +Common parts: +Windows: [..., FF, FF, 4, ...] +macOS: [2, _, 2, _, FF] +iOS/iPadOS: [2, _, 2, _] +Linux: [FF, FF, FF] +PS5: [2, 4, 2, _, 2, ...] +Nintendo Switch: [82, FF, 40, 40, ...] +Quest 2: [FF, FF, FF, FE, ...] +*/ +TEST_F(OsDetectionTest, TestLinux) { + EXPECT_EQ(check_sequence({0xFF, 0xFF, 0xFF}), OS_LINUX); +} + +TEST_F(OsDetectionTest, TestChibiosMacos) { + EXPECT_EQ(check_sequence({0x2, 0x24, 0x2, 0x28, 0xFF}), OS_MACOS); +} + +TEST_F(OsDetectionTest, TestLufaMacos) { + EXPECT_EQ(check_sequence({0x2, 0x10, 0x2, 0xE, 0xFF}), OS_MACOS); +} + +TEST_F(OsDetectionTest, TestVusbMacos) { + EXPECT_EQ(check_sequence({0x2, 0xE, 0x2, 0xE, 0xFF}), OS_MACOS); +} + +TEST_F(OsDetectionTest, TestChibiosIos) { + EXPECT_EQ(check_sequence({0x2, 0x24, 0x2, 0x28}), OS_IOS); +} + +TEST_F(OsDetectionTest, TestLufaIos) { + EXPECT_EQ(check_sequence({0x2, 0x10, 0x2, 0xE}), OS_IOS); +} + +TEST_F(OsDetectionTest, TestVusbIos) { + EXPECT_EQ(check_sequence({0x2, 0xE, 0x2, 0xE}), OS_IOS); +} + +TEST_F(OsDetectionTest, TestChibiosWindows10) { + EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0x24, 0x4, 0x24, 0x4, 0xFF, 0x24, 0xFF, 0x4, 0xFF, 0x24, 0x4, 0x24, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A}), OS_WINDOWS); +} + +TEST_F(OsDetectionTest, TestChibiosWindows10_2) { + EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0x24, 0x4, 0x24, 0x4, 0x24, 0x4, 0x24, 0x4, 0x24}), OS_WINDOWS); +} + +TEST_F(OsDetectionTest, TestLufaWindows10) { + EXPECT_EQ(check_sequence({0x12, 0xFF, 0xFF, 0x4, 0x10, 0xFF, 0xFF, 0xFF, 0x4, 0x10, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A}), OS_WINDOWS); +} + +TEST_F(OsDetectionTest, TestLufaWindows10_2) { + EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0x10, 0xFF, 0x4, 0xFF, 0x10, 0xFF, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A, 0x20A}), OS_WINDOWS); +} + +TEST_F(OsDetectionTest, TestLufaWindows10_3) { + EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0x10, 0x4, 0x10}), OS_WINDOWS); +} + +TEST_F(OsDetectionTest, TestVusbWindows10) { + EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0xE, 0xFF}), OS_WINDOWS); +} + +TEST_F(OsDetectionTest, TestVusbWindows10_2) { + EXPECT_EQ(check_sequence({0xFF, 0xFF, 0x4, 0xE, 0x4}), OS_WINDOWS); +} + +TEST_F(OsDetectionTest, TestChibiosPs5) { + EXPECT_EQ(check_sequence({0x2, 0x4, 0x2, 0x28, 0x2, 0x24}), OS_LINUX); +} + +TEST_F(OsDetectionTest, TestLufaPs5) { + EXPECT_EQ(check_sequence({0x2, 0x4, 0x2, 0xE, 0x2, 0x10}), OS_LINUX); +} + +TEST_F(OsDetectionTest, TestVusbPs5) { + EXPECT_EQ(check_sequence({0x2, 0x4, 0x2, 0xE, 0x2}), OS_LINUX); +} + +TEST_F(OsDetectionTest, TestChibiosNintendoSwitch) { + EXPECT_EQ(check_sequence({0x82, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40}), OS_LINUX); +} + +TEST_F(OsDetectionTest, TestLufaNintendoSwitch) { + EXPECT_EQ(check_sequence({0x82, 0xFF, 0x40, 0x40, 0xFF, 0x40, 0x40}), OS_LINUX); +} + +TEST_F(OsDetectionTest, TestVusbNintendoSwitch) { + EXPECT_EQ(check_sequence({0x82, 0xFF, 0x40, 0x40}), OS_LINUX); +} + +TEST_F(OsDetectionTest, TestChibiosQuest2) { + EXPECT_EQ(check_sequence({0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF}), OS_LINUX); +} + +TEST_F(OsDetectionTest, TestVusbQuest2) { + EXPECT_EQ(check_sequence({0xFF, 0xFF, 0xFF, 0xFE}), OS_LINUX); +} diff --git a/quantum/os_detection/tests/rules.mk b/quantum/os_detection/tests/rules.mk new file mode 100644 index 0000000000..9bfe373f46 --- /dev/null +++ b/quantum/os_detection/tests/rules.mk @@ -0,0 +1,5 @@ +os_detection_DEFS := -DOS_DETECTION_ENABLE + +os_detection_SRC := \ + $(QUANTUM_PATH)/os_detection/tests/os_detection.cpp \ + $(QUANTUM_PATH)/os_detection.c diff --git a/quantum/os_detection/tests/testlist.mk b/quantum/os_detection/tests/testlist.mk new file mode 100644 index 0000000000..405a7b82d5 --- /dev/null +++ b/quantum/os_detection/tests/testlist.mk @@ -0,0 +1 @@ +TEST_LIST += os_detection diff --git a/quantum/painter/lvgl/qp_lvgl.c b/quantum/painter/lvgl/qp_lvgl.c new file mode 100644 index 0000000000..c6dd08ef97 --- /dev/null +++ b/quantum/painter/lvgl/qp_lvgl.c @@ -0,0 +1,150 @@ +// Copyright 2022 Jose Pablo Ramirez (@jpe230) +// Copyright 2022 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "qp_lvgl.h" +#include "timer.h" +#include "deferred_exec.h" +#include "lvgl.h" + +typedef struct lvgl_state_t { + uint8_t fnc_id; // Ideally this should be the pointer of the function to run + uint16_t delay_ms; + deferred_token defer_token; +} lvgl_state_t; + +static deferred_executor_t lvgl_executors[2] = {0}; // For lv_tick_inc and lv_task_handler +static lvgl_state_t lvgl_states[2] = {0}; // For lv_tick_inc and lv_task_handler + +painter_device_t selected_display = NULL; +void * color_buffer = NULL; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter LVGL Integration Internal: qp_lvgl_flush + +void qp_lvgl_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p) { + if (selected_display) { + uint32_t number_pixels = (area->x2 - area->x1 + 1) * (area->y2 - area->y1 + 1); + qp_viewport(selected_display, area->x1, area->y1, area->x2, area->y2); + qp_pixdata(selected_display, (void *)color_p, number_pixels); + qp_flush(selected_display); + lv_disp_flush_ready(disp); + } +} + +static uint32_t tick_task_callback(uint32_t trigger_time, void *cb_arg) { + lvgl_state_t * state = (lvgl_state_t *)cb_arg; + static uint32_t last_tick = 0; + switch (state->fnc_id) { + case 0: { + uint32_t now = timer_read32(); + lv_tick_inc(TIMER_DIFF_32(now, last_tick)); + last_tick = now; + } break; + case 1: + lv_task_handler(); + break; + + default: + break; + } + + // The tasks should run indefinitely + return state->delay_ms; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter LVGL Integration API: qp_lvgl_attach + +bool qp_lvgl_attach(painter_device_t device) { + qp_dprintf("qp_lvgl_start: entry\n"); + qp_lvgl_detach(); + + struct painter_driver_t *driver = (struct painter_driver_t *)device; + if (!driver->validate_ok) { + qp_dprintf("qp_lvgl_attach: fail (validation_ok == false)\n"); + qp_lvgl_detach(); + return false; + } + + // Setting up the tasks + lvgl_state_t *lv_tick_inc_state = &lvgl_states[0]; + lv_tick_inc_state->fnc_id = 0; + lv_tick_inc_state->delay_ms = 1; + lv_tick_inc_state->defer_token = defer_exec_advanced(lvgl_executors, 2, 1, tick_task_callback, lv_tick_inc_state); + + if (lv_tick_inc_state->defer_token == INVALID_DEFERRED_TOKEN) { + qp_dprintf("qp_lvgl_attach: fail (could not set up qp_lvgl executor)\n"); + qp_lvgl_detach(); + return false; + } + + lvgl_state_t *lv_task_handler_state = &lvgl_states[1]; + lv_task_handler_state->fnc_id = 1; + lv_task_handler_state->delay_ms = 5; + lv_task_handler_state->defer_token = defer_exec_advanced(lvgl_executors, 2, 5, tick_task_callback, lv_task_handler_state); + + if (lv_task_handler_state->defer_token == INVALID_DEFERRED_TOKEN) { + qp_dprintf("qp_lvgl_attach: fail (could not set up qp_lvgl executor)\n"); + qp_lvgl_detach(); + return false; + } + + // Init LVGL + lv_init(); + + // Set up lvgl display buffer + static lv_disp_draw_buf_t draw_buf; + // Allocate a buffer for 1/10 screen size + const size_t count_required = driver->panel_width * driver->panel_height / 10; + color_buffer = color_buffer ? realloc(color_buffer, sizeof(lv_color_t) * count_required) : malloc(sizeof(lv_color_t) * count_required); + if (!color_buffer) { + qp_dprintf("qp_lvgl_attach: fail (could not set up memory buffer)\n"); + qp_lvgl_detach(); + return false; + } + memset(color_buffer, 0, sizeof(lv_color_t) * count_required); + // Initialize the display buffer. + lv_disp_draw_buf_init(&draw_buf, color_buffer, NULL, count_required); + + selected_display = device; + + uint16_t panel_width, panel_height, offset_x, offset_y; + qp_get_geometry(selected_display, &panel_width, &panel_height, NULL, &offset_x, &offset_y); + + panel_width -= offset_x; + panel_height -= offset_y; + + // Setting up display driver + static lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/ + lv_disp_drv_init(&disp_drv); /*Basic initialization*/ + disp_drv.flush_cb = qp_lvgl_flush; /*Set your driver function*/ + disp_drv.draw_buf = &draw_buf; /*Assign the buffer to the display*/ + disp_drv.hor_res = panel_width; /*Set the horizontal resolution of the display*/ + disp_drv.ver_res = panel_height; /*Set the vertical resolution of the display*/ + lv_disp_drv_register(&disp_drv); /*Finally register the driver*/ + + return true; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter LVGL Integration API: qp_lvgl_detach + +void qp_lvgl_detach(void) { + for (int i = 0; i < 2; ++i) { + cancel_deferred_exec_advanced(lvgl_executors, 2, lvgl_states[i].defer_token); + } + if (color_buffer) { + free(color_buffer); + color_buffer = NULL; + } + selected_display = NULL; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter LVGL Integration Internal: qp_lvgl_internal_tick + +void qp_lvgl_internal_tick(void) { + static uint32_t last_lvgl_exec = 0; + deferred_exec_advanced_task(lvgl_executors, 2, &last_lvgl_exec); +} diff --git a/quantum/painter/lvgl/qp_lvgl.h b/quantum/painter/lvgl/qp_lvgl.h new file mode 100644 index 0000000000..d9ad5e8df1 --- /dev/null +++ b/quantum/painter/lvgl/qp_lvgl.h @@ -0,0 +1,25 @@ +// Copyright 2022 Jose Pablo Ramirez (@jpe230) +// Copyright 2022 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "qp.h" +#include "lvgl.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter - LVGL External API + +/** + * Sets up LVGL with the supplied display. + * + * @param device[in] the handle of the device to control + * @return true if init. of LVGL succeeded + * @return false if init. of LVGL failed + */ +bool qp_lvgl_attach(painter_device_t device); + +/** + * Disconnects LVGL from any attached display + */ +void qp_lvgl_detach(void); diff --git a/quantum/painter/lvgl/rules.mk b/quantum/painter/lvgl/rules.mk new file mode 100644 index 0000000000..50226941b3 --- /dev/null +++ b/quantum/painter/lvgl/rules.mk @@ -0,0 +1,24 @@ +# LVGL Integration + +OPT_DEFS += -DQUANTUM_PAINTER_LVGL_INTEGRATION_ENABLE -DLV_CONF_INCLUDE_SIMPLE +DEFERRED_EXEC_ENABLE := yes + +LVGL_DIR_NAME = lvgl +LVGL_DIR = $(LIB_DIR) +LVGL_PATH = $(LVGL_DIR)/$(LVGL_DIR_NAME) + +COMMON_VPATH += $(PLATFORM_PATH) \ + $(QUANTUM_DIR)/painter/$(LVGL_DIR_NAME) \ + $(LVGL_PATH) + +include $(LVGL_PATH)/src/extra/extra.mk +include $(LVGL_PATH)/src/core/lv_core.mk +include $(LVGL_PATH)/src/draw/lv_draw.mk +include $(LVGL_PATH)/src/draw/sw/lv_draw_sw.mk +include $(LVGL_PATH)/src/font/lv_font.mk +include $(LVGL_PATH)/src/hal/lv_hal.mk +include $(LVGL_PATH)/src/misc/lv_misc.mk +include $(LVGL_PATH)/src/widgets/lv_widgets.mk + +SRC += qp_lvgl.c \ + $(CSRCS) diff --git a/quantum/painter/qgf.c b/quantum/painter/qgf.c index 834837105b..6a4af07001 100644 --- a/quantum/painter/qgf.c +++ b/quantum/painter/qgf.c @@ -38,11 +38,13 @@ bool qgf_parse_format(qp_image_format_t format, uint8_t *bpp, bool *has_palette) [PALETTE_2BPP] = {.bpp = 2, .has_palette = true}, [PALETTE_4BPP] = {.bpp = 4, .has_palette = true}, [PALETTE_8BPP] = {.bpp = 8, .has_palette = true}, + [RGB565_16BPP] = {.bpp = 16, .has_palette = false}, + [RGB888_24BPP] = {.bpp = 24, .has_palette = false}, }; // clang-format on // Copy out the required info - if (format > PALETTE_8BPP) { + if (format > RGB888_24BPP) { qp_dprintf("Failed to parse frame_descriptor, invalid format 0x%02X\n", (int)format); return false; } diff --git a/quantum/painter/qp.c b/quantum/painter/qp.c index e292ff6497..de36dee2c1 100644 --- a/quantum/painter/qp.c +++ b/quantum/painter/qp.c @@ -12,7 +12,7 @@ // Internal driver validation static bool validate_driver_vtable(struct painter_driver_t *driver) { - return (driver->driver_vtable && driver->driver_vtable->init && driver->driver_vtable->power && driver->driver_vtable->clear && driver->driver_vtable->viewport && driver->driver_vtable->pixdata && driver->driver_vtable->palette_convert && driver->driver_vtable->append_pixels) ? true : false; + return (driver->driver_vtable && driver->driver_vtable->init && driver->driver_vtable->power && driver->driver_vtable->clear && driver->driver_vtable->viewport && driver->driver_vtable->pixdata && driver->driver_vtable->palette_convert && driver->driver_vtable->append_pixels && driver->driver_vtable->append_pixdata) ? true : false; } static bool validate_comms_vtable(struct painter_driver_t *driver) { diff --git a/quantum/painter/qp.h b/quantum/painter/qp.h index 69bc435961..00f5d7931a 100644 --- a/quantum/painter/qp.h +++ b/quantum/painter/qp.h @@ -64,6 +64,14 @@ # define QUANTUM_PAINTER_SUPPORTS_256_PALETTE FALSE #endif +#ifndef QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS +/** + * @def This controls whether the native color range is supported. This avoids the use of palettes but each image + * requires more storage space. + */ +# define QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS FALSE +#endif + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Quantum Painter types @@ -463,3 +471,10 @@ int16_t qp_drawtext_recolor(painter_device_t device, uint16_t x, uint16_t y, pai #ifdef QUANTUM_PAINTER_SSD1351_ENABLE # include "qp_ssd1351.h" #endif // QUANTUM_PAINTER_SSD1351_ENABLE + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter Extras + +#ifdef QUANTUM_PAINTER_LVGL_INTEGRATION_ENABLE +# include "qp_lvgl.h" +#endif // QUANTUM_PAINTER_LVGL_INTEGRATION_ENABLE diff --git a/quantum/painter/qp_draw.h b/quantum/painter/qp_draw.h index 7094d80eaa..84b1946ca7 100644 --- a/quantum/painter/qp_draw.h +++ b/quantum/painter/qp_draw.h @@ -30,9 +30,11 @@ bool qp_internal_fillrect_helper_impl(painter_device_t device, uint16_t l, uint1 // Convert from input pixel data + palette to equivalent pixels typedef int16_t (*qp_internal_byte_input_callback)(void* cb_arg); typedef bool (*qp_internal_pixel_output_callback)(qp_pixel_t* palette, uint8_t index, void* cb_arg); +typedef bool (*qp_internal_byte_output_callback)(uint8_t byte, void* cb_arg); bool qp_internal_decode_palette(painter_device_t device, uint32_t pixel_count, uint8_t bits_per_pixel, qp_internal_byte_input_callback input_callback, void* input_arg, qp_pixel_t* palette, qp_internal_pixel_output_callback output_callback, void* output_arg); bool qp_internal_decode_grayscale(painter_device_t device, uint32_t pixel_count, uint8_t bits_per_pixel, qp_internal_byte_input_callback input_callback, void* input_arg, qp_internal_pixel_output_callback output_callback, void* output_arg); bool qp_internal_decode_recolor(painter_device_t device, uint32_t pixel_count, uint8_t bits_per_pixel, qp_internal_byte_input_callback input_callback, void* input_arg, qp_pixel_t fg_hsv888, qp_pixel_t bg_hsv888, qp_internal_pixel_output_callback output_callback, void* output_arg); +bool qp_internal_send_bytes(painter_device_t device, uint32_t byte_count, qp_internal_byte_input_callback input_callback, void* input_arg, qp_internal_byte_output_callback output_callback, void* output_arg); // Global variable used for interpolated pixel lookup table. #if QUANTUM_PAINTER_SUPPORTS_256_PALETTE @@ -82,4 +84,12 @@ struct qp_internal_pixel_output_state { bool qp_internal_pixel_appender(qp_pixel_t* palette, uint8_t index, void* cb_arg); +struct qp_internal_byte_output_state { + painter_device_t device; + uint32_t byte_write_pos; + uint32_t max_bytes; +}; + +bool qp_internal_byte_appender(uint8_t byteval, void* cb_arg); + qp_internal_byte_input_callback qp_internal_prepare_input_state(struct qp_internal_byte_input_state* input_state, painter_compression_t compression); diff --git a/quantum/painter/qp_draw_codec.c b/quantum/painter/qp_draw_codec.c index 438dce3994..5d1cf7c52e 100644 --- a/quantum/painter/qp_draw_codec.c +++ b/quantum/painter/qp_draw_codec.c @@ -12,18 +12,19 @@ static const qp_pixel_t qp_pixel_white = {.hsv888 = {.h = 0, .s = 0, .v = 255}}; static const qp_pixel_t qp_pixel_black = {.hsv888 = {.h = 0, .s = 0, .v = 0}}; bool qp_internal_bpp_capable(uint8_t bits_per_pixel) { -#if !(QUANTUM_PAINTER_SUPPORTS_256_PALETTE) +#if !(QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS) +# if !(QUANTUM_PAINTER_SUPPORTS_256_PALETTE) if (bits_per_pixel > 4) { qp_dprintf("qp_internal_decode_palette: image bpp greater than 4\n"); return false; } -#endif +# endif if (bits_per_pixel > 8) { qp_dprintf("qp_internal_decode_palette: image bpp greater than 8\n"); return false; } - +#endif return true; } @@ -32,7 +33,7 @@ bool qp_internal_decode_palette(painter_device_t device, uint32_t pixel_count, u const uint8_t pixels_per_byte = 8 / bits_per_pixel; uint32_t remaining_pixels = pixel_count; // don't try to derive from byte_count, we may not use an entire byte while (remaining_pixels > 0) { - uint8_t byteval = input_callback(input_arg); + int16_t byteval = input_callback(input_arg); if (byteval < 0) { return false; } @@ -64,6 +65,21 @@ bool qp_internal_decode_recolor(painter_device_t device, uint32_t pixel_count, u return qp_internal_decode_palette(device, pixel_count, bits_per_pixel, input_callback, input_arg, qp_internal_global_pixel_lookup_table, output_callback, output_arg); } +bool qp_internal_send_bytes(painter_device_t device, uint32_t byte_count, qp_internal_byte_input_callback input_callback, void* input_arg, qp_internal_byte_output_callback output_callback, void* output_arg) { + uint32_t remaining_bytes = byte_count; + while (remaining_bytes > 0) { + int16_t byteval = input_callback(input_arg); + if (byteval < 0) { + return false; + } + if (!output_callback(byteval, output_arg)) { + return false; + } + remaining_bytes -= 1; + } + return true; +} + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Progressive pull of bytes, push of pixels @@ -128,6 +144,26 @@ bool qp_internal_pixel_appender(qp_pixel_t* palette, uint8_t index, void* cb_arg return true; } +bool qp_internal_byte_appender(uint8_t byteval, void* cb_arg) { + struct qp_internal_byte_output_state* state = (struct qp_internal_byte_output_state*)cb_arg; + struct painter_driver_t* driver = (struct painter_driver_t*)state->device; + + if (!driver->driver_vtable->append_pixdata(state->device, qp_internal_global_pixdata_buffer, state->byte_write_pos++, byteval)) { + return false; + } + + // If we've hit the transmit limit, send out the entire buffer and reset the write position + if (state->byte_write_pos == state->max_bytes) { + struct painter_driver_t* driver = (struct painter_driver_t*)state->device; + if (!driver->driver_vtable->pixdata(state->device, qp_internal_global_pixdata_buffer, state->byte_write_pos * 8 / driver->native_bits_per_pixel)) { + return false; + } + state->byte_write_pos = 0; + } + + return true; +} + qp_internal_byte_input_callback qp_internal_prepare_input_state(struct qp_internal_byte_input_state* input_state, painter_compression_t compression) { switch (compression) { case IMAGE_UNCOMPRESSED: diff --git a/quantum/painter/qp_draw_image.c b/quantum/painter/qp_draw_image.c index e9b975f23a..fa80617242 100644 --- a/quantum/painter/qp_draw_image.c +++ b/quantum/painter/qp_draw_image.c @@ -151,7 +151,7 @@ static bool qp_drawimage_prepare_frame_for_stream_read(painter_device_t device, qp_internal_invalidate_palette(); if (!qp_internal_bpp_capable(info->bpp)) { - qp_dprintf("qp_drawimage_recolor: fail (image bpp too high (%d), check QUANTUM_PAINTER_SUPPORTS_256_PALETTE)\n", (int)info->bpp); + qp_dprintf("qp_drawimage_recolor: fail (image bpp too high (%d), check QUANTUM_PAINTER_SUPPORTS_256_PALETTE or QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS)\n", (int)info->bpp); qp_comms_stop(device); return false; } @@ -167,8 +167,10 @@ static bool qp_drawimage_prepare_frame_for_stream_read(painter_device_t device, needs_pixconvert = true; } else { - // Interpolate from fg/bg - needs_pixconvert = qp_internal_interpolate_palette(fg_hsv888, bg_hsv888, palette_entries); + if (info->bpp <= 8) { + // Interpolate from fg/bg + needs_pixconvert = qp_internal_interpolate_palette(fg_hsv888, bg_hsv888, palette_entries); + } } if (needs_pixconvert) { @@ -260,15 +262,28 @@ static bool qp_drawimage_recolor_impl(painter_device_t device, uint16_t x, uint1 return false; } - // Set up the output state - struct qp_internal_pixel_output_state output_state = {.device = device, .pixel_write_pos = 0, .max_pixels = qp_internal_num_pixels_in_buffer(device)}; - - // Decode the pixel data and stream to the display - bool ret = qp_internal_decode_palette(device, pixel_count, frame_info->bpp, input_callback, &input_state, qp_internal_global_pixel_lookup_table, qp_internal_pixel_appender, &output_state); + bool ret = false; + if (frame_info->bpp <= 8) { + // Set up the output state + struct qp_internal_pixel_output_state output_state = {.device = device, .pixel_write_pos = 0, .max_pixels = qp_internal_num_pixels_in_buffer(device)}; - // Any leftovers need transmission as well. - if (ret && output_state.pixel_write_pos > 0) { - ret &= driver->driver_vtable->pixdata(device, qp_internal_global_pixdata_buffer, output_state.pixel_write_pos); + // Decode the pixel data and stream to the display + ret = qp_internal_decode_palette(device, pixel_count, frame_info->bpp, input_callback, &input_state, qp_internal_global_pixel_lookup_table, qp_internal_pixel_appender, &output_state); + // Any leftovers need transmission as well. + if (ret && output_state.pixel_write_pos > 0) { + ret &= driver->driver_vtable->pixdata(device, qp_internal_global_pixdata_buffer, output_state.pixel_write_pos); + } + } else { + // Set up the output state + struct qp_internal_byte_output_state output_state = {.device = device, .byte_write_pos = 0, .max_bytes = qp_internal_num_pixels_in_buffer(device) * driver->native_bits_per_pixel / 8}; + + // Stream the raw pixel data to the display + uint32_t byte_count = pixel_count * frame_info->bpp / 8; + ret = qp_internal_send_bytes(device, byte_count, input_callback, &input_state, qp_internal_byte_appender, &output_state); + // Any leftovers need transmission as well. + if (ret && output_state.byte_write_pos > 0) { + ret &= driver->driver_vtable->pixdata(device, qp_internal_global_pixdata_buffer, output_state.byte_write_pos * 8 / driver->native_bits_per_pixel); + } } qp_dprintf("qp_drawimage_recolor: %s\n", ret ? "ok" : "fail"); @@ -399,3 +414,15 @@ void qp_internal_animation_tick(void) { static uint32_t last_anim_exec = 0; deferred_exec_advanced_task(animation_executors, QUANTUM_PAINTER_CONCURRENT_ANIMATIONS, &last_anim_exec); } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter Core API: qp_internal_task + +void qp_internal_task(void) { + qp_internal_animation_tick(); +#ifdef QUANTUM_PAINTER_LVGL_INTEGRATION_ENABLE + // Run LVGL ticks + void qp_lvgl_internal_tick(void); + qp_lvgl_internal_tick(); +#endif +} diff --git a/quantum/painter/qp_draw_text.c b/quantum/painter/qp_draw_text.c index 0f5473abd0..f9fb2bf08f 100644 --- a/quantum/painter/qp_draw_text.c +++ b/quantum/painter/qp_draw_text.c @@ -100,7 +100,7 @@ static painter_font_handle_t qp_load_font_internal(bool (*stream_factory)(qff_fo qff_read_font_descriptor(&font->stream, &font->base.line_height, &font->has_ascii_table, &font->num_unicode_glyphs, &font->bpp, &font->has_palette, &font->compression_scheme, NULL); if (!qp_internal_bpp_capable(font->bpp)) { - qp_dprintf("qp_load_font: fail (image bpp too high (%d), check QUANTUM_PAINTER_SUPPORTS_256_PALETTE)\n", (int)font->bpp); + qp_dprintf("qp_load_font: fail (image bpp too high (%d), check QUANTUM_PAINTER_SUPPORTS_256_PALETTE or QUANTUM_PAINTER_SUPPORTS_NATIVE_COLORS)\n", (int)font->bpp); qp_close_font((painter_font_handle_t)font); return NULL; } diff --git a/quantum/painter/qp_internal_driver.h b/quantum/painter/qp_internal_driver.h index 9e9d6bc848..82a0178a73 100644 --- a/quantum/painter/qp_internal_driver.h +++ b/quantum/painter/qp_internal_driver.h @@ -16,6 +16,7 @@ typedef bool (*painter_driver_viewport_func)(painter_device_t device, uint16_t l typedef bool (*painter_driver_pixdata_func)(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count); typedef bool (*painter_driver_convert_palette_func)(painter_device_t device, int16_t palette_size, qp_pixel_t *palette); typedef bool (*painter_driver_append_pixels)(painter_device_t device, uint8_t *target_buffer, qp_pixel_t *palette, uint32_t pixel_offset, uint32_t pixel_count, uint8_t *palette_indices); +typedef bool (*painter_driver_append_pixdata)(painter_device_t device, uint8_t *target_buffer, uint32_t pixdata_offset, uint8_t pixdata_byte); // Driver vtable definition struct painter_driver_vtable_t { @@ -27,6 +28,7 @@ struct painter_driver_vtable_t { painter_driver_pixdata_func pixdata; painter_driver_convert_palette_func palette_convert; painter_driver_append_pixels append_pixels; + painter_driver_append_pixdata append_pixdata; }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/quantum/painter/qp_internal_formats.h b/quantum/painter/qp_internal_formats.h index a4a86f0345..194f82b31a 100644 --- a/quantum/painter/qp_internal_formats.h +++ b/quantum/painter/qp_internal_formats.h @@ -44,6 +44,8 @@ typedef enum qp_image_format_t { PALETTE_2BPP = 0x05, PALETTE_4BPP = 0x06, PALETTE_8BPP = 0x07, + RGB565_16BPP = 0x08, + RGB888_24BPP = 0x09, } qp_image_format_t; typedef enum painter_compression_t { IMAGE_UNCOMPRESSED, IMAGE_COMPRESSED_RLE } painter_compression_t; diff --git a/quantum/painter/rules.mk b/quantum/painter/rules.mk index 5ac374a96e..199e406dd6 100644 --- a/quantum/painter/rules.mk +++ b/quantum/painter/rules.mk @@ -2,6 +2,8 @@ QUANTUM_PAINTER_DRIVERS ?= QUANTUM_PAINTER_ANIMATIONS_ENABLE ?= yes +QUANTUM_PAINTER_LVGL_INTEGRATION ?= no + # The list of permissible drivers that can be listed in QUANTUM_PAINTER_DRIVERS VALID_QUANTUM_PAINTER_DRIVERS := \ rgb565_surface \ @@ -152,3 +154,7 @@ ifeq ($(strip $(QUANTUM_PAINTER_NEEDS_COMMS_SPI)), yes) endif endif +# Check if LVGL needs to be enabled +ifeq ($(strip $(QUANTUM_PAINTER_LVGL_INTEGRATION)), yes) + include $(QUANTUM_DIR)/painter/lvgl/rules.mk +endif diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index 03b0af9277..c189dd02b7 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c @@ -62,5 +62,5 @@ void process_audio_all_notes_off(void) { stop_all_notes(); } -__attribute__((weak)) void audio_on_user() {} -__attribute__((weak)) void audio_off_user() {} +__attribute__((weak)) void audio_on_user(void) {} +__attribute__((weak)) void audio_off_user(void) {} diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index 35d4851ee5..aad1a164ae 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -344,7 +344,7 @@ bool get_autoshift_state(void) { return autoshift_flags.enabled; } -uint16_t get_generic_autoshift_timeout() { +uint16_t get_generic_autoshift_timeout(void) { return autoshift_timeout; } __attribute__((weak)) uint16_t get_autoshift_timeout(uint16_t keycode, keyrecord_t *record) { @@ -397,8 +397,17 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { break; # endif } - // If Retro Shift is disabled, possible custom actions shouldn't happen. - // clang-format off + // If Retro Shift is disabled, possible custom actions shouldn't happen. + // clang-format off +# if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) +# if defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) + const bool is_hold_on_interrupt = get_hold_on_other_key_press(keycode, record); +# elif defined(IGNORE_MOD_TAP_INTERRUPT) + const bool is_hold_on_interrupt = false; +# else + const bool is_hold_on_interrupt = IS_QK_MOD_TAP(keycode); +# endif +# endif if (IS_RETRO(keycode) # if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) // Not tapped or #defines mean that rolls should use hold action. @@ -407,27 +416,7 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { # ifdef RETRO_TAPPING_PER_KEY || !get_retro_tapping(keycode, record) # endif - || (record->tap.interrupted && (IS_LT(keycode) -# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) -# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY - ? get_hold_on_other_key_press(keycode, record) -# else - ? true -# endif -# else - ? false -# endif -# if defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) -# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY - : !get_ignore_mod_tap_interrupt(keycode, record) -# else - : false -# endif -# else - : true -# endif - )) - ) + || (record->tap.interrupted && is_hold_on_interrupt)) # endif ) { // clang-format on @@ -454,10 +443,10 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { # endif ) { // Fixes modifiers not being applied to rolls with AUTO_SHIFT_MODIFIERS set. -# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) +# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) if (autoshift_flags.in_progress -# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY - && !get_ignore_mod_tap_interrupt(keycode, record) +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY + && get_hold_on_other_key_press(keycode, record) # endif ) { autoshift_end(KC_NO, now, false, &autoshift_lastrecord); @@ -495,7 +484,7 @@ void retroshift_poll_time(keyevent_t *event) { retroshift_time = timer_read(); } // Used to swap the times of Retro Shifted key and Auto Shift key that interrupted it. -void retroshift_swap_times() { +void retroshift_swap_times(void) { if (last_retroshift_time != 0 && autoshift_flags.in_progress) { uint16_t temp = retroshift_time; retroshift_time = last_retroshift_time; diff --git a/quantum/process_keycode/process_auto_shift.h b/quantum/process_keycode/process_auto_shift.h index 86adb04985..66a4b3138a 100644 --- a/quantum/process_keycode/process_auto_shift.h +++ b/quantum/process_keycode/process_auto_shift.h @@ -22,9 +22,8 @@ # define AUTO_SHIFT_TIMEOUT 175 #endif -#define IS_LT(kc) ((kc) >= QK_LAYER_TAP && (kc) <= QK_LAYER_TAP_MAX) -#define IS_MT(kc) ((kc) >= QK_MOD_TAP && (kc) <= QK_MOD_TAP_MAX) -#define IS_RETRO(kc) (IS_MT(kc) || IS_LT(kc)) +#define IS_RETRO(kc) (IS_QK_MOD_TAP(kc) || IS_QK_LAYER_TAP(kc)) + #define DO_GET_AUTOSHIFT_TIMEOUT(keycode, record, ...) record // clang-format off #define AUTO_SHIFT_ALPHA KC_A ... KC_Z diff --git a/quantum/process_keycode/process_autocorrect.c b/quantum/process_keycode/process_autocorrect.c index 8aeebf0e06..c89dffeaad 100644 --- a/quantum/process_keycode/process_autocorrect.c +++ b/quantum/process_keycode/process_autocorrect.c @@ -126,7 +126,7 @@ __attribute__((weak)) bool process_autocorrect_user(uint16_t *keycode, keyrecord // and mask for base keycode when they are tapped. case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: #ifdef SWAP_HANDS_ENABLE - // Note: IS_SWAP_HANDS_KEYCODE() actually tests for the special action keycodes like SH_TG, SH_TT, ..., + // Note: IS_SWAP_HANDS_KEYCODE() actually tests for the special action keycodes like SH_TOGG, SH_TT, ..., // which currently overlap the SH_T(kc) range. if (IS_SWAP_HANDS_KEYCODE(*keycode) || !record->tap.count) { return false; diff --git a/quantum/process_keycode/process_caps_word.c b/quantum/process_keycode/process_caps_word.c index 4c0217eba7..933abe629e 100644 --- a/quantum/process_keycode/process_caps_word.c +++ b/quantum/process_keycode/process_caps_word.c @@ -143,7 +143,7 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) { #ifdef SWAP_HANDS_ENABLE case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: - // Note: IS_SWAP_HANDS_KEYCODE() actually tests for the special action keycodes like SH_TG, SH_TT, ..., + // Note: IS_SWAP_HANDS_KEYCODE() actually tests for the special action keycodes like SH_TOGG, SH_TT, ..., // which currently overlap the SH_T(kc) range. if (IS_SWAP_HANDS_KEYCODE(keycode) || record->tap.count == 0) { return true; diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index d8b089db16..8597649c92 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -29,6 +29,12 @@ extern uint16_t COMBO_LEN; __attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {} +#ifndef COMBO_ONLY_FROM_LAYER +__attribute__((weak)) uint8_t combo_ref_from_layer(uint8_t layer) { + return layer; +} +#endif + #ifdef COMBO_MUST_HOLD_PER_COMBO __attribute__((weak)) bool get_combo_must_hold(uint16_t index, combo_t *combo) { return false; @@ -304,7 +310,7 @@ void apply_combo(uint16_t combo_index, combo_t *combo) { #if defined(EXTRA_EXTRA_LONG_COMBOS) uint32_t state = 0; #elif defined(EXTRA_LONG_COMBOS) - uint16_t state = 0; + uint16_t state = 0; #else uint8_t state = 0; #endif @@ -549,6 +555,12 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) { #ifdef COMBO_ONLY_FROM_LAYER /* Only check keycodes from one layer. */ keycode = keymap_key_to_keycode(COMBO_ONLY_FROM_LAYER, record->event.key); +#else + uint8_t highest_layer = get_highest_layer(layer_state); + uint8_t ref_layer = combo_ref_from_layer(highest_layer); + if (ref_layer != highest_layer) { + keycode = keymap_key_to_keycode(ref_layer, record->event.key); + } #endif for (uint16_t idx = 0; idx < COMBO_LEN; ++idx) { diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index 4c4e574e34..e430c4a5f7 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -69,7 +69,7 @@ typedef struct { #endif /* check if keycode is only modifiers */ -#define KEYCODE_IS_MOD(code) (IS_MOD(code) || (code >= QK_MODS && code <= QK_MODS_MAX && !(code & QK_BASIC_MAX))) +#define KEYCODE_IS_MOD(code) (IS_MODIFIER_KEYCODE(code) || (IS_QK_MODS(code) && !QK_MODS_GET_BASIC_KEYCODE(code))) bool process_combo(uint16_t keycode, keyrecord_t *record); void combo_task(void); diff --git a/quantum/process_keycode/process_key_override.c b/quantum/process_keycode/process_key_override.c index 9c5abccd4f..9b91ae2223 100644 --- a/quantum/process_keycode/process_key_override.c +++ b/quantum/process_keycode/process_key_override.c @@ -402,7 +402,7 @@ bool process_key_override(const uint16_t keycode, const keyrecord_t *const recor #endif const bool key_down = record->event.pressed; - const bool is_mod = IS_MOD(keycode); + const bool is_mod = IS_MODIFIER_KEYCODE(keycode); if (key_down) { switch (keycode) { diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c index b74b4927a8..a9823b6285 100644 --- a/quantum/process_keycode/process_leader.c +++ b/quantum/process_keycode/process_leader.c @@ -14,72 +14,35 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifdef LEADER_ENABLE - -# include "process_leader.h" -# include <string.h> - -# ifndef LEADER_TIMEOUT -# define LEADER_TIMEOUT 300 -# endif - -__attribute__((weak)) void leader_start(void) {} - -__attribute__((weak)) void leader_end(void) {} - -// Leader key stuff -bool leading = false; -uint16_t leader_time = 0; - -uint16_t leader_sequence[5] = {0, 0, 0, 0, 0}; -uint8_t leader_sequence_size = 0; - -void qk_leader_start(void) { - if (leading) { - return; - } - leader_start(); - leading = true; - leader_time = timer_read(); - leader_sequence_size = 0; - memset(leader_sequence, 0, sizeof(leader_sequence)); -} +#include "process_leader.h" +#include "leader.h" bool process_leader(uint16_t keycode, keyrecord_t *record) { - // Leader key set-up if (record->event.pressed) { - if (leading) { -# ifndef LEADER_NO_TIMEOUT - if (timer_elapsed(leader_time) < LEADER_TIMEOUT) -# endif // LEADER_NO_TIMEOUT - { -# ifndef LEADER_KEY_STRICT_KEY_PROCESSING - if (IS_QK_MOD_TAP(keycode)) { - keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode); - } else if (IS_QK_LAYER_TAP(keycode)) { - keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode); - } -# endif // LEADER_KEY_STRICT_KEY_PROCESSING - if (leader_sequence_size < ARRAY_SIZE(leader_sequence)) { - leader_sequence[leader_sequence_size] = keycode; - leader_sequence_size++; - } else { - leading = false; - leader_end(); - return true; - } -# ifdef LEADER_PER_KEY_TIMING - leader_time = timer_read(); -# endif - return false; + if (leader_sequence_active() && !leader_sequence_timed_out()) { +#ifndef LEADER_KEY_STRICT_KEY_PROCESSING + if (IS_QK_MOD_TAP(keycode)) { + keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode); + } else if (IS_QK_LAYER_TAP(keycode)) { + keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode); } - } else { - if (keycode == QK_LEADER) { - qk_leader_start(); +#endif + + if (!leader_sequence_add(keycode)) { + leader_end(); + + return true; } + +#ifdef LEADER_PER_KEY_TIMING + leader_reset_timer(); +#endif + + return false; + } else if (keycode == QK_LEADER) { + leader_start(); } } + return true; } - -#endif diff --git a/quantum/process_keycode/process_leader.h b/quantum/process_keycode/process_leader.h index f3fe14a432..eb0f721f60 100644 --- a/quantum/process_keycode/process_leader.h +++ b/quantum/process_keycode/process_leader.h @@ -19,25 +19,3 @@ #include "quantum.h" bool process_leader(uint16_t keycode, keyrecord_t *record); - -void leader_start(void); -void leader_end(void); -void qk_leader_start(void); - -#define SEQ_ONE_KEY(key) if (leader_sequence[0] == (key) && leader_sequence[1] == 0 && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) -#define SEQ_TWO_KEYS(key1, key2) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) -#define SEQ_THREE_KEYS(key1, key2, key3) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == 0 && leader_sequence[4] == 0) -#define SEQ_FOUR_KEYS(key1, key2, key3, key4) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == (key4) && leader_sequence[4] == 0) -#define SEQ_FIVE_KEYS(key1, key2, key3, key4, key5) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == (key4) && leader_sequence[4] == (key5)) - -#define LEADER_EXTERNS() \ - extern bool leading; \ - extern uint16_t leader_time; \ - extern uint16_t leader_sequence[5]; \ - extern uint8_t leader_sequence_size - -#ifdef LEADER_NO_TIMEOUT -# define LEADER_DICTIONARY() if (leading && leader_sequence_size > 0 && timer_elapsed(leader_time) > LEADER_TIMEOUT) -#else -# define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT) -#endif diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index ee697a0cc6..7c572079a7 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -317,10 +317,10 @@ void music_task(void) { } } -__attribute__((weak)) void music_on_user() {} +__attribute__((weak)) void music_on_user(void) {} -__attribute__((weak)) void midi_on_user() {} +__attribute__((weak)) void midi_on_user(void) {} -__attribute__((weak)) void music_scale_user() {} +__attribute__((weak)) void music_scale_user(void) {} #endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c index a62cd60a70..3109ea1711 100644 --- a/quantum/process_keycode/process_space_cadet.c +++ b/quantum/process_keycode/process_space_cadet.c @@ -89,16 +89,16 @@ void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdM #ifdef SPACE_CADET_MODIFIER_CARRYOVER sc_mods = get_mods(); #endif - if (IS_MOD(holdMod)) { + if (IS_MODIFIER_KEYCODE(holdMod)) { register_mods(MOD_BIT(holdMod)); } } else { if (sc_last == holdMod && timer_elapsed(sc_timer) < GET_TAPPING_TERM(sc_keycode, record)) { if (holdMod != tapMod) { - if (IS_MOD(holdMod)) { + if (IS_MODIFIER_KEYCODE(holdMod)) { unregister_mods(MOD_BIT(holdMod)); } - if (IS_MOD(tapMod)) { + if (IS_MODIFIER_KEYCODE(tapMod)) { register_mods(MOD_BIT(tapMod)); } } @@ -109,11 +109,11 @@ void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdM #ifdef SPACE_CADET_MODIFIER_CARRYOVER clear_weak_mods(); #endif - if (IS_MOD(tapMod)) { + if (IS_MODIFIER_KEYCODE(tapMod)) { unregister_mods(MOD_BIT(tapMod)); } } else { - if (IS_MOD(holdMod)) { + if (IS_MODIFIER_KEYCODE(holdMod)) { unregister_mods(MOD_BIT(holdMod)); } } diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c index 30a0d4056f..8ba98bd4bb 100644 --- a/quantum/process_keycode/process_steno.c +++ b/quantum/process_keycode/process_steno.c @@ -127,7 +127,7 @@ static const uint16_t combinedmap_second[] PROGMEM = {STN_S2, STN_KL, STN_WL, ST #endif #ifdef STENO_ENABLE_ALL -void steno_init() { +void steno_init(void) { if (!eeconfig_is_enabled()) { eeconfig_init(); } diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 6e8e596673..706f5cddbb 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -18,8 +18,8 @@ static uint16_t active_td; static uint16_t last_tap_time; -void qk_tap_dance_pair_on_each_tap(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data; +void tap_dance_pair_on_each_tap(tap_dance_state_t *state, void *user_data) { + tap_dance_pair_t *pair = (tap_dance_pair_t *)user_data; if (state->count == 2) { register_code16(pair->kc2); @@ -27,14 +27,14 @@ void qk_tap_dance_pair_on_each_tap(qk_tap_dance_state_t *state, void *user_data) } } -void qk_tap_dance_pair_finished(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data; +void tap_dance_pair_finished(tap_dance_state_t *state, void *user_data) { + tap_dance_pair_t *pair = (tap_dance_pair_t *)user_data; register_code16(pair->kc1); } -void qk_tap_dance_pair_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data; +void tap_dance_pair_reset(tap_dance_state_t *state, void *user_data) { + tap_dance_pair_t *pair = (tap_dance_pair_t *)user_data; if (state->count == 1) { wait_ms(TAP_CODE_DELAY); @@ -44,8 +44,8 @@ void qk_tap_dance_pair_reset(qk_tap_dance_state_t *state, void *user_data) { } } -void qk_tap_dance_dual_role_on_each_tap(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_dual_role_t *pair = (qk_tap_dance_dual_role_t *)user_data; +void tap_dance_dual_role_on_each_tap(tap_dance_state_t *state, void *user_data) { + tap_dance_dual_role_t *pair = (tap_dance_dual_role_t *)user_data; if (state->count == 2) { layer_move(pair->layer); @@ -53,8 +53,8 @@ void qk_tap_dance_dual_role_on_each_tap(qk_tap_dance_state_t *state, void *user_ } } -void qk_tap_dance_dual_role_finished(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_dual_role_t *pair = (qk_tap_dance_dual_role_t *)user_data; +void tap_dance_dual_role_finished(tap_dance_state_t *state, void *user_data) { + tap_dance_dual_role_t *pair = (tap_dance_dual_role_t *)user_data; if (state->count == 1) { register_code16(pair->kc); @@ -63,8 +63,8 @@ void qk_tap_dance_dual_role_finished(qk_tap_dance_state_t *state, void *user_dat } } -void qk_tap_dance_dual_role_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_dual_role_t *pair = (qk_tap_dance_dual_role_t *)user_data; +void tap_dance_dual_role_reset(tap_dance_state_t *state, void *user_data) { + tap_dance_dual_role_t *pair = (tap_dance_dual_role_t *)user_data; if (state->count == 1) { wait_ms(TAP_CODE_DELAY); @@ -72,13 +72,13 @@ void qk_tap_dance_dual_role_reset(qk_tap_dance_state_t *state, void *user_data) } } -static inline void _process_tap_dance_action_fn(qk_tap_dance_state_t *state, void *user_data, qk_tap_dance_user_fn_t fn) { +static inline void _process_tap_dance_action_fn(tap_dance_state_t *state, void *user_data, tap_dance_user_fn_t fn) { if (fn) { fn(state, user_data); } } -static inline void process_tap_dance_action_on_each_tap(qk_tap_dance_action_t *action) { +static inline void process_tap_dance_action_on_each_tap(tap_dance_action_t *action) { action->state.count++; action->state.weak_mods = get_mods(); action->state.weak_mods |= get_weak_mods(); @@ -88,17 +88,17 @@ static inline void process_tap_dance_action_on_each_tap(qk_tap_dance_action_t *a _process_tap_dance_action_fn(&action->state, action->user_data, action->fn.on_each_tap); } -static inline void process_tap_dance_action_on_reset(qk_tap_dance_action_t *action) { +static inline void process_tap_dance_action_on_reset(tap_dance_action_t *action) { _process_tap_dance_action_fn(&action->state, action->user_data, action->fn.on_reset); del_weak_mods(action->state.weak_mods); #ifndef NO_ACTION_ONESHOT del_mods(action->state.oneshot_mods); #endif send_keyboard_report(); - action->state = (const qk_tap_dance_state_t){0}; + action->state = (const tap_dance_state_t){0}; } -static inline void process_tap_dance_action_on_dance_finished(qk_tap_dance_action_t *action) { +static inline void process_tap_dance_action_on_dance_finished(tap_dance_action_t *action) { if (!action->state.finished) { action->state.finished = true; add_weak_mods(action->state.weak_mods); @@ -116,7 +116,7 @@ static inline void process_tap_dance_action_on_dance_finished(qk_tap_dance_actio } bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { - qk_tap_dance_action_t *action; + tap_dance_action_t *action; if (!record->event.pressed) return false; @@ -139,7 +139,7 @@ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { } bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { - qk_tap_dance_action_t *action; + tap_dance_action_t *action; switch (keycode) { case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: @@ -162,8 +162,8 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { return true; } -void tap_dance_task() { - qk_tap_dance_action_t *action; +void tap_dance_task(void) { + tap_dance_action_t *action; if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return; @@ -173,7 +173,7 @@ void tap_dance_task() { } } -void reset_tap_dance(qk_tap_dance_state_t *state) { +void reset_tap_dance(tap_dance_state_t *state) { active_td = 0; - process_tap_dance_action_on_reset((qk_tap_dance_action_t *)state); + process_tap_dance_action_on_reset((tap_dance_action_t *)state); } diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index d6d6c136dc..5cb6d9202c 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -31,39 +31,39 @@ typedef struct { bool pressed : 1; bool finished : 1; bool interrupted : 1; -} qk_tap_dance_state_t; +} tap_dance_state_t; -typedef void (*qk_tap_dance_user_fn_t)(qk_tap_dance_state_t *state, void *user_data); +typedef void (*tap_dance_user_fn_t)(tap_dance_state_t *state, void *user_data); typedef struct { - qk_tap_dance_state_t state; + tap_dance_state_t state; struct { - qk_tap_dance_user_fn_t on_each_tap; - qk_tap_dance_user_fn_t on_dance_finished; - qk_tap_dance_user_fn_t on_reset; + tap_dance_user_fn_t on_each_tap; + tap_dance_user_fn_t on_dance_finished; + tap_dance_user_fn_t on_reset; } fn; void *user_data; -} qk_tap_dance_action_t; +} tap_dance_action_t; typedef struct { uint16_t kc1; uint16_t kc2; -} qk_tap_dance_pair_t; +} tap_dance_pair_t; typedef struct { uint16_t kc; uint8_t layer; void (*layer_function)(uint8_t); -} qk_tap_dance_dual_role_t; +} tap_dance_dual_role_t; # define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) \ - { .fn = {qk_tap_dance_pair_on_each_tap, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset}, .user_data = (void *)&((qk_tap_dance_pair_t){kc1, kc2}), } + { .fn = {tap_dance_pair_on_each_tap, tap_dance_pair_finished, tap_dance_pair_reset}, .user_data = (void *)&((tap_dance_pair_t){kc1, kc2}), } # define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) \ - { .fn = {qk_tap_dance_dual_role_on_each_tap, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset}, .user_data = (void *)&((qk_tap_dance_dual_role_t){kc, layer, layer_move}), } + { .fn = {tap_dance_dual_role_on_each_tap, tap_dance_dual_role_finished, tap_dance_dual_role_reset}, .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_move}), } # define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \ - { .fn = {NULL, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset}, .user_data = (void *)&((qk_tap_dance_dual_role_t){kc, layer, layer_invert}), } + { .fn = {NULL, tap_dance_dual_role_finished, tap_dance_dual_role_reset}, .user_data = (void *)&((tap_dance_dual_role_t){kc, layer, layer_invert}), } # define ACTION_TAP_DANCE_FN(user_fn) \ { .fn = {NULL, user_fn, NULL}, .user_data = NULL, } @@ -73,11 +73,11 @@ typedef struct { # define TD(n) (QK_TAP_DANCE | TD_INDEX(n)) # define TD_INDEX(code) ((code)&0xFF) -# define TAP_DANCE_KEYCODE(state) TD(((qk_tap_dance_action_t *)state) - tap_dance_actions) +# define TAP_DANCE_KEYCODE(state) TD(((tap_dance_action_t *)state) - tap_dance_actions) -extern qk_tap_dance_action_t tap_dance_actions[]; +extern tap_dance_action_t tap_dance_actions[]; -void reset_tap_dance(qk_tap_dance_state_t *state); +void reset_tap_dance(tap_dance_state_t *state); /* To be used internally */ @@ -85,13 +85,13 @@ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record); bool process_tap_dance(uint16_t keycode, keyrecord_t *record); void tap_dance_task(void); -void qk_tap_dance_pair_on_each_tap(qk_tap_dance_state_t *state, void *user_data); -void qk_tap_dance_pair_finished(qk_tap_dance_state_t *state, void *user_data); -void qk_tap_dance_pair_reset(qk_tap_dance_state_t *state, void *user_data); +void tap_dance_pair_on_each_tap(tap_dance_state_t *state, void *user_data); +void tap_dance_pair_finished(tap_dance_state_t *state, void *user_data); +void tap_dance_pair_reset(tap_dance_state_t *state, void *user_data); -void qk_tap_dance_dual_role_on_each_tap(qk_tap_dance_state_t *state, void *user_data); -void qk_tap_dance_dual_role_finished(qk_tap_dance_state_t *state, void *user_data); -void qk_tap_dance_dual_role_reset(qk_tap_dance_state_t *state, void *user_data); +void tap_dance_dual_role_on_each_tap(tap_dance_state_t *state, void *user_data); +void tap_dance_dual_role_finished(tap_dance_state_t *state, void *user_data); +void tap_dance_dual_role_reset(tap_dance_state_t *state, void *user_data); #else diff --git a/quantum/process_keycode/process_tri_layer.c b/quantum/process_keycode/process_tri_layer.c new file mode 100644 index 0000000000..1e681b9a1c --- /dev/null +++ b/quantum/process_keycode/process_tri_layer.c @@ -0,0 +1,30 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "process_tri_layer.h" +#include "tri_layer.h" +#include "action_layer.h" + +bool process_tri_layer(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QK_TRI_LAYER_LOWER: + if (record->event.pressed) { + layer_on(get_tri_layer_lower_layer()); + update_tri_layer(get_tri_layer_lower_layer(), get_tri_layer_upper_layer(), get_tri_layer_adjust_layer()); + } else { + layer_off(get_tri_layer_lower_layer()); + update_tri_layer(get_tri_layer_lower_layer(), get_tri_layer_upper_layer(), get_tri_layer_adjust_layer()); + } + return false; + case QK_TRI_LAYER_UPPER: + if (record->event.pressed) { + layer_on(get_tri_layer_upper_layer()); + update_tri_layer(get_tri_layer_lower_layer(), get_tri_layer_upper_layer(), get_tri_layer_adjust_layer()); + } else { + layer_off(get_tri_layer_upper_layer()); + update_tri_layer(get_tri_layer_lower_layer(), get_tri_layer_upper_layer(), get_tri_layer_adjust_layer()); + } + return false; + } + return true; +} diff --git a/quantum/process_keycode/process_tri_layer.h b/quantum/process_keycode/process_tri_layer.h new file mode 100644 index 0000000000..9c4e3df1c2 --- /dev/null +++ b/quantum/process_keycode/process_tri_layer.h @@ -0,0 +1,16 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "action.h" + +/** + * @brief Handles tri layer behavior + * + * @param keycode the keycode + * @param record the key record structure + * @return true continue handling keycodes + * @return false stop handling keycodes + */ +bool process_tri_layer(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c index 646471bc4d..3aa09d5948 100644 --- a/quantum/process_keycode/process_ucis.c +++ b/quantum/process_keycode/process_ucis.c @@ -19,20 +19,20 @@ #include "keycode.h" #include "wait.h" -qk_ucis_state_t qk_ucis_state; +ucis_state_t ucis_state; -void qk_ucis_start(void) { - qk_ucis_state.count = 0; - qk_ucis_state.in_progress = true; +void ucis_start(void) { + ucis_state.count = 0; + ucis_state.in_progress = true; - qk_ucis_start_user(); + ucis_start_user(); } -__attribute__((weak)) void qk_ucis_start_user(void) { +__attribute__((weak)) void ucis_start_user(void) { register_unicode(0x2328); // ⌨ } -__attribute__((weak)) void qk_ucis_success(uint8_t symbol_index) {} +__attribute__((weak)) void ucis_success(uint8_t symbol_index) {} static bool is_uni_seq(char *seq) { uint8_t i; @@ -43,20 +43,20 @@ static bool is_uni_seq(char *seq) { } else { keycode = seq[i] - 'a' + KC_A; } - if (i > qk_ucis_state.count || qk_ucis_state.codes[i] != keycode) { + if (i > ucis_state.count || ucis_state.codes[i] != keycode) { return false; } } - return qk_ucis_state.codes[i] == KC_ENTER || qk_ucis_state.codes[i] == KC_SPACE; + return ucis_state.codes[i] == KC_ENTER || ucis_state.codes[i] == KC_SPACE; } -__attribute__((weak)) void qk_ucis_symbol_fallback(void) { - for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { - tap_code(qk_ucis_state.codes[i]); +__attribute__((weak)) void ucis_symbol_fallback(void) { + for (uint8_t i = 0; i < ucis_state.count - 1; i++) { + tap_code(ucis_state.codes[i]); } } -__attribute__((weak)) void qk_ucis_cancel(void) {} +__attribute__((weak)) void ucis_cancel(void) {} void register_ucis(const uint32_t *code_points) { for (int i = 0; i < UCIS_MAX_CODE_POINTS && code_points[i]; i++) { @@ -65,38 +65,38 @@ void register_ucis(const uint32_t *code_points) { } bool process_ucis(uint16_t keycode, keyrecord_t *record) { - if (!qk_ucis_state.in_progress || !record->event.pressed) { + if (!ucis_state.in_progress || !record->event.pressed) { return true; } bool special = keycode == KC_SPACE || keycode == KC_ENTER || keycode == KC_ESCAPE || keycode == KC_BACKSPACE; - if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) { + if (ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) { return false; } - qk_ucis_state.codes[qk_ucis_state.count] = keycode; - qk_ucis_state.count++; + ucis_state.codes[ucis_state.count] = keycode; + ucis_state.count++; switch (keycode) { case KC_BACKSPACE: - if (qk_ucis_state.count >= 2) { - qk_ucis_state.count -= 2; + if (ucis_state.count >= 2) { + ucis_state.count -= 2; return true; } else { - qk_ucis_state.count--; + ucis_state.count--; return false; } case KC_SPACE: case KC_ENTER: case KC_ESCAPE: - for (uint8_t i = 0; i < qk_ucis_state.count; i++) { + for (uint8_t i = 0; i < ucis_state.count; i++) { tap_code(KC_BACKSPACE); } if (keycode == KC_ESCAPE) { - qk_ucis_state.in_progress = false; - qk_ucis_cancel(); + ucis_state.in_progress = false; + ucis_cancel(); return false; } @@ -110,12 +110,12 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { } } if (symbol_found) { - qk_ucis_success(i); + ucis_success(i); } else { - qk_ucis_symbol_fallback(); + ucis_symbol_fallback(); } - qk_ucis_state.in_progress = false; + ucis_state.in_progress = false; return false; default: diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h index 3de0707762..54eb9413d4 100644 --- a/quantum/process_keycode/process_ucis.h +++ b/quantum/process_keycode/process_ucis.h @@ -31,15 +31,15 @@ typedef struct { char * symbol; uint32_t code_points[UCIS_MAX_CODE_POINTS]; -} qk_ucis_symbol_t; +} ucis_symbol_t; typedef struct { uint8_t count; uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; bool in_progress : 1; -} qk_ucis_state_t; +} ucis_state_t; -extern qk_ucis_state_t qk_ucis_state; +extern ucis_state_t ucis_state; // clang-format off @@ -53,12 +53,12 @@ extern qk_ucis_state_t qk_ucis_state; // clang-format on -extern const qk_ucis_symbol_t ucis_symbol_table[]; +extern const ucis_symbol_t ucis_symbol_table[]; -void qk_ucis_start(void); -void qk_ucis_start_user(void); -void qk_ucis_symbol_fallback(void); -void qk_ucis_success(uint8_t symbol_index); +void ucis_start(void); +void ucis_start_user(void); +void ucis_symbol_fallback(void); +void ucis_success(uint8_t symbol_index); void register_ucis(const uint32_t *code_points); diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index 73f5449864..5a3aeb0000 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -22,7 +22,7 @@ #include "action.h" #include "progmem.h" -extern const uint32_t PROGMEM unicode_map[]; +extern const uint32_t unicode_map[] PROGMEM; uint16_t unicodemap_index(uint16_t keycode); bool process_unicodemap(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/quantum.c b/quantum/quantum.c index e7dc71e5d7..0587f215fe 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -76,7 +76,7 @@ void do_code16(uint16_t code, void (*f)(uint8_t)) { } __attribute__((weak)) void register_code16(uint16_t code) { - if (IS_MOD(code) || code == KC_NO) { + if (IS_MODIFIER_KEYCODE(code) || code == KC_NO) { do_code16(code, register_mods); } else { do_code16(code, register_weak_mods); @@ -86,7 +86,7 @@ __attribute__((weak)) void register_code16(uint16_t code) { __attribute__((weak)) void unregister_code16(uint16_t code) { unregister_code(code); - if (IS_MOD(code) || code == KC_NO) { + if (IS_MODIFIER_KEYCODE(code) || code == KC_NO) { do_code16(code, unregister_mods); } else { do_code16(code, unregister_weak_mods); @@ -238,6 +238,14 @@ bool process_record_quantum(keyrecord_t *record) { } #endif +#ifdef TAP_DANCE_ENABLE + if (preprocess_tap_dance(keycode, record)) { + // The tap dance might have updated the layer state, therefore the + // result of the keycode lookup might change. + keycode = get_record_keycode(record, true); + } +#endif + #ifdef VELOCIKEY_ENABLE if (velocikey_enabled() && record->event.pressed) { velocikey_accelerate(); @@ -250,14 +258,6 @@ bool process_record_quantum(keyrecord_t *record) { } #endif -#ifdef TAP_DANCE_ENABLE - if (preprocess_tap_dance(keycode, record)) { - // The tap dance might have updated the layer state, therefore the - // result of the keycode lookup might change. - keycode = get_record_keycode(record, true); - } -#endif - if (!( #if defined(KEY_LOCK_ENABLE) // Must run first to be able to mask key_up events. @@ -343,6 +343,9 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef AUTOCORRECT_ENABLE process_autocorrect(keycode, record) && #endif +#ifdef TRI_LAYER_ENABLE + process_tri_layer(keycode, record) && +#endif true)) { return false; } @@ -443,31 +446,13 @@ void set_single_persistent_default_layer(uint8_t default_layer) { default_layer_set((layer_state_t)1 << default_layer); } -layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - layer_state_t mask12 = ((layer_state_t)1 << layer1) | ((layer_state_t)1 << layer2); - layer_state_t mask3 = (layer_state_t)1 << layer3; - return (state & mask12) == mask12 ? (state | mask3) : (state & ~mask3); -} - -void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - layer_state_set(update_tri_layer_state(layer_state, layer1, layer2, layer3)); -} - -// TODO: remove legacy api -void matrix_init_quantum() { - matrix_init_kb(); -} -void matrix_scan_quantum() { - matrix_scan_kb(); -} - //------------------------------------------------------------------------------ // Override these functions in your keymap file to play different tunes on // different events such as startup and bootloader jump -__attribute__((weak)) void startup_user() {} +__attribute__((weak)) void startup_user(void) {} -__attribute__((weak)) void shutdown_user() {} +__attribute__((weak)) void shutdown_user(void) {} void suspend_power_down_quantum(void) { suspend_power_down_kb(); diff --git a/quantum/quantum.h b/quantum/quantum.h index c8dfdeca75..315fa25568 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -42,7 +42,6 @@ #include "bootmagic.h" #include "timer.h" #include "sync_timer.h" -#include "config_common.h" #include "gpio.h" #include "atomic_util.h" #include "led.h" @@ -75,6 +74,7 @@ extern layer_state_t layer_state; #ifdef AUDIO_ENABLE # include "audio.h" # include "process_audio.h" +# include "song_list.h" # ifdef AUDIO_CLICKY # include "process_clicky.h" # endif @@ -93,6 +93,7 @@ extern layer_state_t layer_state; #endif #ifdef LEADER_ENABLE +# include "leader.h" # include "process_leader.h" #endif @@ -240,9 +241,10 @@ extern layer_state_t layer_state; # include "process_autocorrect.h" #endif -// For tri-layer -void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); -layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3); +#ifdef TRI_LAYER_ENABLE +# include "tri_layer.h" +# include "process_tri_layer.h" +#endif void set_single_persistent_default_layer(uint8_t default_layer); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 688fb892eb..9933d5c989 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -33,10 +33,6 @@ #define QK_RSFT 0x1200 #define QK_RALT 0x1400 #define QK_RGUI 0x1800 -#define QK_UNICODEMAP 0x8000 -#define QK_UNICODEMAP_MAX 0xBFFF -#define QK_UNICODEMAP_PAIR 0xC000 -#define QK_UNICODEMAP_PAIR_MAX 0xFFFF // clang-format on // Generic decoding for the whole QK_MODS range diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h index 305b89a569..28634d00f7 100644 --- a/quantum/quantum_keycodes_legacy.h +++ b/quantum/quantum_keycodes_legacy.h @@ -3,285 +3,4 @@ // clang-format off // Deprecated Quantum keycodes -#define KC_LEAD QK_LEADER -#define KC_LOCK QK_LOCK - -#define KC_ASUP QK_AUTO_SHIFT_UP -#define KC_ASDN QK_AUTO_SHIFT_DOWN -#define KC_ASRP QK_AUTO_SHIFT_REPORT -#define KC_ASTG QK_AUTO_SHIFT_TOGGLE -#define KC_ASON QK_AUTO_SHIFT_ON -#define KC_ASOFF QK_AUTO_SHIFT_OFF - -#define VLK_TOG QK_VELOCIKEY_TOGGLE -#define CAPSWRD QK_CAPS_WORD_TOGGLE -#define CAPS_WORD QK_CAPS_WORD_TOGGLE - -#define KEY_OVERRIDE_TOGGLE QK_KEY_OVERRIDE_TOGGLE -#define KEY_OVERRIDE_ON QK_KEY_OVERRIDE_ON -#define KEY_OVERRIDE_OFF QK_KEY_OVERRIDE_OFF - -#define ONESHOT_ENABLE QK_ONE_SHOT_ON -#define ONESHOT_DISABLE QK_ONE_SHOT_OFF -#define ONESHOT_TOGGLE QK_ONE_SHOT_TOGGLE - -#define CMB_ON QK_COMBO_ON -#define CMB_OFF QK_COMBO_OFF -#define CMB_TOG QK_COMBO_TOGGLE - -#define UC_MOD QK_UNICODE_MODE_NEXT -#define UC_RMOD QK_UNICODE_MODE_PREVIOUS -#define UC_M_MA QK_UNICODE_MODE_MACOS -#define UC_M_LN QK_UNICODE_MODE_LINUX -#define UC_M_WI QK_UNICODE_MODE_WINDOWS -#define UC_M_BS QK_UNICODE_MODE_BSD -#define UC_M_WC QK_UNICODE_MODE_WINCOMPOSE -#define UC_M_EM QK_UNICODE_MODE_EMACS - -#define DYN_REC_START1 QK_DYNAMIC_MACRO_RECORD_START_1 -#define DYN_REC_START2 QK_DYNAMIC_MACRO_RECORD_START_2 -#define DYN_REC_STOP QK_DYNAMIC_MACRO_RECORD_STOP -#define DYN_MACRO_PLAY1 QK_DYNAMIC_MACRO_PLAY_1 -#define DYN_MACRO_PLAY2 QK_DYNAMIC_MACRO_PLAY_2 - -#define PROGRAMMABLE_BUTTON_1 QK_PROGRAMMABLE_BUTTON_1 -#define PROGRAMMABLE_BUTTON_2 QK_PROGRAMMABLE_BUTTON_2 -#define PROGRAMMABLE_BUTTON_3 QK_PROGRAMMABLE_BUTTON_3 -#define PROGRAMMABLE_BUTTON_4 QK_PROGRAMMABLE_BUTTON_4 -#define PROGRAMMABLE_BUTTON_5 QK_PROGRAMMABLE_BUTTON_5 -#define PROGRAMMABLE_BUTTON_6 QK_PROGRAMMABLE_BUTTON_6 -#define PROGRAMMABLE_BUTTON_7 QK_PROGRAMMABLE_BUTTON_7 -#define PROGRAMMABLE_BUTTON_8 QK_PROGRAMMABLE_BUTTON_8 -#define PROGRAMMABLE_BUTTON_9 QK_PROGRAMMABLE_BUTTON_9 -#define PROGRAMMABLE_BUTTON_10 QK_PROGRAMMABLE_BUTTON_10 -#define PROGRAMMABLE_BUTTON_11 QK_PROGRAMMABLE_BUTTON_11 -#define PROGRAMMABLE_BUTTON_12 QK_PROGRAMMABLE_BUTTON_12 -#define PROGRAMMABLE_BUTTON_13 QK_PROGRAMMABLE_BUTTON_13 -#define PROGRAMMABLE_BUTTON_14 QK_PROGRAMMABLE_BUTTON_14 -#define PROGRAMMABLE_BUTTON_15 QK_PROGRAMMABLE_BUTTON_15 -#define PROGRAMMABLE_BUTTON_16 QK_PROGRAMMABLE_BUTTON_16 -#define PROGRAMMABLE_BUTTON_17 QK_PROGRAMMABLE_BUTTON_17 -#define PROGRAMMABLE_BUTTON_18 QK_PROGRAMMABLE_BUTTON_18 -#define PROGRAMMABLE_BUTTON_19 QK_PROGRAMMABLE_BUTTON_19 -#define PROGRAMMABLE_BUTTON_20 QK_PROGRAMMABLE_BUTTON_20 -#define PROGRAMMABLE_BUTTON_21 QK_PROGRAMMABLE_BUTTON_21 -#define PROGRAMMABLE_BUTTON_22 QK_PROGRAMMABLE_BUTTON_22 -#define PROGRAMMABLE_BUTTON_23 QK_PROGRAMMABLE_BUTTON_23 -#define PROGRAMMABLE_BUTTON_24 QK_PROGRAMMABLE_BUTTON_24 -#define PROGRAMMABLE_BUTTON_25 QK_PROGRAMMABLE_BUTTON_25 -#define PROGRAMMABLE_BUTTON_26 QK_PROGRAMMABLE_BUTTON_26 -#define PROGRAMMABLE_BUTTON_27 QK_PROGRAMMABLE_BUTTON_27 -#define PROGRAMMABLE_BUTTON_28 QK_PROGRAMMABLE_BUTTON_28 -#define PROGRAMMABLE_BUTTON_29 QK_PROGRAMMABLE_BUTTON_29 -#define PROGRAMMABLE_BUTTON_30 QK_PROGRAMMABLE_BUTTON_30 -#define PROGRAMMABLE_BUTTON_31 QK_PROGRAMMABLE_BUTTON_31 -#define PROGRAMMABLE_BUTTON_32 QK_PROGRAMMABLE_BUTTON_32 - -#define JS_BUTTON0 QK_JOYSTICK_BUTTON_0 -#define JS_BUTTON1 QK_JOYSTICK_BUTTON_1 -#define JS_BUTTON2 QK_JOYSTICK_BUTTON_2 -#define JS_BUTTON3 QK_JOYSTICK_BUTTON_3 -#define JS_BUTTON4 QK_JOYSTICK_BUTTON_4 -#define JS_BUTTON5 QK_JOYSTICK_BUTTON_5 -#define JS_BUTTON6 QK_JOYSTICK_BUTTON_6 -#define JS_BUTTON7 QK_JOYSTICK_BUTTON_7 -#define JS_BUTTON8 QK_JOYSTICK_BUTTON_8 -#define JS_BUTTON9 QK_JOYSTICK_BUTTON_9 -#define JS_BUTTON10 QK_JOYSTICK_BUTTON_10 -#define JS_BUTTON11 QK_JOYSTICK_BUTTON_11 -#define JS_BUTTON12 QK_JOYSTICK_BUTTON_12 -#define JS_BUTTON13 QK_JOYSTICK_BUTTON_13 -#define JS_BUTTON14 QK_JOYSTICK_BUTTON_14 -#define JS_BUTTON15 QK_JOYSTICK_BUTTON_15 -#define JS_BUTTON16 QK_JOYSTICK_BUTTON_16 -#define JS_BUTTON17 QK_JOYSTICK_BUTTON_17 -#define JS_BUTTON18 QK_JOYSTICK_BUTTON_18 -#define JS_BUTTON19 QK_JOYSTICK_BUTTON_19 -#define JS_BUTTON20 QK_JOYSTICK_BUTTON_20 -#define JS_BUTTON21 QK_JOYSTICK_BUTTON_21 -#define JS_BUTTON22 QK_JOYSTICK_BUTTON_22 -#define JS_BUTTON23 QK_JOYSTICK_BUTTON_23 -#define JS_BUTTON24 QK_JOYSTICK_BUTTON_24 -#define JS_BUTTON25 QK_JOYSTICK_BUTTON_25 -#define JS_BUTTON26 QK_JOYSTICK_BUTTON_26 -#define JS_BUTTON27 QK_JOYSTICK_BUTTON_27 -#define JS_BUTTON28 QK_JOYSTICK_BUTTON_28 -#define JS_BUTTON29 QK_JOYSTICK_BUTTON_29 -#define JS_BUTTON30 QK_JOYSTICK_BUTTON_30 -#define JS_BUTTON31 QK_JOYSTICK_BUTTON_31 - -#define SECURE_LOCK QK_SECURE_LOCK -#define SECURE_UNLOCK QK_SECURE_UNLOCK -#define SECURE_TOGGLE QK_SECURE_TOGGLE -#define SECURE_REQUEST QK_SECURE_REQUEST - -#define KC_LSPO QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN -#define KC_RSPC QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE -#define KC_LCPO QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN -#define KC_RCPC QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE -#define KC_LAPO QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN -#define KC_RAPC QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE -#define KC_SFTENT QK_SPACE_CADET_RIGHT_SHIFT_ENTER - -#define BL_DEC QK_BACKLIGHT_DOWN -#define BL_INC QK_BACKLIGHT_UP - -#define AU_TOG QK_AUDIO_TOGGLE -#define CLICKY_TOGGLE QK_AUDIO_CLICKY_TOGGLE -#define CLICKY_ENABLE QK_AUDIO_CLICKY_ON -#define CLICKY_DISABLE QK_AUDIO_CLICKY_OFF -#define CLICKY_UP QK_AUDIO_CLICKY_UP -#define CLICKY_DOWN QK_AUDIO_CLICKY_DOWN -#define CLICKY_RESET QK_AUDIO_CLICKY_RESET -#define MU_TOG QK_MUSIC_TOGGLE -#define MU_MOD QK_MUSIC_MODE_NEXT -#define MUV_IN QK_AUDIO_VOICE_NEXT -#define MUV_DE QK_AUDIO_VOICE_PREVIOUS - -#define MI_TOG QK_MIDI_TOGGLE -#define MI_C_1 QK_MIDI_NOTE_C_1 -#define MI_Cs_1 QK_MIDI_NOTE_C_SHARP_1 -#define MI_Db_1 QK_MIDI_NOTE_C_SHARP_1 -#define MI_D_1 QK_MIDI_NOTE_D_1 -#define MI_Ds_1 QK_MIDI_NOTE_D_SHARP_1 -#define MI_Eb_1 QK_MIDI_NOTE_D_SHARP_1 -#define MI_E_1 QK_MIDI_NOTE_E_1 -#define MI_F_1 QK_MIDI_NOTE_F_1 -#define MI_Fs_1 QK_MIDI_NOTE_F_SHARP_1 -#define MI_Gb_1 QK_MIDI_NOTE_F_SHARP_1 -#define MI_G_1 QK_MIDI_NOTE_G_1 -#define MI_Gs_1 QK_MIDI_NOTE_G_SHARP_1 -#define MI_Ab_1 QK_MIDI_NOTE_G_SHARP_1 -#define MI_A_1 QK_MIDI_NOTE_A_1 -#define MI_As_1 QK_MIDI_NOTE_A_SHARP_1 -#define MI_Bb_1 QK_MIDI_NOTE_A_SHARP_1 -#define MI_B_1 QK_MIDI_NOTE_B_1 -#define MI_C_2 QK_MIDI_NOTE_C_2 -#define MI_Cs_2 QK_MIDI_NOTE_C_SHARP_2 -#define MI_Db_2 QK_MIDI_NOTE_C_SHARP_2 -#define MI_D_2 QK_MIDI_NOTE_D_2 -#define MI_Ds_2 QK_MIDI_NOTE_D_SHARP_2 -#define MI_Eb_2 QK_MIDI_NOTE_D_SHARP_2 -#define MI_E_2 QK_MIDI_NOTE_E_2 -#define MI_F_2 QK_MIDI_NOTE_F_2 -#define MI_Fs_2 QK_MIDI_NOTE_F_SHARP_2 -#define MI_Gb_2 QK_MIDI_NOTE_F_SHARP_2 -#define MI_G_2 QK_MIDI_NOTE_G_2 -#define MI_Gs_2 QK_MIDI_NOTE_G_SHARP_2 -#define MI_Ab_2 QK_MIDI_NOTE_G_SHARP_2 -#define MI_A_2 QK_MIDI_NOTE_A_2 -#define MI_As_2 QK_MIDI_NOTE_A_SHARP_2 -#define MI_Bb_2 QK_MIDI_NOTE_A_SHARP_2 -#define MI_B_2 QK_MIDI_NOTE_B_2 -#define MI_C_3 QK_MIDI_NOTE_C_3 -#define MI_Cs_3 QK_MIDI_NOTE_C_SHARP_3 -#define MI_Db_3 QK_MIDI_NOTE_C_SHARP_3 -#define MI_D_3 QK_MIDI_NOTE_D_3 -#define MI_Ds_3 QK_MIDI_NOTE_D_SHARP_3 -#define MI_Eb_3 QK_MIDI_NOTE_D_SHARP_3 -#define MI_E_3 QK_MIDI_NOTE_E_3 -#define MI_F_3 QK_MIDI_NOTE_F_3 -#define MI_Fs_3 QK_MIDI_NOTE_F_SHARP_3 -#define MI_Gb_3 QK_MIDI_NOTE_F_SHARP_3 -#define MI_G_3 QK_MIDI_NOTE_G_3 -#define MI_Gs_3 QK_MIDI_NOTE_G_SHARP_3 -#define MI_Ab_3 QK_MIDI_NOTE_G_SHARP_3 -#define MI_A_3 QK_MIDI_NOTE_A_3 -#define MI_As_3 QK_MIDI_NOTE_A_SHARP_3 -#define MI_Bb_3 QK_MIDI_NOTE_A_SHARP_3 -#define MI_B_3 QK_MIDI_NOTE_B_3 -#define MI_C_4 QK_MIDI_NOTE_C_4 -#define MI_Cs_4 QK_MIDI_NOTE_C_SHARP_4 -#define MI_Db_4 QK_MIDI_NOTE_C_SHARP_4 -#define MI_D_4 QK_MIDI_NOTE_D_4 -#define MI_Ds_4 QK_MIDI_NOTE_D_SHARP_4 -#define MI_Eb_4 QK_MIDI_NOTE_D_SHARP_4 -#define MI_E_4 QK_MIDI_NOTE_E_4 -#define MI_F_4 QK_MIDI_NOTE_F_4 -#define MI_Fs_4 QK_MIDI_NOTE_F_SHARP_4 -#define MI_Gb_4 QK_MIDI_NOTE_F_SHARP_4 -#define MI_G_4 QK_MIDI_NOTE_G_4 -#define MI_Gs_4 QK_MIDI_NOTE_G_SHARP_4 -#define MI_Ab_4 QK_MIDI_NOTE_G_SHARP_4 -#define MI_A_4 QK_MIDI_NOTE_A_4 -#define MI_As_4 QK_MIDI_NOTE_A_SHARP_4 -#define MI_Bb_4 QK_MIDI_NOTE_A_SHARP_4 -#define MI_B_4 QK_MIDI_NOTE_B_4 -#define MI_C_5 QK_MIDI_NOTE_C_5 -#define MI_Cs_5 QK_MIDI_NOTE_C_SHARP_5 -#define MI_Db_5 QK_MIDI_NOTE_C_SHARP_5 -#define MI_D_5 QK_MIDI_NOTE_D_5 -#define MI_Ds_5 QK_MIDI_NOTE_D_SHARP_5 -#define MI_Eb_5 QK_MIDI_NOTE_D_SHARP_5 -#define MI_E_5 QK_MIDI_NOTE_E_5 -#define MI_F_5 QK_MIDI_NOTE_F_5 -#define MI_Fs_5 QK_MIDI_NOTE_F_SHARP_5 -#define MI_Gb_5 QK_MIDI_NOTE_F_SHARP_5 -#define MI_G_5 QK_MIDI_NOTE_G_5 -#define MI_Gs_5 QK_MIDI_NOTE_G_SHARP_5 -#define MI_Ab_5 QK_MIDI_NOTE_G_SHARP_5 -#define MI_A_5 QK_MIDI_NOTE_A_5 -#define MI_As_5 QK_MIDI_NOTE_A_SHARP_5 -#define MI_Bb_5 QK_MIDI_NOTE_A_SHARP_5 -#define MI_B_5 QK_MIDI_NOTE_B_5 -#define MI_OCT_N2 QK_MIDI_OCTAVE_N2 -#define MI_OCT_N1 QK_MIDI_OCTAVE_N1 -#define MI_OCT_0 QK_MIDI_OCTAVE_0 -#define MI_OCT_1 QK_MIDI_OCTAVE_1 -#define MI_OCT_2 QK_MIDI_OCTAVE_2 -#define MI_OCT_3 QK_MIDI_OCTAVE_3 -#define MI_OCT_4 QK_MIDI_OCTAVE_4 -#define MI_OCT_5 QK_MIDI_OCTAVE_5 -#define MI_OCT_6 QK_MIDI_OCTAVE_6 -#define MI_OCT_7 QK_MIDI_OCTAVE_7 -#define MI_TRNS_N6 QK_MIDI_TRANSPOSE_N6 -#define MI_TRNS_N5 QK_MIDI_TRANSPOSE_N5 -#define MI_TRNS_N4 QK_MIDI_TRANSPOSE_N4 -#define MI_TRNS_N3 QK_MIDI_TRANSPOSE_N3 -#define MI_TRNS_N2 QK_MIDI_TRANSPOSE_N2 -#define MI_TRNS_N1 QK_MIDI_TRANSPOSE_N1 -#define MI_TRNS_0 QK_MIDI_TRANSPOSE_0 -#define MI_TRNS_1 QK_MIDI_TRANSPOSE_1 -#define MI_TRNS_2 QK_MIDI_TRANSPOSE_2 -#define MI_TRNS_3 QK_MIDI_TRANSPOSE_3 -#define MI_TRNS_4 QK_MIDI_TRANSPOSE_4 -#define MI_TRNS_5 QK_MIDI_TRANSPOSE_5 -#define MI_TRNS_6 QK_MIDI_TRANSPOSE_6 -#define MI_TRNSD QK_MIDI_TRANSPOSE_DOWN -#define MI_TRNSU QK_MIDI_TRANSPOSE_UP -#define MI_VEL_0 QK_MIDI_VELOCITY_0 -#define MI_VEL_1 QK_MIDI_VELOCITY_1 -#define MI_VEL_2 QK_MIDI_VELOCITY_2 -#define MI_VEL_3 QK_MIDI_VELOCITY_3 -#define MI_VEL_4 QK_MIDI_VELOCITY_4 -#define MI_VEL_5 QK_MIDI_VELOCITY_5 -#define MI_VEL_6 QK_MIDI_VELOCITY_6 -#define MI_VEL_7 QK_MIDI_VELOCITY_7 -#define MI_VEL_8 QK_MIDI_VELOCITY_8 -#define MI_VEL_9 QK_MIDI_VELOCITY_9 -#define MI_VEL_10 QK_MIDI_VELOCITY_10 -#define MI_CHD QK_MIDI_CHANNEL_DOWN -#define MI_CHU QK_MIDI_CHANNEL_UP -#define MI_ALLOFF QK_MIDI_ALL_NOTES_OFF -#define MI_MODSD QK_MIDI_MODULATION_SPEED_DOWN -#define MI_MODSU QK_MIDI_MODULATION_SPEED_UP -#define MI_BENDD QK_MIDI_PITCH_BEND_DOWN -#define MI_BENDU QK_MIDI_PITCH_BEND_UP - -#define HPT_ON QK_HAPTIC_ON -#define HPT_OFF QK_HAPTIC_OFF -#define HPT_TOG QK_HAPTIC_TOGGLE -#define HPT_RST QK_HAPTIC_RESET -#define HPT_FBK QK_HAPTIC_FEEDBACK_TOGGLE -#define HPT_BUZ QK_HAPTIC_BUZZ_TOGGLE -#define HPT_MODI QK_HAPTIC_MODE_NEXT -#define HPT_MODD QK_HAPTIC_MODE_PREVIOUS -#define HPT_CONT QK_HAPTIC_CONTINUOUS_TOGGLE -#define HPT_CONI QK_HAPTIC_CONTINUOUS_UP -#define HPT_COND QK_HAPTIC_CONTINUOUS_DOWN -#define HPT_DWLI QK_HAPTIC_DWELL_UP -#define HPT_DWLD QK_HAPTIC_DWELL_DOWN - -#define TERM_ON _Static_assert(false, "The Terminal feature has been removed from QMK. Please remove use of TERM_ON/TERM_OFF from your keymap.") -#define TERM_OFF _Static_assert(false, "The Terminal feature has been removed from QMK.. Please remove use of TERM_ON/TERM_OFF from your keymap.") -// #define RESET _Static_assert(false, "The RESET keycode has been removed from QMK.. Please remove use from your keymap.") +#define SH_TG QK_SWAP_HANDS_TOGGLE diff --git a/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h index 69bf265d14..6bde60053b 100644 --- a/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h +++ b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h @@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS) static void jellybean_raindrops_set_color(int i, effect_params_t* params) { if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; - HSV hsv = {rand() & 0xFF, qadd8(rand() & 0x7F, 0x80), rgb_matrix_config.hsv.v}; + HSV hsv = {random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v}; RGB rgb = rgb_matrix_hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } @@ -13,7 +13,7 @@ bool JELLYBEAN_RAINDROPS(effect_params_t* params) { if (!params->init) { // Change one LED every tick, make sure speed is not 0 if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { - jellybean_raindrops_set_color(rand() % RGB_MATRIX_LED_COUNT, params); + jellybean_raindrops_set_color(random8_max(RGB_MATRIX_LED_COUNT), params); } return false; } diff --git a/quantum/rgb_matrix/animations/pixel_flow_anim.h b/quantum/rgb_matrix/animations/pixel_flow_anim.h index 8628c3c2ec..27567b4f3a 100644 --- a/quantum/rgb_matrix/animations/pixel_flow_anim.h +++ b/quantum/rgb_matrix/animations/pixel_flow_anim.h @@ -22,7 +22,7 @@ static bool PIXEL_FLOW(effect_params_t* params) { // Clear LEDs and fill the state array rgb_matrix_set_color_all(0, 0, 0); for (uint8_t j = 0; j < RGB_MATRIX_LED_COUNT; ++j) { - led[j] = (random8() & 2) ? (RGB){0, 0, 0} : hsv_to_rgb((HSV){random8(), qadd8(random8() >> 1, 127), rgb_matrix_config.hsv.v}); + led[j] = (random8() & 2) ? (RGB){0, 0, 0} : hsv_to_rgb((HSV){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v}); } } @@ -39,7 +39,7 @@ static bool PIXEL_FLOW(effect_params_t* params) { led[j] = led[j + 1]; } // Fill last LED - led[led_max - 1] = (random8() & 2) ? (RGB){0, 0, 0} : hsv_to_rgb((HSV){random8(), qadd8(random8() >> 1, 127), rgb_matrix_config.hsv.v}); + led[led_max - 1] = (random8() & 2) ? (RGB){0, 0, 0} : hsv_to_rgb((HSV){random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v}); // Set pulse timer wait_timer = g_rgb_timer + interval(); } diff --git a/quantum/rgb_matrix/animations/pixel_rain_anim.h b/quantum/rgb_matrix/animations/pixel_rain_anim.h index fded60340f..9d63f451e2 100644 --- a/quantum/rgb_matrix/animations/pixel_rain_anim.h +++ b/quantum/rgb_matrix/animations/pixel_rain_anim.h @@ -1,18 +1,5 @@ -/* Copyright (C) 2021 @filterpaper - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2022 @filterpaper +// SPDX-License-Identifier: GPL-2.0+ #ifdef ENABLE_RGB_MATRIX_PIXEL_RAIN RGB_MATRIX_EFFECT(PIXEL_RAIN) @@ -25,23 +12,23 @@ static bool PIXEL_RAIN(effect_params_t* params) { return 500 / scale16by8(qadd8(rgb_matrix_config.speed, 16), 16); } - void rain_pixel(uint8_t i, effect_params_t * params, bool off) { - if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) { + inline void rain_pixel(uint8_t led_index) { + if (!HAS_ANY_FLAGS(g_led_config.flags[led_index], params->flags)) { return; } - if (off) { - rgb_matrix_set_color(i, 0, 0, 0); + if (random8() & 2) { + rgb_matrix_set_color(led_index, 0, 0, 0); } else { - HSV hsv = {random8(), qadd8(random8() >> 1, 127), rgb_matrix_config.hsv.v}; + HSV hsv = {random8(), random8_min_max(127, 255), rgb_matrix_config.hsv.v}; RGB rgb = rgb_matrix_hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + rgb_matrix_set_color(led_index, rgb.r, rgb.g, rgb.b); } wait_timer = g_rgb_timer + interval(); } RGB_MATRIX_USE_LIMITS(led_min, led_max); if (g_rgb_timer > wait_timer) { - rain_pixel(mod8(random8(), RGB_MATRIX_LED_COUNT), params, random8() & 2); + rain_pixel(random8_max(RGB_MATRIX_LED_COUNT)); } return rgb_matrix_check_finished_leds(led_max); } diff --git a/quantum/rgb_matrix/animations/raindrops_anim.h b/quantum/rgb_matrix/animations/raindrops_anim.h index 6b92d649ad..e8e1f6de04 100644 --- a/quantum/rgb_matrix/animations/raindrops_anim.h +++ b/quantum/rgb_matrix/animations/raindrops_anim.h @@ -24,7 +24,7 @@ bool RAINDROPS(effect_params_t* params) { if (!params->init) { // Change one LED every tick, make sure speed is not 0 if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { - raindrops_set_color(random8() % RGB_MATRIX_LED_COUNT, params); + raindrops_set_color(random8_max(RGB_MATRIX_LED_COUNT), params); } } else { for (int i = led_min; i < led_max; i++) { diff --git a/quantum/rgb_matrix/animations/solid_reactive_anim.h b/quantum/rgb_matrix/animations/solid_reactive_anim.h index 052bfb22fd..edf6041350 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_anim.h +++ b/quantum/rgb_matrix/animations/solid_reactive_anim.h @@ -5,7 +5,7 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE) static HSV SOLID_REACTIVE_math(HSV hsv, uint16_t offset) { # ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE - hsv.h = scale16by8(g_rgb_timer, add8(rgb_matrix_config.speed, 1) >> 6); + hsv.h = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 8) >> 4); # endif hsv.h += qsub8(130, offset); return hsv; diff --git a/quantum/rgb_matrix/animations/solid_reactive_cross.h b/quantum/rgb_matrix/animations/solid_reactive_cross.h index 9e5703a0ea..a18d6b03dd 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_cross.h +++ b/quantum/rgb_matrix/animations/solid_reactive_cross.h @@ -20,7 +20,7 @@ static HSV SOLID_REACTIVE_CROSS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t di effect += dx > dy ? dy : dx; if (effect > 255) effect = 255; # ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE - hsv.h = scale16by8(g_rgb_timer, add8(rgb_matrix_config.speed, 1) >> 6); + hsv.h = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 8) >> 4); # endif hsv.v = qadd8(hsv.v, 255 - effect); return hsv; diff --git a/quantum/rgb_matrix/animations/solid_reactive_nexus.h b/quantum/rgb_matrix/animations/solid_reactive_nexus.h index 64f5064cf9..53cc008616 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_nexus.h +++ b/quantum/rgb_matrix/animations/solid_reactive_nexus.h @@ -17,10 +17,11 @@ static HSV SOLID_REACTIVE_NEXUS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t di if (dist > 72) effect = 255; if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255; # ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE - hsv.h = scale16by8(g_rgb_timer, add8(rgb_matrix_config.speed, 1) >> 6); + hsv.h = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 8) >> 4) + dy / 4; +# else + hsv.h = rgb_matrix_config.hsv.h + dy / 4; # endif hsv.v = qadd8(hsv.v, 255 - effect); - hsv.h = rgb_matrix_config.hsv.h + dy / 4; return hsv; } diff --git a/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h index bd3ce0817d..7f4e48747a 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h +++ b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h @@ -5,7 +5,7 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) static HSV SOLID_REACTIVE_SIMPLE_math(HSV hsv, uint16_t offset) { # ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE - hsv.h = scale16by8(g_rgb_timer, add8(rgb_matrix_config.speed, 1) >> 6); + hsv.h = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 8) >> 4); # endif hsv.v = scale8(255 - offset, hsv.v); return hsv; diff --git a/quantum/rgb_matrix/animations/solid_reactive_wide.h b/quantum/rgb_matrix/animations/solid_reactive_wide.h index 24fedc2020..feca126648 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_wide.h +++ b/quantum/rgb_matrix/animations/solid_reactive_wide.h @@ -15,7 +15,7 @@ static HSV SOLID_REACTIVE_WIDE_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dis uint16_t effect = tick + dist * 5; if (effect > 255) effect = 255; # ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE - hsv.h = scale16by8(g_rgb_timer, add8(rgb_matrix_config.speed, 1) >> 6); + hsv.h = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 8) >> 4); # endif hsv.v = qadd8(hsv.v, 255 - effect); return hsv; diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index e7125bb87f..bbb706da69 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -18,7 +18,6 @@ #include "rgb_matrix.h" #include "progmem.h" -#include "config.h" #include "eeprom.h" #include <string.h> #include <math.h> diff --git a/quantum/rgblight/rgblight.h b/quantum/rgblight/rgblight.h index 46e8e07212..7693888462 100644 --- a/quantum/rgblight/rgblight.h +++ b/quantum/rgblight/rgblight.h @@ -68,23 +68,6 @@ |-----------------|-----------------------------------| *****/ -#ifdef RGBLIGHT_ANIMATIONS -// for backward compatibility -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_RAINBOW_MOOD -# define RGBLIGHT_EFFECT_RAINBOW_SWIRL -# define RGBLIGHT_EFFECT_SNAKE -# define RGBLIGHT_EFFECT_KNIGHT -# define RGBLIGHT_EFFECT_CHRISTMAS -# define RGBLIGHT_EFFECT_STATIC_GRADIENT -# define RGBLIGHT_EFFECT_RGB_TEST -# define RGBLIGHT_EFFECT_ALTERNATING -#endif - -#ifdef RGBLIGHT_STATIC_PATTERNS -# define RGBLIGHT_EFFECT_STATIC_GRADIENT -#endif - // clang-format off // check dynamic animation effects chose ? diff --git a/quantum/rgblight/rgblight_breathe_table.h b/quantum/rgblight/rgblight_breathe_table.h index 89a3ba474c..5c7660ab6a 100644 --- a/quantum/rgblight/rgblight_breathe_table.h +++ b/quantum/rgblight/rgblight_breathe_table.h @@ -1,4 +1,4 @@ -// Copyright 2022 QMK +// Copyright 2023 QMK // SPDX-License-Identifier: GPL-2.0-or-later /******************************************************************************* diff --git a/quantum/ring_buffer.h b/quantum/ring_buffer.h index 85419de11b..54b2bfffd1 100644 --- a/quantum/ring_buffer.h +++ b/quantum/ring_buffer.h @@ -1,8 +1,8 @@ #pragma once -#include <util/atomic.h> #include <stdint.h> #include <stdbool.h> +#include "atomic_util.h" #ifndef RBUF_SIZE # define RBUF_SIZE 32 diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 9f57c7b9fc..a431383454 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -16,7 +16,6 @@ #include "split_util.h" #include "matrix.h" #include "keyboard.h" -#include "config.h" #include "timer.h" #include "transport.h" #include "quantum.h" diff --git a/quantum/split_common/transaction_id_define.h b/quantum/split_common/transaction_id_define.h index 8c19948107..18d3826b83 100644 --- a/quantum/split_common/transaction_id_define.h +++ b/quantum/split_common/transaction_id_define.h @@ -88,6 +88,10 @@ enum serial_transaction_id { PUT_WATCHDOG, #endif // defined(SPLIT_WATCHDOG_ENABLE) +#if defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) + PUT_HAPTIC, +#endif // defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) + #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) PUT_RPC_INFO, PUT_RPC_REQ_DATA, diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index 527b2f4caf..8e1961b586 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c @@ -748,6 +748,48 @@ static void watchdog_handlers_slave(matrix_row_t master_matrix[], matrix_row_t s #endif // defined(SPLIT_WATCHDOG_ENABLE) +#if defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) + +uint8_t split_haptic_play = 0xFF; +extern haptic_config_t haptic_config; + +static bool haptic_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + split_slave_haptic_sync_t haptic_sync; + + memcpy(&haptic_sync.haptic_config, &haptic_config, sizeof(haptic_config_t)); + haptic_sync.haptic_play = split_haptic_play; + + bool okay = send_if_data_mismatch(PUT_HAPTIC, &last_update, &haptic_sync, &split_shmem->haptic_sync, sizeof(haptic_sync)); + + split_haptic_play = 0xFF; + + return okay; +} + +static void haptic_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + memcpy(&haptic_config, &split_shmem->haptic_sync.haptic_config, sizeof(haptic_config_t)); + + if (split_shmem->haptic_sync.haptic_play != 0xFF) { + haptic_set_mode(split_shmem->haptic_sync.haptic_play); + haptic_play(); + } +} + +// clang-format off +# define TRANSACTIONS_HAPTIC_MASTER() TRANSACTION_HANDLER_MASTER(haptic) +# define TRANSACTIONS_HAPTIC_SLAVE() TRANSACTION_HANDLER_SLAVE(haptic) +# define TRANSACTIONS_HAPTIC_REGISTRATIONS [PUT_HAPTIC] = trans_initiator2target_initializer(haptic_sync), +// clang-format on + +#else // defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) + +# define TRANSACTIONS_HAPTIC_MASTER() +# define TRANSACTIONS_HAPTIC_SLAVE() +# define TRANSACTIONS_HAPTIC_REGISTRATIONS + +#endif // defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) + //////////////////////////////////////////////////// split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS] = { @@ -775,6 +817,7 @@ split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS] = { TRANSACTIONS_ST7565_REGISTRATIONS TRANSACTIONS_POINTING_REGISTRATIONS TRANSACTIONS_WATCHDOG_REGISTRATIONS + TRANSACTIONS_HAPTIC_REGISTRATIONS // clang-format on #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) @@ -802,6 +845,7 @@ bool transactions_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix TRANSACTIONS_ST7565_MASTER(); TRANSACTIONS_POINTING_MASTER(); TRANSACTIONS_WATCHDOG_MASTER(); + TRANSACTIONS_HAPTIC_MASTER(); return true; } @@ -822,6 +866,7 @@ void transactions_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[ TRANSACTIONS_ST7565_SLAVE(); TRANSACTIONS_POINTING_SLAVE(); TRANSACTIONS_WATCHDOG_SLAVE(); + TRANSACTIONS_HAPTIC_SLAVE(); } #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h index 833633edc2..adee4470d2 100644 --- a/quantum/split_common/transport.h +++ b/quantum/split_common/transport.h @@ -114,6 +114,14 @@ typedef struct _split_slave_pointing_sync_t { } split_slave_pointing_sync_t; #endif // defined(POINTING_DEVICE_ENABLE) && defined(SPLIT_POINTING_ENABLE) +#if defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) +# include "haptic.h" +typedef struct _split_slave_haptic_sync_t { + haptic_config_t haptic_config; + uint8_t haptic_play; +} split_slave_haptic_sync_t; +#endif // defined(HAPTIC_ENABLE) && defined(SPLIT_HAPTIC_ENABLE) + #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) typedef struct _rpc_sync_info_t { uint8_t checksum; @@ -192,6 +200,10 @@ typedef struct _split_shared_memory_t { bool watchdog_pinged; #endif // defined(SPLIT_WATCHDOG_ENABLE) +#if defined(HAPTIC_ENABLE) + split_slave_haptic_sync_t haptic_sync; +#endif // defined(HAPTIC_ENABLE) + #if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) rpc_sync_info_t rpc_info; uint8_t rpc_m2s_buffer[RPC_M2S_BUFFER_SIZE]; diff --git a/quantum/tri_layer.c b/quantum/tri_layer.c new file mode 100644 index 0000000000..a5e3f8cb47 --- /dev/null +++ b/quantum/tri_layer.c @@ -0,0 +1,39 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "tri_layer.h" +#include <stdint.h> + +static uint8_t tri_layer_lower_layer = TRI_LAYER_LOWER_LAYER; +static uint8_t tri_layer_upper_layer = TRI_LAYER_UPPER_LAYER; +static uint8_t tri_layer_adjust_layer = TRI_LAYER_ADJUST_LAYER; + +void set_tri_layer_lower_layer(uint8_t layer) { + tri_layer_lower_layer = layer; +} + +void set_tri_layer_upper_layer(uint8_t layer) { + tri_layer_upper_layer = layer; +} + +void set_tri_layer_adjust_layer(uint8_t layer) { + tri_layer_adjust_layer = layer; +} + +void set_tri_layer_layers(uint8_t lower, uint8_t raise, uint8_t adjust) { + tri_layer_lower_layer = lower; + tri_layer_upper_layer = raise; + tri_layer_adjust_layer = adjust; +} + +uint8_t get_tri_layer_lower_layer(void) { + return tri_layer_lower_layer; +} + +uint8_t get_tri_layer_upper_layer(void) { + return tri_layer_upper_layer; +} + +uint8_t get_tri_layer_adjust_layer(void) { + return tri_layer_adjust_layer; +} diff --git a/quantum/tri_layer.h b/quantum/tri_layer.h new file mode 100644 index 0000000000..3341ebffb2 --- /dev/null +++ b/quantum/tri_layer.h @@ -0,0 +1,59 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include <stdint.h> + +#ifndef TRI_LAYER_LOWER_LAYER +# define TRI_LAYER_LOWER_LAYER 1 +#endif +#ifndef TRI_LAYER_UPPER_LAYER +# define TRI_LAYER_UPPER_LAYER 2 +#endif +#ifndef TRI_LAYER_ADJUST_LAYER +# define TRI_LAYER_ADJUST_LAYER 3 +#endif + +/** + * @brief Set the tri layer lower layer index + * + * @param layer + */ +void set_tri_layer_lower_layer(uint8_t layer); +/** + * @brief Set the tri layer upper layer index + * + * @param layer + */ +void set_tri_layer_upper_layer(uint8_t layer); +/** + * @brief Set the tri layer adjust layer index + * + * @param layer + */ +void set_tri_layer_adjust_layer(uint8_t layer); +/** + * @brief Set the tri layer indices + * + * @param lower + * @param upper + * @param adjust + */ +void set_tri_layer_layers(uint8_t lower, uint8_t upper, uint8_t adjust); +/** + * @brief Get the tri layer lower layer index + * + * @return uint8_t + */ +uint8_t get_tri_layer_lower_layer(void); +/** + * @brief Get the tri layer upper layer index + * + * @return uint8_t + */ +uint8_t get_tri_layer_upper_layer(void); +/** + * @brief Get the tri layer adjust layer index + * + * @return uint8_t + */ +uint8_t get_tri_layer_adjust_layer(void); |