diff options
Diffstat (limited to 'quantum')
34 files changed, 1678 insertions, 282 deletions
diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index bc00cd19e6..dccf03d5f6 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h @@ -83,6 +83,7 @@ void increase_tempo(uint8_t tempo_change); void decrease_tempo(uint8_t tempo_change); void audio_init(void); +void audio_startup(void); #ifdef PWM_AUDIO void play_sample(uint8_t* s, uint16_t l, bool r); diff --git a/quantum/audio/audio_avr.c b/quantum/audio/audio_avr.c index 5a96bf6439..1bac43bb43 100644 --- a/quantum/audio/audio_avr.c +++ b/quantum/audio/audio_avr.c @@ -227,7 +227,9 @@ void audio_init() { audio_initialized = true; } +} +void audio_startup() { if (audio_config.enable) { PLAY_SONG(startup_song); } diff --git a/quantum/audio/audio_chibios.c b/quantum/audio/audio_chibios.c index 1f147f2c92..dddb8f1357 100644 --- a/quantum/audio/audio_chibios.c +++ b/quantum/audio/audio_chibios.c @@ -86,13 +86,21 @@ static void gpt_cb8(GPTDriver *gptp); #define START_CHANNEL_1() \ gptStart(&GPTD6, &gpt6cfg1); \ - gptStartContinuous(&GPTD6, 2U) + gptStartContinuous(&GPTD6, 2U); \ + palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_ANALOG) #define START_CHANNEL_2() \ gptStart(&GPTD7, &gpt7cfg1); \ - gptStartContinuous(&GPTD7, 2U) -#define STOP_CHANNEL_1() gptStopTimer(&GPTD6) -#define STOP_CHANNEL_2() gptStopTimer(&GPTD7) -#define RESTART_CHANNEL_1() \ + gptStartContinuous(&GPTD7, 2U); \ + palSetPadMode(GPIOA, 5, PAL_MODE_INPUT_ANALOG) +#define STOP_CHANNEL_1() \ + gptStopTimer(&GPTD6); \ + palSetPadMode(GPIOA, 4, PAL_MODE_OUTPUT_PUSHPULL); \ + palSetPad(GPIOA, 4) +#define STOP_CHANNEL_2() \ + gptStopTimer(&GPTD7); \ + palSetPadMode(GPIOA, 5, PAL_MODE_OUTPUT_PUSHPULL); \ + palSetPad(GPIOA, 5) + #define RESTART_CHANNEL_1() \ STOP_CHANNEL_1(); \ START_CHANNEL_1() #define RESTART_CHANNEL_2() \ @@ -274,6 +282,12 @@ void audio_init() { dacStart(&DACD2, &dac1cfg2); /* + * Start the note timer + */ + gptStart(&GPTD8, &gpt8cfg1); + gptStartContinuous(&GPTD8, 2U); + + /* * Starting GPT6/7 driver, it is used for triggering the DAC. */ START_CHANNEL_1(); @@ -287,10 +301,12 @@ void audio_init() { audio_initialized = true; + stop_all_notes(); +} + +void audio_startup() { if (audio_config.enable) { PLAY_SONG(startup_song); - } else { - stop_all_notes(); } } @@ -630,6 +646,9 @@ bool is_playing_notes(void) { return playing_notes; } bool is_audio_on(void) { return (audio_config.enable != 0); } void audio_toggle(void) { + if (audio_config.enable) { + stop_all_notes(); + } audio_config.enable ^= 1; eeconfig_update_audio(audio_config.raw); if (audio_config.enable) { diff --git a/quantum/audio/audio_pwm.c b/quantum/audio/audio_pwm.c index 545aef6dd7..d93ac4bb40 100644 --- a/quantum/audio/audio_pwm.c +++ b/quantum/audio/audio_pwm.c @@ -29,6 +29,11 @@ #define CPU_PRESCALER 8 +#ifndef STARTUP_SONG +# define STARTUP_SONG SONG(STARTUP_SOUND) +#endif +float startup_song[][2] = STARTUP_SONG; + // Timer Abstractions // TIMSK3 - Timer/Counter #3 Interrupt Mask Register @@ -155,6 +160,12 @@ void audio_init() { audio_initialized = true; } +void audio_startup() { + if (audio_config.enable) { + PLAY_SONG(startup_song); + } +} + void stop_all_notes() { if (!audio_initialized) { audio_init(); diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index 8ac6aafd38..0ba572c346 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -17,7 +17,9 @@ #pragma once // Tempo Placeholder -#define TEMPO_DEFAULT 100 +#ifndef TEMPO_DEFAULT +# define TEMPO_DEFAULT 100 +#endif #define SONG(notes...) \ { notes } @@ -60,8 +62,9 @@ #define TIMBRE_25 0.250f #define TIMBRE_50 0.500f #define TIMBRE_75 0.750f -#define TIMBRE_DEFAULT TIMBRE_50 - +#ifndef TIMBRE_DEFAULT +# define TIMBRE_DEFAULT TIMBRE_50 +#endif // Notes - # = Octave #ifdef __arm__ diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c index 4d66da80ba..2ecdd4f2c4 100644 --- a/quantum/backlight/backlight_avr.c +++ b/quantum/backlight/backlight_avr.c @@ -68,7 +68,7 @@ # define COMxx1 COM3A1 # define OCRxx OCR3A # endif -#elif (defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) +#elif (defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) # define HARDWARE_PWM # define ICRx ICR1 # define TCCRxA TCCR1A diff --git a/quantum/command.c b/quantum/command.c index 59aa4e4d34..34c4b36b1c 100644 --- a/quantum/command.c +++ b/quantum/command.c @@ -550,22 +550,22 @@ static void mousekey_param_print(void) { # if !defined(NO_PRINT) && !defined(USER_PRINT) print("\n\t- Values -\n"); print("1: delay(*10ms): "); - pdec(mk_delay); + print_dec(mk_delay); print("\n"); print("2: interval(ms): "); - pdec(mk_interval); + print_dec(mk_interval); print("\n"); print("3: max_speed: "); - pdec(mk_max_speed); + print_dec(mk_max_speed); print("\n"); print("4: time_to_max: "); - pdec(mk_time_to_max); + print_dec(mk_time_to_max); print("\n"); print("5: wheel_max_speed: "); - pdec(mk_wheel_max_speed); + print_dec(mk_wheel_max_speed); print("\n"); print("6: wheel_time_to_max: "); - pdec(mk_wheel_time_to_max); + print_dec(mk_wheel_time_to_max); print("\n"); # endif /* !NO_PRINT */ } diff --git a/quantum/config_common.h b/quantum/config_common.h index 5973232ef6..bfaf7389e2 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -39,7 +39,7 @@ # define PIND_ADDRESS 0x9 # define PINE_ADDRESS 0xC # define PINF_ADDRESS 0xF -# elif defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) +# elif defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) # define ADDRESS_BASE 0x00 # define PINB_ADDRESS 0x3 # define PINC_ADDRESS 0x6 diff --git a/quantum/debounce/sym_defer_pk.c b/quantum/debounce/sym_defer_pk.c index 6c0e3bb071..60513f98e1 100644 --- a/quantum/debounce/sym_defer_pk.c +++ b/quantum/debounce/sym_defer_pk.c @@ -23,6 +23,12 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state. #include "quantum.h" #include <stdlib.h> +#ifdef PROTOCOL_CHIBIOS +# if CH_CFG_USE_MEMCORE == FALSE +# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm. +# endif +#endif + #ifndef DEBOUNCE # define DEBOUNCE 5 #endif diff --git a/quantum/debounce/sym_eager_pk.c b/quantum/debounce/sym_eager_pk.c index 93a40ad441..e66cf92d79 100644 --- a/quantum/debounce/sym_eager_pk.c +++ b/quantum/debounce/sym_eager_pk.c @@ -23,6 +23,12 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. #include "quantum.h" #include <stdlib.h> +#ifdef PROTOCOL_CHIBIOS +# if CH_CFG_USE_MEMCORE == FALSE +# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm. +# endif +#endif + #ifndef DEBOUNCE # define DEBOUNCE 5 #endif diff --git a/quantum/debounce/sym_eager_pr.c b/quantum/debounce/sym_eager_pr.c index d12931fddb..20ccb46f1d 100644 --- a/quantum/debounce/sym_eager_pr.c +++ b/quantum/debounce/sym_eager_pr.c @@ -23,6 +23,12 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. #include "quantum.h" #include <stdlib.h> +#ifdef PROTOCOL_CHIBIOS +# if CH_CFG_USE_MEMCORE == FALSE +# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm. +# endif +#endif + #ifndef DEBOUNCE # define DEBOUNCE 5 #endif diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 0608b469c0..a860b94979 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -37,6 +37,8 @@ #ifndef DYNAMIC_KEYMAP_EEPROM_MAX_ADDR # if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) # define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 +# elif defined(__AVR_AT90USB162__) +# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 511 # else # define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1023 # endif diff --git a/quantum/encoder.c b/quantum/encoder.c index 7ca31afedc..2ed64c1e30 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -94,8 +94,9 @@ void encoder_init(void) { #endif } -static void encoder_update(int8_t index, uint8_t state) { - uint8_t i = index; +static bool encoder_update(int8_t index, uint8_t state) { + bool changed = false; + uint8_t i = index; #ifdef ENCODER_RESOLUTIONS int8_t resolution = encoder_resolutions[i]; @@ -109,40 +110,53 @@ static void encoder_update(int8_t index, uint8_t state) { encoder_pulses[i] += encoder_LUT[state & 0xF]; if (encoder_pulses[i] >= resolution) { encoder_value[index]++; + changed = true; encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE); } if (encoder_pulses[i] <= -resolution) { // direction is arbitrary here, but this clockwise encoder_value[index]--; + changed = true; encoder_update_kb(index, ENCODER_CLOCKWISE); } encoder_pulses[i] %= resolution; + return changed; } -void encoder_read(void) { +bool encoder_read(void) { + bool changed = false; for (uint8_t i = 0; i < NUMBER_OF_ENCODERS; i++) { encoder_state[i] <<= 2; encoder_state[i] |= (readPin(encoders_pad_a[i]) << 0) | (readPin(encoders_pad_b[i]) << 1); - encoder_update(i, encoder_state[i]); + changed |= encoder_update(i, encoder_state[i]); } + return changed; } #ifdef SPLIT_KEYBOARD +void last_encoder_activity_trigger(void); + void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, &encoder_value[thisHand], sizeof(uint8_t) * NUMBER_OF_ENCODERS); } void encoder_update_raw(uint8_t* slave_state) { + bool changed = false; for (uint8_t i = 0; i < NUMBER_OF_ENCODERS; i++) { uint8_t index = i + thatHand; int8_t delta = slave_state[i] - encoder_value[index]; while (delta > 0) { delta--; encoder_value[index]++; + changed = true; encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE); } while (delta < 0) { delta++; encoder_value[index]--; + changed = true; encoder_update_kb(index, ENCODER_CLOCKWISE); } } + + // Update the last encoder input time -- handled external to encoder_read() when we're running a split + if (changed) last_encoder_activity_trigger(); } #endif diff --git a/quantum/encoder.h b/quantum/encoder.h index ec09a8cc47..db6f220da4 100644 --- a/quantum/encoder.h +++ b/quantum/encoder.h @@ -20,7 +20,7 @@ #include "quantum.h" void encoder_init(void); -void encoder_read(void); +bool encoder_read(void); void encoder_update_kb(int8_t index, bool clockwise); void encoder_update_user(int8_t index, bool clockwise); diff --git a/quantum/fauxclicky.c b/quantum/fauxclicky.c deleted file mode 100644 index 53499c9c1e..0000000000 --- a/quantum/fauxclicky.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo - -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 <avr/interrupt.h> -#include <avr/io.h> -#include "timer.h" -#include "fauxclicky.h" -#include <stdbool.h> -#include "musical_notes.h" - -bool fauxclicky_enabled = true; -uint16_t note_start = 0; -bool note_playing = false; -uint16_t note_period = 0; - -void fauxclicky_init() { - // Set port PC6 (OC3A and /OC4A) as output - DDRC |= _BV(PORTC6); - - // TCCR3A / TCCR3B: Timer/Counter #3 Control Registers - TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30); - TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30); -} - -void fauxclicky_stop() { - FAUXCLICKY_DISABLE_OUTPUT; - note_playing = false; -} - -void fauxclicky_play(float note[]) { - if (!fauxclicky_enabled) return; - if (note_playing) fauxclicky_stop(); - FAUXCLICKY_TIMER_PERIOD = (uint16_t)(((float)F_CPU) / (note[0] * (float)FAUXCLICKY_CPU_PRESCALER)); - FAUXCLICKY_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (note[0] * (float)FAUXCLICKY_CPU_PRESCALER)) / (float)2); - note_playing = true; - note_period = (note[1] / (float)16) * ((float)60 / (float)FAUXCLICKY_TEMPO) * 1000; - note_start = timer_read(); - FAUXCLICKY_ENABLE_OUTPUT; -} - -void fauxclicky_check() { - if (!note_playing) return; - - if (timer_elapsed(note_start) > note_period) { - fauxclicky_stop(); - } -} diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h deleted file mode 100644 index ed54d0edcf..0000000000 --- a/quantum/fauxclicky.h +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo - -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/>. -*/ - -#ifdef AUDIO_ENABLE -# error "AUDIO_ENABLE and FAUXCLICKY_ENABLE cannot be both enabled" -#endif - -#include "musical_notes.h" -#include <stdbool.h> - -__attribute__((weak)) float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_D4, 0.25); -__attribute__((weak)) float fauxclicky_released_note[2] = MUSICAL_NOTE(_C4, 0.125); -__attribute__((weak)) float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C4, 0.25); - -extern bool fauxclicky_enabled; - -// -// tempo in BPM -// - -#ifndef FAUXCLICKY_TEMPO -# define FAUXCLICKY_TEMPO TEMPO_DEFAULT -#endif - -// beep on press -#define FAUXCLICKY_ACTION_PRESS fauxclicky_play(fauxclicky_pressed_note) - -// beep on release -#define FAUXCLICKY_ACTION_RELEASE fauxclicky_play(fauxclicky_released_note) - -// general purpose beep -#define FAUXCLICKY_BEEP fauxclicky_play(fauxclicky_beep_note) - -// enable -#define FAUXCLICKY_ON fauxclicky_enabled = true - -// disable -#define FAUXCLICKY_OFF \ - do { \ - fauxclicky_enabled = false; \ - fauxclicky_stop(); \ - } while (0) - -// toggle -#define FAUXCLICKY_TOGGLE \ - do { \ - if (fauxclicky_enabled) { \ - FAUXCLICKY_OFF; \ - } else { \ - FAUXCLICKY_ON; \ - } \ - } while (0) - -// -// pin configuration -// - -#ifndef FAUXCLICKY_CPU_PRESCALER -# define FAUXCLICKY_CPU_PRESCALER 8 -#endif - -#ifndef FAUXCLICKY_ENABLE_OUTPUT -# define FAUXCLICKY_ENABLE_OUTPUT TCCR3A |= _BV(COM3A1) -#endif - -#ifndef FAUXCLICKY_DISABLE_OUTPUT -# define FAUXCLICKY_DISABLE_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0)) -#endif - -#ifndef FAUXCLICKY_TIMER_PERIOD -# define FAUXCLICKY_TIMER_PERIOD ICR3 -#endif - -#ifndef FAUXCLICKY_DUTY_CYCLE -# define FAUXCLICKY_DUTY_CYCLE OCR3A -#endif - -// -// definitions -// - -void fauxclicky_init(void); -void fauxclicky_stop(void); -void fauxclicky_play(float note[2]); -void fauxclicky_check(void); diff --git a/quantum/keymap_extras/keymap_us_extended.h b/quantum/keymap_extras/keymap_us_extended.h new file mode 100644 index 0000000000..b2b3a734c9 --- /dev/null +++ b/quantum/keymap_extras/keymap_us_extended.h @@ -0,0 +1,227 @@ +/* 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/>. + */ + +#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 +#define US_GRV KC_GRV // ` +#define US_1 KC_1 // 1 +#define US_2 KC_2 // 2 +#define US_3 KC_3 // 3 +#define US_4 KC_4 // 4 +#define US_5 KC_5 // 5 +#define US_6 KC_6 // 6 +#define US_7 KC_7 // 7 +#define US_8 KC_8 // 8 +#define US_9 KC_9 // 9 +#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 +#define US_R KC_R // R +#define US_T KC_T // T +#define US_Y KC_Y // Y +#define US_U KC_U // U +#define US_I KC_I // I +#define US_O KC_O // O +#define US_P KC_P // P +#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 +#define US_F KC_F // F +#define US_G KC_G // G +#define US_H KC_H // H +#define US_J KC_J // J +#define US_K KC_K // K +#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 +#define US_V KC_V // V +#define US_B KC_B // B +#define US_N KC_N // N +#define US_M KC_M // M +#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) // @ +#define US_HASH S(US_3) // # +#define US_DLR S(US_4) // $ +#define US_PERC S(US_5) // % +#define US_CIRC S(US_6) // ^ +#define US_AMPR S(US_7) // & +#define US_ASTR S(US_8) // * +#define US_LPRN S(US_9) // ( +#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) // ² +#define US_SUP3 ALGR(US_3) // ³ +#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_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) // É +#define US_EDIA ALGR(US_R) // Ë +#define US_THRN ALGR(US_T) // Þ +#define US_UDIA ALGR(US_Y) // Ü +#define US_UACU ALGR(US_U) // Ú +#define US_IACU ALGR(US_I) // Í +#define US_OACU ALGR(US_O) // Ó +#define US_ODIA ALGR(US_P) // Ö +#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_IDIA ALGR(US_J) // Ï +#define US_OE ALGR(US_K) // Œ +#define US_OSTR ALGR(US_L) // Ø +#define US_PILC ALGR(US_SCLN) // ¶ |