diff options
| author | Drashna Jaelre <drashna@live.com> | 2018-12-31 14:29:56 -0800 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2018-12-31 14:29:56 -0800 |
| commit | 40383089d035f69101851831f756508271fff103 (patch) | |
| tree | cbdfaf00ad2c28825887d9370feedc4e1831f6ea | |
| parent | 7f0def77a201bd419517332581dbc2cc3b0bd7eb (diff) | |
| download | qmk_firmware-40383089d035f69101851831f756508271fff103.tar.gz qmk_firmware-40383089d035f69101851831f756508271fff103.zip | |
Keymap: Update for Drashna code - Proton C Prep Edition (#4708)
* Make CRKBD keylogger output actually show tap keys
* check MT/LT for twinkling
* Add ortho 5x12 support for fractal keyboard
* Use newer interface for setting pins/ports
* Remove custom unicode methods
* Reomve unicode input info
* Odd rules issue
* Redefine REST note to be more pleasing
* Properly disable PM LEDs with GPIO commands
* Update gitlab CI yaml file
* Remove extra mod tap check
* Remove initial state on ergodox glow
* Rev6 Cleanup
* Fix KC_MAKE macro
* Update GitLab CI yaml file
* More GitLab CI changes
* One final GitLab CI change
* Remove unneeded unicode support
* Optimize KC_MAKE
| -rw-r--r-- | keyboards/crkbd/keymaps/drashna/keymap.c | 24 | ||||
| -rw-r--r-- | keyboards/iris/keymaps/drashna/keymap.c | 10 | ||||
| -rw-r--r-- | keyboards/orthodox/keymaps/drashna/keymap.c | 10 | ||||
| -rw-r--r-- | keyboards/viterbi/keymaps/drashna/keymap.c | 11 | ||||
| -rw-r--r-- | layouts/community/ergodox/drashna/keymap.c | 10 | ||||
| -rw-r--r-- | layouts/community/ergodox/drashna/rules.mk | 2 | ||||
| -rw-r--r-- | layouts/community/ergodox/drashna_glow/rules.mk | 2 | ||||
| -rw-r--r-- | layouts/community/ortho_4x12/drashna/config.h | 5 | ||||
| -rw-r--r-- | layouts/community/ortho_4x12/drashna/keymap.c | 13 | ||||
| -rw-r--r-- | layouts/community/ortho_5x12/drashna/config.h | 16 | ||||
| -rw-r--r-- | layouts/community/ortho_5x12/drashna/keymap.c | 156 | ||||
| -rw-r--r-- | layouts/community/ortho_5x12/drashna/rules.mk | 23 | ||||
| -rw-r--r-- | users/drashna/.gitlab-ci.yml | 70 | ||||
| -rw-r--r-- | users/drashna/config.h | 8 | ||||
| -rw-r--r-- | users/drashna/process_records.c | 41 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.c | 5 | ||||
| -rw-r--r-- | users/drashna/rules.mk | 13 | ||||
| -rw-r--r-- | users/drashna/send_unicode.c | 112 | ||||
| -rw-r--r-- | users/drashna/wrappers.h | 1 |
19 files changed, 339 insertions, 193 deletions
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 282ee2572..678fd33b5 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c | |||
| @@ -88,16 +88,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 88 | }; | 88 | }; |
| 89 | 89 | ||
| 90 | void matrix_init_keymap(void) { | 90 | void matrix_init_keymap(void) { |
| 91 | //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h | 91 | //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h |
| 92 | #ifdef SSD1306OLED | 92 | #ifdef SSD1306OLED |
| 93 | iota_gfx_init(!has_usb()); // turns on the display | 93 | iota_gfx_init(!has_usb()); // turns on the display |
| 94 | #endif | 94 | #endif |
| 95 | 95 | ||
| 96 | DDRD &= ~(1<<5); | 96 | #ifndef CONVERT_TO_PROTON_C |
| 97 | PORTD &= ~(1<<5); | 97 | setPinOutput(D5); |
| 98 | 98 | writePinHigh(D5); | |
| 99 | DDRB &= ~(1<<0); | 99 | |
| 100 | PORTB &= ~(1<<0); | 100 | setPinOutput(B0); |
| 101 | writePinHigh(B0); | ||
| 102 | #endif | ||
| 101 | } | 103 | } |
| 102 | 104 | ||
| 103 | //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h | 105 | //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h |
| @@ -126,10 +128,10 @@ const char code_to_name[60] = { | |||
| 126 | 128 | ||
| 127 | void set_keylog(uint16_t keycode, keyrecord_t *record) { | 129 | void set_keylog(uint16_t keycode, keyrecord_t *record) { |
| 128 | char name = ' '; | 130 | char name = ' '; |
| 131 | if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } | ||
| 129 | if (keycode < 60) { | 132 | if (keycode < 60) { |
| 130 | name = code_to_name[keycode]; | 133 | name = code_to_name[keycode]; |
| 131 | } | 134 | } |
| 132 | |||
| 133 | // update keylog | 135 | // update keylog |
| 134 | snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", | 136 | snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", |
| 135 | record->event.key.row, record->event.key.col, | 137 | record->event.key.row, record->event.key.col, |
diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/iris/keymaps/drashna/keymap.c index ba6f18edd..d89656b7e 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/iris/keymaps/drashna/keymap.c | |||
| @@ -89,9 +89,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 89 | 89 | ||
| 90 | 90 | ||
| 91 | void matrix_init_keymap(void) { | 91 | void matrix_init_keymap(void) { |
| 92 | DDRD &= ~(1<<5); | 92 | #ifndef CONVERT_TO_PROTON_C |
| 93 | PORTD &= ~(1<<5); | 93 | setPinOutput(D5); |
| 94 | writePinHigh(D5); | ||
| 94 | 95 | ||
| 95 | DDRB &= ~(1<<0); | 96 | setPinOutput(B0); |
| 96 | PORTB &= ~(1<<0); | 97 | writePinHigh(B0); |
| 98 | #endif | ||
| 97 | } | 99 | } |
diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 346ca4f12..9373d851d 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c | |||
| @@ -97,9 +97,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | void matrix_init_keymap(void) { | 99 | void matrix_init_keymap(void) { |
| 100 | DDRD &= ~(1<<5); | 100 | #ifndef CONVERT_TO_PROTON_C |
| 101 | PORTD &= ~(1<<5); | 101 | setPinOutput(D5); |
| 102 | writePinHigh(D5); | ||
| 102 | 103 | ||
| 103 | DDRB &= ~(1<<0); | 104 | setPinOutput(B0); |
| 104 | PORTB &= ~(1<<0); | 105 | writePinHigh(B0); |
| 106 | #endif | ||
| 105 | } | 107 | } |
diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/viterbi/keymaps/drashna/keymap.c index a34320519..9ca14961b 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/viterbi/keymaps/drashna/keymap.c | |||
| @@ -87,10 +87,13 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
| 87 | 87 | ||
| 88 | 88 | ||
| 89 | 89 | ||
| 90 | |||
| 90 | void matrix_init_keymap(void) { | 91 | void matrix_init_keymap(void) { |
| 91 | DDRD &= ~(1<<5); | 92 | #ifndef CONVERT_TO_PROTON_C |
| 92 | PORTD &= ~(1<<5); | 93 | setPinOutput(D5); |
| 94 | writePinHigh(D5); | ||
| 93 | 95 | ||
| 94 | DDRB &= ~(1<<0); | 96 | setPinOutput(B0); |
| 95 | PORTB &= ~(1<<0); | 97 | writePinHigh(B0); |
| 98 | #endif | ||
| 96 | } | 99 | } |
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index df9be62b7..45860b874 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c | |||
| @@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 20 | #ifdef UNICODEMAP_ENABLE | 20 | #ifdef UNICODEMAP_ENABLE |
| 21 | #include "drashna_unicode.h" | 21 | #include "drashna_unicode.h" |
| 22 | #endif // UNICODEMAP_ENABLE | 22 | #endif // UNICODEMAP_ENABLE |
| 23 | extern uint8_t input_mode; | ||
| 24 | 23 | ||
| 25 | #ifdef RGB_MATRIX_ENABLE | 24 | #ifdef RGB_MATRIX_ENABLE |
| 26 | extern bool g_suspend_state; | 25 | extern bool g_suspend_state; |
| @@ -425,17 +424,12 @@ void rgb_matrix_indicators_user(void) { | |||
| 425 | } | 424 | } |
| 426 | 425 | ||
| 427 | void matrix_init_keymap(void) { | 426 | void matrix_init_keymap(void) { |
| 427 | #if 0 | ||
| 428 | #ifdef RGB_MATRIX_KEYPRESSES | 428 | #ifdef RGB_MATRIX_KEYPRESSES |
| 429 | rgblight_mode(RGB_MATRIX_MULTISPLASH); | 429 | rgblight_mode(RGB_MATRIX_MULTISPLASH); |
| 430 | #else | 430 | #else |
| 431 | rgblight_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); | 431 | rgblight_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); |
| 432 | #endif | 432 | #endif |
| 433 | 433 | #endif | |
| 434 | input_mode = 2; | ||
| 435 | } | ||
| 436 | |||
| 437 | #else | ||
| 438 | void matrix_init_keymap(void) { | ||
| 439 | input_mode = 2; | ||
| 440 | } | 434 | } |
| 441 | #endif //RGB_MATRIX_INIT | 435 | #endif //RGB_MATRIX_INIT |
diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index 8bf53950e..31488108b 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | TAP_DANCE_ENABLE = yes | 1 | TAP_DANCE_ENABLE = yes |
| 2 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 2 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 3 | COMMAND_ENABLE = yes # Commands for debug and configuration | 3 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 4 | ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) | 4 | ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) |
| 5 | RGBLIGHT_ENABLE = yes | 5 | RGBLIGHT_ENABLE = yes |
| 6 | RGB_MATRIX_ENABLE = no | 6 | RGB_MATRIX_ENABLE = no |
diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk index 3b317224a..c8941391e 100644 --- a/layouts/community/ergodox/drashna_glow/rules.mk +++ b/layouts/community/ergodox/drashna_glow/rules.mk | |||
| @@ -7,3 +7,5 @@ ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) | |||
| 7 | RGBLIGHT_ENABLE = no | 7 | RGBLIGHT_ENABLE = no |
| 8 | RGB_MATRIX_ENABLE = yes | 8 | RGB_MATRIX_ENABLE = yes |
| 9 | endif | 9 | endif |
| 10 | |||
| 11 | COMMAND_ENABLE = no | ||
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 8658802d8..0b0110dfa 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #ifndef CONFIG_USER_H | 1 | #pragma once |
| 2 | #define CONFIG_USER_H | ||
| 3 | 2 | ||
| 4 | 3 | ||
| 5 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) | 4 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) |
| @@ -61,5 +60,3 @@ | |||
| 61 | 60 | ||
| 62 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 61 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
| 63 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 | 62 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 |
| 64 | |||
| 65 | #endif | ||
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 205d12d8c..5d3218934 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c | |||
| @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 94 | KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, | 94 | KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, |
| 95 | VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, | 95 | VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, |
| 96 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, | 96 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, |
| 97 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 97 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE |
| 98 | ) | 98 | ) |
| 99 | 99 | ||
| 100 | 100 | ||
| @@ -219,4 +219,15 @@ void rgb_matrix_indicators_user(void) { | |||
| 219 | void matrix_init_keymap(void) { | 219 | void matrix_init_keymap(void) { |
| 220 | rgblight_mode(RGB_MATRIX_MULTISPLASH); | 220 | rgblight_mode(RGB_MATRIX_MULTISPLASH); |
| 221 | } | 221 | } |
| 222 | #else //RGB_MATRIX_INIT | ||
| 223 | |||
| 224 | void matrix_init_keymap(void) { | ||
| 225 | #ifndef CONVERT_TO_PROTON_C | ||
| 226 | setPinOutput(D5); | ||
| 227 | writePinHigh(D5); | ||
| 228 | |||
| 229 | setPinOutput(B0); | ||
| 230 | writePinHigh(B0); | ||
| 231 | #endif | ||
| 232 | } | ||
| 222 | #endif //RGB_MATRIX_INIT | 233 | #endif //RGB_MATRIX_INIT |
diff --git a/layouts/community/ortho_5x12/drashna/config.h b/layouts/community/ortho_5x12/drashna/config.h new file mode 100644 index 000000000..e41dadc60 --- /dev/null +++ b/layouts/community/ortho_5x12/drashna/config.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | |||
| 4 | /* ws2812 RGB LED */ | ||
| 5 | #if defined(KEYBOARD_fractal) | ||
| 6 | #define RGB_DI_PIN D2 | ||
| 7 | #undef RGBLED_NUM | ||
| 8 | #define RGBLIGHT_ANIMATIONS | ||
| 9 | #define RGBLED_NUM 29 // Number of LEDs | ||
| 10 | #undef RGBLIGHT_HUE_STEP | ||
| 11 | #define RGBLIGHT_HUE_STEP 8 | ||
| 12 | #undef RGBLIGHT_SAT_STEP | ||
| 13 | #define RGBLIGHT_SAT_STEP 8 | ||
| 14 | #undef RGBLIGHT_VAL_STEP | ||
| 15 | #define RGBLIGHT_VAL_STEP 8 | ||
| 16 | #endif | ||
diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c new file mode 100644 index 000000000..bf0907a51 --- /dev/null +++ b/layouts/community/ortho_5x12/drashna/keymap.c | |||
| @@ -0,0 +1,156 @@ | |||
| 1 | /* Copyright 2015-2017 Jack Humbert | ||
| 2 | * Modified by KeyPCB for the Fractal keyboard | ||
| 3 | * Backlight isn't on the Fractal, so I've removed the keycode from the keymaps | ||
| 4 | * | ||
| 5 | * This program is free software: you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation, either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include QMK_KEYBOARD_H | ||
| 20 | #include "drashna.h" | ||
| 21 | |||
| 22 | #define LAYOUT_ortho_5x12_base( \ | ||
| 23 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | ||
| 24 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ | ||
| 25 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ | ||
| 26 | K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ | ||
| 27 | ) \ | ||
| 28 | LAYOUT_ortho_5x12_wrapper( \ | ||
| 29 | KC_GRV, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ | ||
| 30 | KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ | ||
| 31 | KC_ESC, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \ | ||
| 32 | KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, CTL_T(K3A), KC_ENT, \ | ||
| 33 | KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | ||
| 34 | ) | ||
| 35 | #define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) | ||
| 36 | |||
| 37 | |||
| 38 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 39 | |||
| 40 | [_QWERTY] = LAYOUT_ortho_5x12_base_wrapper( | ||
| 41 | ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, | ||
| 42 | _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, | ||
| 43 | _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, | ||
| 44 | _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ | ||
| 45 | ), | ||
| 46 | |||
| 47 | [_COLEMAK] = LAYOUT_ortho_5x12_base_wrapper( | ||
| 48 | ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, | ||
| 49 | _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, | ||
| 50 | _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, | ||
| 51 | _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ | ||
| 52 | ), | ||
| 53 | |||
| 54 | [_DVORAK] = LAYOUT_ortho_5x12_base_wrapper( | ||
| 55 | ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, | ||
| 56 | _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, | ||
| 57 | _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, | ||
| 58 | _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ | ||
| 59 | ), | ||
| 60 | |||
| 61 | [_WORKMAN] = LAYOUT_ortho_5x12_base_wrapper( | ||
| 62 | ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, | ||
| 63 | _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, | ||
| 64 | _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, | ||
| 65 | _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ | ||
| 66 | ), | ||
| 67 | |||
| 68 | [_MODS] = LAYOUT_ortho_5x12_wrapper( | ||
| 69 | _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 70 | _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 71 | _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 72 | KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 73 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 74 | ), | ||
| 75 | |||
| 76 | /* Lower | ||
| 77 | * ,-----------------------------------------------------------------------------------. | ||
| 78 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | ||
| 79 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 80 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | | ||
| 81 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 82 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | ||
| 83 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 84 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | | ||
| 85 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 86 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 87 | * `-----------------------------------------------------------------------------------' | ||
| 88 | */ | ||
| 89 | [_LOWER] = LAYOUT_ortho_5x12_wrapper( \ | ||
| 90 | _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 91 | KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_PIPE, | ||
| 92 | KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, _______, | ||
| 93 | _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, | ||
| 94 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 95 | ), | ||
| 96 | |||
| 97 | /* Raise | ||
| 98 | * ,-----------------------------------------------------------------------------------. | ||
| 99 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 100 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 101 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | | ||
| 102 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 103 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | | ||
| 104 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 105 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | | ||
| 106 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 107 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 108 | * `-----------------------------------------------------------------------------------' | ||
| 109 | */ | ||
| 110 | [_RAISE] = LAYOUT_ortho_5x12_wrapper( \ | ||
| 111 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | ||
| 112 | KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, | ||
| 113 | KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, | ||
| 114 | _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, | ||
| 115 | _______, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________ | ||
| 116 | ), | ||
| 117 | |||
| 118 | /* Adjust (Lower + Raise) | ||
| 119 | * ,-----------------------------------------------------------------------------------. | ||
| 120 | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | ||
| 121 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 122 | * | | Reset| | | | | | | | | | Del | | ||
| 123 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 124 | * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | | ||
| 125 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 126 | * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | | ||
| 127 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 128 | * | | | | | | | | | | | | | ||
| 129 | * `-----------------------------------------------------------------------------------' | ||
| 130 | */ | ||
| 131 | [_ADJUST] = LAYOUT_ortho_5x12_wrapper( \ | ||
| 132 | KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, | ||
| 133 | VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST, | ||
| 134 | _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, _______, | ||
| 135 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, | ||
| 136 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 137 | ) | ||
| 138 | |||
| 139 | |||
| 140 | }; | ||
| 141 | |||
| 142 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 143 | switch (keycode) { | ||
| 144 | } | ||
| 145 | return true; | ||
| 146 | }; | ||
| 147 | |||
| 148 | void matrix_init_keymap(void) { | ||
| 149 | #ifdef KEYBOARD_fractal | ||
| 150 | setPinOutput(D5); | ||
| 151 | writePinHigh(D5); | ||
| 152 | |||
| 153 | setPinOutput(B0); | ||
| 154 | writePinHigh(B0); | ||
| 155 | #endif | ||
| 156 | } | ||
diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk new file mode 100644 index 000000000..160419fcc --- /dev/null +++ b/layouts/community/ortho_5x12/drashna/rules.mk | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 2 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 3 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 4 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 5 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 6 | TAP_DANCE_ENABLE = no | ||
| 7 | AUDIO_ENABLE = yes | ||
| 8 | ifneq (,$(findstring fractal,$(KEYBOARD))) # Make sure it IS the Planck Light | ||
| 9 | RGB_MATRIX_ENABLE = no | ||
| 10 | AUDIO_ENABLE = no | ||
| 11 | RGBLIGHT_ENABLE = yes | ||
| 12 | RGBLIGHT_TWINKLE = yes | ||
| 13 | BOOTLOADER = qmk-dfu | ||
| 14 | endif | ||
| 15 | |||
| 16 | ifeq ($(strip $(PROTOCOL)), VUSB) | ||
| 17 | NKRO_ENABLE = no | ||
| 18 | else | ||
| 19 | NKRO_ENABLE = yes | ||
| 20 | endif | ||
| 21 | |||
| 22 | |||
| 23 | MACROS_ENABLED = no | ||
diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml index bd693babc..9b18d44fb 100644 --- a/users/drashna/.gitlab-ci.yml +++ b/users/drashna/.gitlab-ci.yml | |||
| @@ -1,26 +1,78 @@ | |||
| 1 | stages: | 1 | stages: |
| 2 | - test | ||
| 2 | - build | 3 | - build |
| 4 | - deploy | ||
| 3 | 5 | ||
| 4 | qmk_firmware: | 6 | Tests: |
| 7 | stage: test | ||
| 8 | variables: | ||
| 9 | GIT_SUBMODULE_STRATEGY: recursive | ||
| 10 | tags: | ||
| 11 | - linux | ||
| 12 | image: ubuntu:18.10 | ||
| 13 | before_script: | ||
| 14 | - apt-get update -qy | ||
| 15 | - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip | ||
| 16 | - avr-gcc --version | ||
| 17 | - uname -a | ||
| 18 | script: | ||
| 19 | - make test:all | ||
| 20 | - make planck/rev6:default | ||
| 21 | |||
| 22 | QMK Firmware Defaults: | ||
| 23 | stage: deploy | ||
| 24 | variables: | ||
| 25 | GIT_SUBMODULE_STRATEGY: recursive | ||
| 26 | tags: | ||
| 27 | - linux | ||
| 28 | image: ubuntu:18.10 | ||
| 29 | before_script: | ||
| 30 | - apt-get update -qy | ||
| 31 | - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip | ||
| 32 | - avr-gcc --version | ||
| 33 | - uname -a | ||
| 34 | script: | ||
| 35 | - make test:all | ||
| 36 | - make all:default -j16 | ||
| 37 | |||
| 38 | Drashna Firmware: | ||
| 5 | stage: build | 39 | stage: build |
| 6 | variables: | 40 | variables: |
| 7 | GIT_SUBMODULE_STRATEGY: recursive | 41 | GIT_SUBMODULE_STRATEGY: recursive |
| 8 | tags: | 42 | tags: |
| 9 | - linux | 43 | - linux |
| 10 | image: ubuntu | 44 | image: ubuntu:18.10 |
| 45 | before_script: | ||
| 46 | - apt-get update -qy | ||
| 47 | - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip | ||
| 48 | - avr-gcc --version | ||
| 49 | script: | ||
| 50 | - make iris/rev2:drashna iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna | ||
| 51 | artifacts: | ||
| 52 | name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" | ||
| 53 | paths: | ||
| 54 | - ./*.hex | ||
| 55 | - ./*.bin | ||
| 56 | expire_in: 1 month | ||
| 57 | |||
| 58 | Firmware Deploy: | ||
| 59 | stage: deploy | ||
| 60 | dependencies: | ||
| 61 | - Drashna Firmware | ||
| 62 | variables: | ||
| 63 | GIT_SUBMODULE_STRATEGY: recursive | ||
| 64 | tags: | ||
| 65 | - linux | ||
| 66 | image: ubuntu:18.10 | ||
| 11 | before_script: | 67 | before_script: |
| 12 | - apt-get update -qy | 68 | - apt-get update -qy |
| 13 | - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util diffutils gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip | 69 | - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip |
| 14 | - avr-gcc --version | 70 | - avr-gcc --version |
| 15 | script: | 71 | script: |
| 16 | - make iris/rev2:drashna:production iris/rev2:drashna_old:production ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna:production orthodox/rev1:drashna:production orthodox/rev3:drashna:production crkbd:drashna:production planck/light:drashna:production | 72 | - make iris/rev2:drashna:production iris/rev2:drashna_old:production ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna:production orthodox/rev1:drashna:production orthodox/rev3:drashna:production crkbd:drashna:production planck/light:drashna planck/rev6:drashna fractal:drashna:production |
| 17 | artifacts: | 73 | artifacts: |
| 18 | name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" | 74 | name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" |
| 19 | paths: | 75 | paths: |
| 20 | - ./*.hex | 76 | - ./*.hex |
| 21 | - ./*.bin | 77 | - ./*.bin |
| 22 | only: | 78 | expire_in: 1 month |
| 23 | - master | ||
| 24 | - drashna_keymaps | ||
| 25 | - merge-requests | ||
| 26 | - branches | ||
diff --git a/users/drashna/config.h b/users/drashna/config.h index a33851230..827b1b8ac 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h | |||
| @@ -14,8 +14,12 @@ | |||
| 14 | #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f | 14 | #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f |
| 15 | // #ifdef RGBLIGHT_ENABLE | 15 | // #ifdef RGBLIGHT_ENABLE |
| 16 | // #define NO_MUSIC_MODE | 16 | // #define NO_MUSIC_MODE |
| 17 | // #endif //RGBLIGHT_ENABLE | 17 | // #endif //RGBLIGHT_ENABLE/ |
| 18 | #endif | 18 | #ifndef __arm__ |
| 19 | #undef NOTE_REST | ||
| 20 | #define NOTE_REST 1.00f | ||
| 21 | #endif // !__arm__ | ||
| 22 | #endif // !AUDIO_ENABLE | ||
| 19 | 23 | ||
| 20 | #ifdef RGBLIGHT_ENABLE | 24 | #ifdef RGBLIGHT_ENABLE |
| 21 | #define RGBLIGHT_SLEEP | 25 | #define RGBLIGHT_SLEEP |
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 5e311e60e..17d7dc01c 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c | |||
| @@ -51,27 +51,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 51 | 51 | ||
| 52 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader | 52 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader |
| 53 | if (!record->event.pressed) { | 53 | if (!record->event.pressed) { |
| 54 | uint8_t temp_mod = get_mods(); | 54 | #if !defined(KEYBOARD_viterbi) |
| 55 | uint8_t temp_osm = get_oneshot_mods(); | 55 | uint8_t temp_mod = get_mods(); |
| 56 | clear_mods(); clear_oneshot_mods(); | 56 | uint8_t temp_osm = get_oneshot_mods(); |
| 57 | send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10); | 57 | clear_mods(); clear_oneshot_mods(); |
| 58 | if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) { | 58 | #endif |
| 59 | #if defined(__ARM__) | 59 | send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); |
| 60 | send_string_with_delay_P(PSTR(":dfu-util"), 10); | ||
| 61 | #elif defined(BOOTLOADER_DFU) | ||
| 62 | send_string_with_delay_P(PSTR(":dfu"), 10); | ||
| 63 | #elif defined(BOOTLOADER_HALFKAY) | ||
| 64 | send_string_with_delay_P(PSTR(":teensy"), 10); | ||
| 65 | #elif defined(BOOTLOADER_CATERINA) | ||
| 66 | send_string_with_delay_P(PSTR(":avrdude"), 10); | ||
| 67 | #endif // bootloader options | ||
| 68 | } | ||
| 69 | #if defined(KEYBOARD_viterbi) | 60 | #if defined(KEYBOARD_viterbi) |
| 70 | send_string_with_delay_P(PSTR(":dfu"), 10); | 61 | send_string_with_delay_P(PSTR(":dfu" SS_TAP(X_ENTER)), MACRO_TIMER); |
| 62 | #else | ||
| 63 | if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) { | ||
| 64 | #if defined(__arm__) | ||
| 65 | send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER); | ||
| 66 | #elif defined(BOOTLOADER_DFU) | ||
| 67 | send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER); | ||
| 68 | #elif defined(BOOTLOADER_HALFKAY) | ||
| 69 | send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER); | ||
| 70 | #elif defined(BOOTLOADER_CATERINA) | ||
| 71 | send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER); | ||
| 72 | #endif // bootloader options | ||
| 73 | } | ||
| 74 | if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); } | ||
| 75 | send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER); | ||
| 76 | set_mods(temp_mod); | ||
| 71 | #endif | 77 | #endif |
| 72 | if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); } | ||
| 73 | send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); | ||
| 74 | set_mods(temp_mod); | ||
| 75 | } | 78 | } |
| 76 | break; | 79 | break; |
| 77 | 80 | ||
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index d238c2065..7d00604b4 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c | |||
| @@ -200,7 +200,10 @@ void start_rgb_light(void) { | |||
| 200 | 200 | ||
| 201 | 201 | ||
| 202 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | 202 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { |
| 203 | switch (keycode) { | 203 | if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { |
| 204 | keycode = keycode & 0xFF; | ||
| 205 | } | ||
| 206 | switch (keycode) { | ||
| 204 | #ifdef RGBLIGHT_TWINKLE | 207 | #ifdef RGBLIGHT_TWINKLE |
| 205 | case KC_A ... KC_SLASH: | 208 | case KC_A ... KC_SLASH: |
| 206 | case KC_F1 ... KC_F12: | 209 | case KC_F1 ... KC_F12: |
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 5f243b007..6d8612e71 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk | |||
| @@ -42,16 +42,3 @@ ifdef CONSOLE_ENABLE | |||
| 42 | OPT_DEFS += -DKEYLOGGER_ENABLE | 42 | OPT_DEFS += -DKEYLOGGER_ENABLE |
| 43 | endif | 43 | endif |
| 44 | endif | 44 | endif |
| 45 | |||
| 46 | |||
| 47 | ifeq ($(strip $(UCIS_ENABLE)), yes) | ||
| 48 | SRC += send_unicode.c | ||
| 49 | endif | ||
| 50 | |||
| 51 | ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) | ||
| 52 | SRC += send_unicode.c | ||
| 53 | endif | ||
| 54 | |||
| 55 | ifeq ($(strip $(UNICODE_ENABLE)), yes) | ||
| 56 | SRC += send_unicode.c | ||
| 57 | endif | ||
diff --git a/users/drashna/send_unicode.c b/users/drashna/send_unicode.c deleted file mode 100644 index ff35368da..000000000 --- a/users/drashna/send_unicode.c +++ /dev/null | |||
| @@ -1,112 +0,0 @@ | |||
| 1 | // Written by konstantin: vomindoraan | ||
| 2 | #include "send_unicode.h" | ||
| 3 | #include <ctype.h> | ||
| 4 | #include <string.h> | ||
| 5 | |||
| 6 | __attribute__((weak)) | ||
| 7 | void send_unicode_hex_string(const char* str) { | ||
| 8 | if (!str) { return; } // Safety net | ||
| 9 | |||
| 10 | while (*str) { | ||
| 11 | // Find the next code point (token) in the string | ||
| 12 | for (; *str == ' '; str++); | ||
| 13 | size_t n = strcspn(str, " "); // Length of the current token | ||
| 14 | char code_point[n+1]; | ||
| 15 | strncpy(code_point, str, n); | ||
| 16 | code_point[n] = '\0'; // Make sure it's null-terminated | ||
| 17 | |||
| 18 | // Normalize the code point: make all hex digits lowercase | ||
| 19 | for (char *p = code_point; *p; p++) { | ||
| 20 | *p = tolower((unsigned char)*p); | ||
| 21 | } | ||
| 22 | |||
| 23 | // Send the code point as a Unicode input string | ||
| 24 | unicode_input_start(); | ||
| 25 | send_string(code_point); | ||
| 26 | unicode_input_finish(); | ||
| 27 | |||
| 28 | str += n; // Move to the first ' ' (or '\0') after the current token | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | // (ノಠ痊ಠ)ノ彡┻━┻ | ||
| 33 | // send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); | ||
| 34 | |||
| 35 | //Old code | ||
| 36 | // (╯°□°)╯ ︵ ┻━┻ | ||
| 37 | #if 0 | ||
| 38 | register_code(KC_RSFT); | ||
| 39 | tap(KC_9); | ||
| 40 | unregister_code(KC_RSFT); | ||
| 41 | process_unicode((0x256F | QK_UNICODE), record); // Arm | ||
| 42 | process_unicode((0x00B0 | QK_UNICODE), record); // Eye | ||
| 43 | process_unicode((0x25A1 | QK_UNICODE), record); // Mouth | ||
| 44 | process_unicode((0x00B0 | QK_UNICODE), record); // Eye | ||
| 45 | register_code(KC_RSFT); | ||
| 46 | tap(KC_0); | ||
| 47 | unregister_code(KC_RSFT); | ||
| 48 | process_unicode((0x256F | QK_UNICODE), record); // Arm | ||
| 49 | tap(KC_SPC); | ||
| 50 | process_unicode((0x0361 | QK_UNICODE), record); // Flippy | ||
| 51 | tap(KC_SPC); | ||
| 52 | process_unicode((0x253B | QK_UNICODE), record); // Table | ||
| 53 | process_unicode((0x2501 | QK_UNICODE), record); // Table | ||
| 54 | process_unicode((0x253B | QK_UNICODE), record); // Table | ||
| 55 | #endif | ||
| 56 | |||
| 57 | |||
| 58 | // If you need a good converter: https://r12a.github.io/app-conversion/ | ||
| 59 | uint8_t saved_mods; | ||
| 60 | |||
| 61 | void unicode_input_start (void) { | ||
| 62 | // save current mods | ||
| 63 | saved_mods = get_mods(); // Save current mods | ||
| 64 | clear_mods(); // Unregister mods to start from a clean state | ||
| 65 | |||
| 66 | switch(get_unicode_input_mode()) { | ||
| 67 | case UC_OSX: | ||
| 68 | register_code(KC_LALT); | ||
| 69 | break; | ||
| 70 | case UC_OSX_RALT: | ||
| 71 | register_code(KC_RALT); | ||
| 72 | break; | ||
| 73 | case UC_LNX: | ||
| 74 | register_code(KC_LCTL); | ||
| 75 | register_code(KC_LSFT); | ||
| 76 | register_code(KC_U); | ||
| 77 | unregister_code(KC_U); | ||
| 78 | unregister_code(KC_LSFT); | ||
| 79 | unregister_code(KC_LCTL); | ||
| 80 | break; | ||
| 81 | case UC_WIN: | ||
| 82 | register_code(KC_LALT); | ||
| 83 | register_code(KC_PPLS); | ||
| 84 | unregister_code(KC_PPLS); | ||
| 85 | break; | ||
| 86 | case UC_WINC: | ||
| 87 | register_code(KC_RALT); | ||
| 88 | unregister_code(KC_RALT); | ||
| 89 | register_code(KC_U); | ||
| 90 | unregister_code(KC_U); | ||
| 91 | break; | ||
| 92 | } | ||
| 93 | wait_ms(UNICODE_TYPE_DELAY); | ||
| 94 | } | ||
| 95 | |||
| 96 | void unicode_input_finish (void) { | ||
| 97 | switch(get_unicode_input_mode()) { | ||
| 98 | case UC_OSX: | ||
| 99 | case UC_WIN: | ||
| 100 | unregister_code(KC_LALT); | ||
| 101 | break; | ||
| 102 | case UC_OSX_RALT: | ||
| 103 | unregister_code(KC_RALT); | ||
| 104 | break; | ||
| 105 | case UC_LNX: | ||
| 106 | register_code(KC_SPC); | ||
| 107 | unregister_code(KC_SPC); | ||
| 108 | break; | ||
| 109 | } | ||
| 110 | |||
| 111 | set_mods(saved_mods); // Reregister previously set mods | ||
| 112 | } | ||
diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index b45359f67..070a5a0a4 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h | |||
| @@ -14,6 +14,7 @@ expanded before being used as arguments to the LAYOUT_xxx macro. | |||
| 14 | #define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) | 14 | #define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) |
| 15 | #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) | 15 | #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) |
| 16 | #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) | 16 | #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) |
| 17 | #define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) | ||
| 17 | 18 | ||
| 18 | /* | 19 | /* |
| 19 | Blocks for each of the four major keyboard layouts | 20 | Blocks for each of the four major keyboard layouts |
