diff options
author | Silvio Gulizia <desk@silviogulizia.com> | 2020-03-31 23:15:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-31 14:15:16 -0700 |
commit | e5b10079cfaf9bd3cfb25781f2847a6ca4590fd4 (patch) | |
tree | 6922477b0d8bd550d99e17501102d3ba743e904b | |
parent | 854d46f833e57fa3b2b3b29c0230cba8f3e95a6e (diff) | |
download | qmk_firmware-e5b10079cfaf9bd3cfb25781f2847a6ca4590fd4.tar.gz qmk_firmware-e5b10079cfaf9bd3cfb25781f2847a6ca4590fd4.zip |
[Keymap] Sigul planck (#8546)
* remove IT_PIPE duplicate and add IT_GRAD
IT_PIPE was declared 2 times, ones as ° and once as |. I changed the first declaration and called it IT_GRAD. I even fixed the definition because the ° in Italian is obtained with LSFT(IT_AACC)
* rename IT_GRAD to IT_DEGR
* fix missing music mode legend
* add missing plus_and_minus
* fix missing IT_ACUT definition
* change KC_LALT(KC_LSFT to LALT(LSFT
* Fix alignment
* remove leftover
* fix issue generated with chars while pushing
* fix typo
* add sigul folder in Planck keymaps
* fix LCBR and RCBR
* fix euro symbol
* fix RBRC
* change IT_LESS form KC_NUBS to KC_GRAVE
* add IT_TILDE and change IT_GRAV to IT_GRAVE
* initial commit
* add ideas to readme
* comment key lock
* add a bunch of new features as stated in readme.md
* check features added and list to do
* add macros on RAISE
* add F keys on numbers row on FN layer
* flag features added
* fix macro formulas
* move DESK and SGCOM under D and S
* invert IT_EACC and S(IT_EACC) to align the layout with that of the default Planck
* invert IT_EACC and S(IT_EACC) to align the layout with that of the default Planck
fix spaces for readability
* add missing legends for accented vowels
* format for readability
* move MOUSE button on B (same key that activates it) on MOUSE layer
* revert to commit befor I edit it
* initial commit
* edited to be easier to compare to _ansi.h
* remove keymap_italian_osx_iso.h and rename with edits keymap_italian_osx_ansi.h to keymap_italian_osx.h
I found out there were no difference at all
* fix missing #endif
* change the included file from italian.h to italian_osx.h
* fix debug key
* edit Numapd layer, add enter and bsps
* change TAPPING_TOGGLE from 2 to 3
* change italian_osx.h to italian_ansi.h
* rename quantum/keymap_extras/keymap_italian_osx.h to quantum/keymap_extras/keymap_italian_ansi.h
Now this file is a clone of the keymap_italian.h that appears to be working only for ISO keyboards. It also contains a few improvements for IT_PIPE (defined two times) and IT_ACUT (missing definition). Additionally it redefines LCBR and RCBR to LSFT(IT_LBRC) and LSFT(IT_RBRC)
* rename file
* redefines IT_BKSL and IT_PIPE based on KC_BKSL
* merge new italian
* add new osx_iso and osx_ansi version for italian.h and align BKSL to BSLS, fix double definition of PIPE
* rename BKSL to BSLS
* add FN_D and some comments
* add MOUSEKEY configuration
* update
* edit swap =/+ with ò/ì
* merge with master
* add MS_B to have _MOUSE when pressing B
* move RAISE on _FN
* add phone number
* remove CONTRA folder
* remove CONTRA folder
* Update keyboards/planck/keymaps/sigul/keymap.c
fix include definition
Co-Authored-By: Ryan <fauxpark@gmail.com>
* remove default planck kemap
* remove extern keymap_config_t keymap_config;
based on suggestion from @fauxpark, It's not needed as it should already be externed through one of the includes provided by QMK_KEYBOARD_H.
Co-Authored-By: Ryan <fauxpark@gmail.com>
* add user space for user sigul
* remove custom config moved to user space sigul
* comment tri layers state (moved to user space)
* remove tri layers update comment (code moved in user space)
* add secrets
* move enum and define to userspace
* Edit title
* move enum and define to sigul.h
* add thanks
* edit: moving to userspace enum, define and process_records
* add enum and defines
* add process_records
* cleaning code after moving code to user space
* add process_records
* cleaning code
* adding rules to manage secrets
* remove secretes
* first commit
* add macro timer
* add keycodes macro
* edit custom keycodes order
* add strings to send inside the secrets array
* remove codes for secrets & change secret to secrets
* edit secrets keycodes
* edit keycodes names and order
* add secrets.h and secrets.c
* add #pragma once
Co-Authored-By: Joel Challis <git@zvecr.com>
* Update .gitignore
Co-Authored-By: Joel Challis <git@zvecr.com>
* add local gitignore for secrets
* remove secrets
* update for secrets
* change FN_D to IT_D
* remove FN_D definition
Co-authored-by: pisilvio <silvio@picampus.it>
Co-authored-by: admin <admin@admins-MacBook-Pro.local>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
-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 | ||||
-rw-r--r-- | users/sigul/.gitignore | 2 | ||||
-rw-r--r-- | users/sigul/README.md | 17 | ||||
-rw-r--r-- | users/sigul/config.h | 21 | ||||
-rw-r--r-- | users/sigul/rules.mk | 8 | ||||
-rw-r--r-- | users/sigul/sigul.c | 100 | ||||
-rw-r--r-- | users/sigul/sigul.h | 42 |
10 files changed, 490 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 | |||
diff --git a/users/sigul/.gitignore b/users/sigul/.gitignore new file mode 100644 index 000000000..12165fdbd --- /dev/null +++ b/users/sigul/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | secrets.h | ||
2 | secrets.c | ||
diff --git a/users/sigul/README.md b/users/sigul/README.md new file mode 100644 index 000000000..a8f705e15 --- /dev/null +++ b/users/sigul/README.md | |||
@@ -0,0 +1,17 @@ | |||
1 | Copyright 2020 Silvio Gulizia desk@silviogulizia.com @sigul | ||
2 | |||
3 | Userspace by Silvio Gulizia | ||
4 | Contains code for ANSI / Italian layouts. | ||
5 | |||
6 | This program is free software: you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation, either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
diff --git a/users/sigul/config.h b/users/sigul/config.h new file mode 100644 index 000000000..dc0cd0f07 --- /dev/null +++ b/users/sigul/config.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #pragma once | ||
2 | |||
3 | // My custom configurations | ||
4 | #define TAPPING_TOGGLE 3 // enable tapping toggle, used to lock level with a custom keycode defined by TT (in my case RAISE, LOWER and MOUSE) | ||
5 | #define USB_MAX_POWER_CONSUMPTION 100 // required to be able to use the keyboard with iPad | ||
6 | |||
7 | // Settings for using the keybaord as a mouse | ||
8 | #define MOUSEKEY_DELAY 30 | ||
9 | // Delay between pressing a movement key and cursor movement | ||
10 | #define MOUSEKEY_INTERVAL 16 | ||
11 | // Time between cursor movements | ||
12 | #define MOUSEKEY_MAX_SPEED 3 | ||
13 | // Maximum cursor speed at which acceleration stops | ||
14 | #define MOUSEKEY_TIME_TO_MAX 40 | ||
15 | // Time until maximum cursor speed is reached | ||
16 | #define MOUSEKEY_WHEEL_MAX_SPEED 0 | ||
17 | // Maximum number of scroll steps per scroll action | ||
18 | #define MOUSEKEY_WHEEL_TIME_TO_MAX 0 | ||
19 | // Time until maximum scroll speed is reached | ||
20 | |||
21 | #define MACRO_TIMER 5 | ||
diff --git a/users/sigul/rules.mk b/users/sigul/rules.mk new file mode 100644 index 000000000..e272957d0 --- /dev/null +++ b/users/sigul/rules.mk | |||
@@ -0,0 +1,8 @@ | |||
1 | SRC += sigul.c | ||
2 | MOUSEKEY_ENABLE = yes | ||
3 | |||
4 | ifneq ($(strip $(NO_SECRETS)), yes) | ||
5 | ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") | ||
6 | SRC += secrets.c | ||
7 | endif | ||
8 | endif | ||
diff --git a/users/sigul/sigul.c b/users/sigul/sigul.c new file mode 100644 index 000000000..0995ca736 --- /dev/null +++ b/users/sigul/sigul.c | |||
@@ -0,0 +1,100 @@ | |||
1 | #include "keymap_italian_osx_ansi.h" | ||
2 | #include "sigul.h" | ||
3 | |||
4 | __attribute__ ((weak)) | ||
5 | layer_state_t layer_state_set_keymap (layer_state_t state) { | ||
6 | return state; | ||
7 | } | ||
8 | |||
9 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
10 | return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); | ||
11 | } | ||
12 | |||
13 | __attribute__ ((weak)) | ||
14 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
15 | return true; | ||
16 | } | ||
17 | |||
18 | __attribute__ ((weak)) | ||
19 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { | ||
20 | return true; | ||
21 | } | ||
22 | |||
23 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
24 | switch (keycode) { | ||
25 | |||
26 | case IT_SCCL: | ||
27 | if (record->event.pressed){ | ||
28 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ | ||
29 | register_code16(IT_COLN); | ||
30 | } else { | ||
31 | register_code16(IT_SCLN); | ||
32 | } | ||
33 | } else { | ||
34 | unregister_code16(IT_COLN); | ||
35 | unregister_code16(IT_SCLN); | ||
36 | } | ||
37 | return false; | ||
38 | break; | ||
39 | |||
40 | case IT_APDQ: | ||
41 | if (record->event.pressed){ | ||
42 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ | ||
43 | register_code16(IT_DQOT); | ||
44 | } else { | ||
45 | register_code16(IT_APOS); | ||
46 | } | ||
47 | } else { | ||
48 | unregister_code16(IT_DQOT); | ||
49 | unregister_code16(IT_APOS); | ||
50 | } | ||
51 | return false; | ||
52 | break; | ||
53 | |||
54 | case IT_CMLS: | ||
55 | if (record->event.pressed){ | ||
56 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ | ||
57 | unregister_code16(KC_LSFT); | ||
58 | register_code16(IT_LESS); | ||
59 | register_code16(KC_LSFT); | ||
60 | } else { | ||
61 | register_code16(IT_COMM); | ||
62 | } | ||
63 | } else { | ||
64 | unregister_code16(IT_LESS); | ||
65 | unregister_code16(IT_COMM); | ||
66 | } | ||
67 | return false; | ||
68 | break; | ||
69 | |||
70 | case IT_DTMR: | ||
71 | if (record->event.pressed){ | ||
72 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ | ||
73 | register_code16(IT_MORE); | ||
74 | } else { | ||
75 | register_code16(IT_DOT); | ||
76 | } | ||
77 | } else { | ||
78 | unregister_code16(IT_MORE); | ||
79 | unregister_code16(IT_DOT); | ||
80 | } | ||
81 | return false; | ||
82 | break; | ||
83 | |||
84 | case IT_SLQS: | ||
85 | if (record->event.pressed){ | ||
86 | if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ | ||
87 | register_code16(IT_QST); | ||
88 | } else { | ||
89 | register_code16(IT_SLSH); | ||
90 | } | ||
91 | } else { | ||
92 | unregister_code16(IT_QST); | ||
93 | unregister_code16(IT_SLSH); | ||
94 | } | ||
95 | return false; | ||
96 | break; | ||
97 | } | ||
98 | return process_record_keymap(keycode, record) && process_record_secrets(keycode, record); | ||
99 | }; | ||
100 | |||
diff --git a/users/sigul/sigul.h b/users/sigul/sigul.h new file mode 100644 index 000000000..dc24fae92 --- /dev/null +++ b/users/sigul/sigul.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "quantum.h" | ||
4 | |||
5 | enum userspace_layers { | ||
6 | _QWERTY, | ||
7 | _LOWER, //symbols | ||
8 | _RAISE, //numbers | ||
9 | _ADJUST, //system | ||
10 | _NUMPAD, | ||
11 | _FN, | ||
12 | _MOUSE | ||
13 | }; | ||
14 | |||
15 | enum userspace_custom_keycodes { | ||
16 | QWERTY = SAFE_RANGE, | ||
17 | // custom keycodes for an Italian ANSI layout with accented vowels | ||
18 | IT_CMLS, // IT_COMM and IT_LESS when combined with shift | ||
19 | IT_DTMR, // IT_DOT and IT_MORE when combined with shift | ||
20 | IT_SLQS, // IT_SLSH and IT_QST when combined with shift | ||
21 | IT_APDQ, // IT_APO and IT_DQOT when combined with shift | ||
22 | IT_SCCL, // IT_SMCL and IT_COLN when combined with shift | ||
23 | SECRET0, | ||
24 | SECRET1, | ||
25 | SECRET2, | ||
26 | SECRET3, | ||
27 | SECRET4, | ||
28 | NEW_SAFE_RANGE // start new keyboard-level declarations with NEW_SAFE_RANGE | ||
29 | }; | ||
30 | |||
31 | // Defining Layer Keycodes | ||
32 | #define QWERTY DF(_QWERTY) | ||
33 | // For LOWER and RAISE I use TT instead of MO to be able to lock those layer tapping three times the key (TAPPING_TOGGLE 3 has been added in sigul.h) | ||
34 | #define LOWER TT(_LOWER) | ||
35 | #define RAISE TT(_RAISE) | ||
36 | #define NUMPAD TG(_NUMPAD) | ||
37 | #define FN MO(_FN) | ||
38 | #define MOUSE TT(_MOUSE) | ||
39 | #define TABFN LT(_FN, KC_TAB) | ||
40 | #define ESCFN LT(_FN, KC_ESC) | ||
41 | #define MS_B LT(_MOUSE, IT_B) | ||
42 | |||