diff options
Diffstat (limited to 'keyboards')
| -rw-r--r-- | keyboards/planck/keymaps/sigul/config.h | 39 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/sigul/keymap.c | 222 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/sigul/readme.md | 38 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/sigul/rules.mk | 1 |
4 files changed, 300 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/sigul/config.h b/keyboards/planck/keymaps/sigul/config.h new file mode 100644 index 000000000..6fa31cc8a --- /dev/null +++ b/keyboards/planck/keymaps/sigul/config.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #ifdef AUDIO_ENABLE | ||
| 4 | #define STARTUP_SONG SONG(PLANCK_SOUND) | ||
| 5 | // #define STARTUP_SONG SONG(NO_SOUND) | ||
| 6 | |||
| 7 | #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ | ||
| 8 | SONG(COLEMAK_SOUND), \ | ||
| 9 | SONG(DVORAK_SOUND) \ | ||
| 10 | } | ||
| 11 | #endif | ||
| 12 | |||
| 13 | /* | ||
| 14 | * MIDI options | ||
| 15 | */ | ||
| 16 | |||
| 17 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 18 | //#define MIDI_ENABLE_STRICT 1 | ||
| 19 | |||
| 20 | /* enable basic MIDI features: | ||
| 21 | - MIDI notes can be sent when in Music mode is on | ||
| 22 | */ | ||
| 23 | |||
| 24 | #define MIDI_BASIC | ||
| 25 | |||
| 26 | /* enable advanced MIDI features: | ||
| 27 | - MIDI notes can be added to the keymap | ||
| 28 | - Octave shift and transpose | ||
| 29 | - Virtual sustain, portamento, and modulation wheel | ||
| 30 | - etc. | ||
| 31 | */ | ||
| 32 | //#define MIDI_ADVANCED | ||
| 33 | |||
| 34 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 35 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 | ||
| 36 | |||
| 37 | // Most tactile encoders have detents every 4 stages | ||
| 38 | #define ENCODER_RESOLUTION 4 | ||
| 39 | |||
diff --git a/keyboards/planck/keymaps/sigul/keymap.c b/keyboards/planck/keymaps/sigul/keymap.c new file mode 100644 index 000000000..687a0f28d --- /dev/null +++ b/keyboards/planck/keymaps/sigul/keymap.c | |||
| @@ -0,0 +1,222 @@ | |||
| 1 | /* | ||
| 2 | * | ||
| 3 | * An Italian ANSI layout | ||
| 4 | * Version 0.3 | ||
| 5 | * | ||
| 6 | * Created by Silvio Gulizia on the basis of the default Planck keymap. | ||
| 7 | * thanks to SomeBuddyOnReddit, gepeirl, fauxpark, BXO511, drashna, ridingqwerty ... | ||
| 8 | * | ||
| 9 | * based on the original Planck layout | ||
| 10 | * Italian accented vowels "Ã" and "à " have been moved from the QWERTY layer to the LOWER layers, while "è" and "ù" remain respectively on RAISE and LOWER. | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include QMK_KEYBOARD_H | ||
| 15 | #include "muse.h" | ||
| 16 | #include "keymap_italian_osx_ansi.h" | ||
| 17 | #include "sigul.h" | ||
| 18 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | |||
| 21 | /* Qwerty | ||
| 22 | * ,-----------------------------------------------------------------------------------. | ||
| 23 | * |Tab/FN| Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
| 24 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 25 | * |Esc/FN| A | S | D | F | G | H | J | K | L | ;: | '" | | ||
| 26 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 27 | * | Shift| Z | X | C | V | FN/B | N | M | ,< | .> | /! |S/Ent | | ||
| 28 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 29 | * | FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 30 | * `-----------------------------------------------------------------------------------' | ||
| 31 | */ | ||
| 32 | [_QWERTY] = LAYOUT_ortho_4x12( | ||
| 33 | TABFN, IT_Q, IT_W, IT_E, IT_R, IT_T, IT_Y, IT_U, IT_I, IT_O, IT_P, KC_BSPC, | ||
| 34 | ESCFN, IT_A, IT_S, IT_D, IT_F, IT_G, IT_H, IT_J, IT_K, IT_L, IT_SCCL, IT_APDQ, | ||
| 35 | KC_LSFT, IT_Z, IT_X, IT_C, IT_V, MS_B, IT_N, IT_M, IT_CMLS, IT_DTMR, IT_SLQS, MT(MOD_RSFT, KC_ENT), | ||
| 36 | FN, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
| 37 | ), | ||
| 38 | |||
| 39 | /* Lower | ||
| 40 | * added ò and à that were on the default Planck Querty layer when used with a device with lang set to Italian | ||
| 41 | * ,-----------------------------------------------------------------------------------. | ||
| 42 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | | ||
| 43 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 44 | * | | F1 | F2 | F3 | F4 | F5 | | _ | = | é | ò | à | | ||
| 45 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 46 | * | | F6 | F7 | F8 | F9 | MOUSE|NUMPAD| § | ± | { | } | | | | ||
| 47 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 48 | * | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 49 | * `-----------------------------------------------------------------------------------' | ||
| 50 | */ | ||
| 51 | |||
| 52 | [_LOWER] = LAYOUT_ortho_4x12( | ||
| 53 | IT_TILDE, IT_EXLM, IT_AT, IT_SHRP, IT_DLR, IT_PERC, IT_CRC, IT_AMPR, IT_ASTR, IT_LPRN, IT_RPRN, KC_DEL, | ||
| 54 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(IT_MINS), IT_EQL, S(IT_EACC), IT_OACC, IT_AACC, | ||
| 55 | _______, KC_F6, KC_F7, KC_F8, KC_F9, MOUSE, NUMPAD, S(IT_UACC), IT_PLMN, IT_LCBR, IT_RCBR, IT_PIPE, | ||
| 56 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 57 | ), | ||
| 58 | |||
| 59 | /* Raise | ||
| 60 | * ,-----------------------------------------------------------------------------------. | ||
| 61 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | ||
| 62 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 63 | * | | | SGCOM| DESK | | | | - | + | è | ì | ù | | ||
| 64 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 65 | * | Caps | | PHONE| SVIV |VIVERE|MOUSE |NUMPAD| | | [ | ] | \ | | ||
| 66 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 67 | * | | | | | | | | | Home | PgDn | PgUp | End | | ||
| 68 | * `-----------------------------------------------------------------------------------' | ||
| 69 | */ | ||
| 70 | [_RAISE] = LAYOUT_ortho_4x12( | ||
| 71 | IT_GRAVE, IT_1, IT_2, IT_3, IT_4, IT_5, IT_6, IT_7, IT_8, IT_9, IT_0, _______, | ||
| 72 | _______, _______, SECRET2, SECRET1, _______, _______, _______, IT_MINS, IT_PLUS, IT_EACC, IT_IACC, IT_UACC, | ||
| 73 | KC_CAPS, _______, SECRET0, SECRET3, SECRET4, MOUSE, NUMPAD, _______, _______, IT_LBRC, IT_RBRC, IT_BSLS, | ||
| 74 | _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END | ||
| 75 | ), | ||
| 76 | |||
| 77 | /* Numpad | ||
| 78 | * ,-----------------------------------------------------------------------------------. | ||
| 79 | * | | | | | | | | 7 | 8 | 9 | - | Bksp | | ||
| 80 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 81 | * | | | | | | | | 4 | 5 | 6 | + | | | ||
| 82 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 83 | * | | | | | | |NUMPAD| 1 | 2 | 3 | = | Ent | | ||
| 84 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 85 | * | | | | | | | | | 0 | / | * | | | ||
| 86 | * `-----------------------------------------------------------------------------------' | ||
| 87 | */ | ||
| 88 | [_NUMPAD] = LAYOUT_ortho_4x12( | ||
| 89 | _______, _______, _______, _______, _______, _______, _______, IT_7, IT_8, IT_9, IT_MINS, KC_BSPC, | ||
| 90 | _______, _______, _______, _______, _______, _______, _______, IT_4, IT_5, IT_6, IT_PLUS, _______, | ||
| 91 | _______, _______, _______, _______, _______, _______, NUMPAD, IT_1, IT_2, IT_3, IT_EQL, KC_ENT, | ||
| 92 | _______, _______, _______, _______, _______, _______, _______, _______, IT_0, IT_SLSH, IT_ASTR, _______ | ||
| 93 | ), | ||
| 94 | |||
| 95 | /* Adjust (Lower + Raise) | ||
| 96 | * ,-----------------------------------------------------------------------------------. | ||
| 97 | * | |Querty| |ResetE|Reset | | | | | | | | | ||
| 98 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 99 | * | | | |Debug | | | | | | | | | | ||
| 100 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 101 | * | | | | | | | |Music |MusON |MusOff| | | | ||
| 102 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 103 | * | | | | | | | |Voice-|Aud On|Audoff|Voice+| | ||
| 104 | * `-----------------------------------------------------------------------------------' | ||
| 105 | */ | ||
| 106 | [_ADJUST] = LAYOUT_ortho_4x12( | ||
| 107 | _______, DF(QWERTY), _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, | ||
| 108 | _______, _______, _______, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 109 | _______, _______, _______, _______, _______, _______, MU_MOD, MU_ON, MU_OFF, _______, _______, _______, | ||
| 110 | _______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, AU_ON, AU_OFF, MUV_IN | ||
| 111 | ), | ||
| 112 | |||
| 113 | |||
| 114 | /* Function | ||
| 115 | * ,-----------------------------------------------------------------------------------. | ||
| 116 | * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | | ||
| 117 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 118 | * | | F1 | F2 | F3 | F4 | F5 | Left | Down | Up | Right| | | | ||
| 119 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 120 | * | | F6 | F7 | F8 | F9 | F10 | F1 | F2 | F3 | F4 | F5 | | | ||
| 121 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 122 | * | | | | | | | | RAISE| | | | | | ||
| 123 | * `-----------------------------------------------------------------------------------' | ||
| 124 | */ | ||
| 125 | |||
| 126 | [_FN] = LAYOUT_ortho_4x12( | ||
| 127 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, | ||
| 128 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, | ||
| 129 | _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, | ||
| 130 | _______, _______, _______, _______, _______, _______, _______, TG(_RAISE), _______, _______, _______, _______ | ||
| 131 | ), | ||
| 132 | |||
| 133 | /* MOUSE | ||
| 134 | * ,-----------------------------------------------------------------------------------. | ||
| 135 | * | | | | | | | | | | | | | | ||
| 136 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 137 | * | | | | | | | | | | | | | | ||
| 138 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 139 | * | | | | | | MOUSE| | | |Scr Up|Scr Do| | | ||
| 140 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 141 | * | | | | |But1 | | |But2 | Left | Down | Up |Right | | ||
| 142 | * `-----------------------------------------------------------------------------------' | ||
| 143 | */ | ||
| 144 | |||
| 145 | [_MOUSE] = LAYOUT_ortho_4x12( | ||
| 146 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 147 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 148 | _______, _______, _______, _______, _______, MOUSE, _______, _______, _______, KC_MS_WH_DOWN, KC_MS_WH_UP, _______, | ||
| 149 | _______, _______, _______, _______, KC_MS_BTN1, _______, _______, KC_MS_BTN2, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT | ||
| 150 | ) | ||
| 151 | |||
| 152 | }; | ||
| 153 | |||
| 154 | #ifdef AUDIO_ENABLE | ||
| 155 | float plover_song[][2] = SONG(PLOVER_SOUND); | ||
| 156 | float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); | ||
| 157 | #endif | ||
| 158 | |||
| 159 | |||
| 160 | bool muse_mode = false; | ||
| 161 | uint8_t last_muse_note = 0; | ||
| 162 | uint16_t muse_counter = 0; | ||
| 163 | uint8_t muse_offset = 70; | ||
| 164 | uint16_t muse_tempo = 50; | ||
| 165 | |||
| 166 | void encoder_update(bool clockwise) { | ||
| 167 | if (muse_mode) { | ||
| 168 | if (IS_LAYER_ON(_RAISE)) { | ||
| 169 | if (clockwise) { | ||
| 170 | muse_offset++; | ||
| 171 | } else { | ||
| 172 | muse_offset--; | ||
| 173 | } | ||
| 174 | } else { | ||
| 175 | if (clockwise) { | ||
| 176 | muse_tempo+=1; | ||
| 177 | } else { | ||
| 178 | muse_tempo-=1; | ||
| 179 | } | ||
| 180 | } | ||
| 181 | } else { | ||
| 182 | if (clockwise) { | ||
| 183 | #ifdef MOUSEKEY_ENABLE | ||
| 184 | tap_code(KC_MS_WH_DOWN); | ||
| 185 | #else | ||
| 186 | tap_code(KC_PGDN); | ||
| 187 | #endif | ||
| 188 | } else { | ||
| 189 | #ifdef MOUSEKEY_ENABLE | ||
| 190 | tap_code(KC_MS_WH_UP); | ||
| 191 | #else | ||
| 192 | tap_code(KC_PGUP); | ||
| 193 | #endif | ||
| 194 | } | ||
| 195 | } | ||
| 196 | } | ||
| 197 | |||
| 198 | void matrix_scan_user(void) { | ||
| 199 | #ifdef AUDIO_ENABLE | ||
| 200 | if (muse_mode) { | ||
| 201 | if (muse_counter == 0) { | ||
| 202 | uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; | ||
| 203 | if (muse_note != last_muse_note) { | ||
| 204 | stop_note(compute_freq_for_midi_note(last_muse_note)); | ||
| 205 | play_note(compute_freq_for_midi_note(muse_note), 0xF); | ||
| 206 | last_muse_note = muse_note; | ||
| 207 | } | ||
| 208 | } | ||
| 209 | muse_counter = (muse_counter + 1) % muse_tempo; | ||
| 210 | } | ||
| 211 | #endif | ||
| 212 | } | ||
| 213 | |||
| 214 | bool music_mask_user(uint16_t keycode) { | ||
| 215 | switch (keycode) { | ||
| 216 | case RAISE: | ||
| 217 | case LOWER: | ||
| 218 | return false; | ||
| 219 | default: | ||
| 220 | return true; | ||
| 221 | } | ||
| 222 | } | ||
diff --git a/keyboards/planck/keymaps/sigul/readme.md b/keyboards/planck/keymaps/sigul/readme.md new file mode 100644 index 000000000..12dbab36b --- /dev/null +++ b/keyboards/planck/keymaps/sigul/readme.md | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | # An ANSI Italian Planck Layout | ||
| 2 | by Silvio Gulizia | ||
| 3 | |||
| 4 | - [x] add layer _FN with F keys and VI navigation | ||
| 5 | - [x] add layer _MOUSE with mouse keys | ||
| 6 | - [x] add "MOUSEKEY_ENABLE = yes" in rules.mk to enable mouse keys | ||
| 7 | - [x] add definition to control the mouse movementes in config.h | ||
| 8 | - [x] add layer _NUMPAD to have a numpad | ||
| 9 | - [x] add keycode NUMPAD to toggle _NUMPAD | ||
| 10 | - [x] modify layer ADJUST to simplify remembering commands | ||
| 11 | - [x] add custom keycodes ESCFN and TABFN on QUERTY to add the ability to use arrows with hjkl by activating layer FN when held with the definition LT(_FN,KC_ESC) and LT(_FN, KC_TAB) | ||
| 12 | - [x] added "#define USB_MAX_POWER_CONSUMPTION 100" in config.h to use the keyboard with the iPad | ||
| 13 | - [x] add "#define TAPPING_TOGGLE 3" in config.h to enable tapping toggle with 3 taps on LOWER, RAISE and MOUSE keys | ||
| 14 | - [x] add tapping toggle to LOWER, RAISE and MOUSE keys | ||
| 15 | - [x] add "KEY_LOCK_ENABLE = yes" in rules.mk to enable caps lock | ||
| 16 | - [x] add caps lock (KC_CAPS) to RAISE layer on the shift key | ||
| 17 | - [x] Add del to a thumb layer | ||
| 18 | - [x] remove key lock because it can only be used on standard keys | ||
| 19 | - [x] Add MT(MOD_LSFT, KC_ENT) shift when pressed, enter when tapped | ||
| 20 | - [x] add home, end, pgup and pgwon on _RAISE instead of arrows | ||
| 21 | - [x] add shift enter | ||
| 22 | - [x] change LSFT to S for more legibility | ||
| 23 | - [x] MT(kc) per usare shift come tasto es: MOD_LSFT(LCAG(KC_UP)). ??? MT(MOD_LSFT,KC_CAPS) | ||
| 24 | - [x] add macros on _FN to ouput website, email, tel, address, VAT ID credentials | ||
| 25 | - [x] remap F keys upon numbers on _FN | ||
| 26 | - [x] check audio functionality | ||
| 27 | - [x] Add LT(_FN, IT_D) on D on the Querty layer | ||
| 28 | |||
| 29 | - [ ] Add Hyper on ESC or TAB to be able to use it for custom keyboard shortcuts | ||
| 30 | - [ ] consider using layer configuration to have just one keymap (see as a reference qmk_firmware/layouts/community/ortho_4x12/bredfield/) | ||
| 31 | - [ ] add brightness up (KC_BRMU or KC_BRIU) and down (KC_BRMD or KC_BRID) | ||
| 32 | |||
| 33 | - [ ] add secrets file in user space to add passwords on a password layer | ||
| 34 | - [ ] consider adding midi on the planck | ||
| 35 | - [ ] consider adding AUTO_SHIFT_ENABLE = yes in rules.mk to be able to send shifted key depressing a key for twice the time | ||
| 36 | - [ ] revert IT_ to KC_ where not required | ||
| 37 | - [ ] add swap from Mac to Win key code on Adjust layer | ||
| 38 | - [ ] evaluate to add auto shift | ||
diff --git a/keyboards/planck/keymaps/sigul/rules.mk b/keyboards/planck/keymaps/sigul/rules.mk new file mode 100644 index 000000000..dcf16bef3 --- /dev/null +++ b/keyboards/planck/keymaps/sigul/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| SRC += muse.c | |||
