aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBatuhan Baserdem <bbaserdem@users.noreply.github.com>2017-09-21 00:19:57 -0400
committerJack Humbert <jack.humb@gmail.com>2017-09-21 00:19:57 -0400
commit31e78d22b47fb78b1adaf12f5330ac169e90add0 (patch)
tree1855322bac7e3c4264460069e6e0711d5a812204
parentea7792b6c6a09d98598f25989e08b262641b9b26 (diff)
downloadqmk_firmware-31e78d22b47fb78b1adaf12f5330ac169e90add0.tar.gz
qmk_firmware-31e78d22b47fb78b1adaf12f5330ac169e90add0.zip
Turkish planck keymap (#1675)
* Adding keymap * Adding keymap * Compiles now, but doesn't flash * Fixes issues with compilation * Trying to fix issues with tap-dance layer * Trying to fix issues with tap-dance layer * Trying to fix issues with tap-dance layer * Fixed bbaserdem layout * Added keyboard layout image * Edited README.md * Changed layout and removed image from README.md * Changed tapping terms * Changed layout a bit
-rw-r--r--keyboards/planck/keymaps/bbaserdem/Makefile23
-rw-r--r--keyboards/planck/keymaps/bbaserdem/README.md35
-rw-r--r--keyboards/planck/keymaps/bbaserdem/config.h44
-rw-r--r--keyboards/planck/keymaps/bbaserdem/keymap.c413
4 files changed, 515 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/bbaserdem/Makefile b/keyboards/planck/keymaps/bbaserdem/Makefile
new file mode 100644
index 000000000..9c6bd8e19
--- /dev/null
+++ b/keyboards/planck/keymaps/bbaserdem/Makefile
@@ -0,0 +1,23 @@
1# Build options
2
3# ENABLE
4TAP_DANCE_ENABLE = yes
5UNICODE_ENABLE = yes
6MOUSEKEY_ENABLE = yes
7EXTRAKEY_ENABLE = yes
8NKRO_ENABLE = yes
9BACKLIGHT_ENABLE = yes
10AUDIO_ENABLE = yes
11
12# DISABLE
13BOOTMAGIC_ENABLE = no
14MIDI_ENABLE = no
15
16# Not for planck
17RGBLIGHT_ENABLE = no #Clashes with audio
18BLUETOOTH_ENABLE = no #No bluetooth
19SLEEP_LED_ENABLE = no #Uses BACKLIGHT_ENABLE rimer
20
21ifndef QUANTUM_DIR
22 include ../../../../Makefile
23endif
diff --git a/keyboards/planck/keymaps/bbaserdem/README.md b/keyboards/planck/keymaps/bbaserdem/README.md
new file mode 100644
index 000000000..881307566
--- /dev/null
+++ b/keyboards/planck/keymaps/bbaserdem/README.md
@@ -0,0 +1,35 @@
1# Planck Layout
2
3Built this planck layout to use DVORAK with an unorthodox Turkish layout.
4If you used a previous layout with a persistent base layer change,
5change it to 0 before proceeding.
6The layout has the following functionality
7
8* **QWERTY** can be toggled on/off from **Function** layer.
9* **Mouse** layer allows manipulation of the mouse.
10* **Function** layer has F and special keys.
11* **Symbol** layer has numericals and symbols.
12* **Game** layout can be toggled on/off from **Function** layer.
13* **Music** layer allows playing sounds like a keyboard.
14
15Double tapping **Mouse**, **Function** and **Symbol** layers activate them until deacivation.
16Topleftmost key turns off **Function**, **Symbol**, **Game** and **Music** layers,
17and puts the board into *reset* mode from the **Mouse** layer.
18
19# Using Turkish letters
20
21Instead of a turkish F keyboard layout (very inconvenient to code in),
22I opted to modulate characters like an *AltGr* impleentation.
23Tap and holding *Alt* on **DVORAK** and **QWERTY** layer will change some letters
24to Turkish equivelants.
25Shifting these letters will work.
26The keycodes should transmit the correct unicode characters combined with shift.
27The turkish letters are sent via the unicode implementation.
28No software layout change is neccessary (hence making coding easier).
29By default, the unicode is set to Linux mode. Switch to windows (non-persistent)
30can be done from the associated key in **Function** layer.
31**Symbol** layer also has the symbol for Turkish Lira.
32
33# To improve
34
35I want to write a couple pieces of my own music for layer switching.
diff --git a/keyboards/planck/keymaps/bbaserdem/config.h b/keyboards/planck/keymaps/bbaserdem/config.h
new file mode 100644
index 000000000..d7632aecd
--- /dev/null
+++ b/keyboards/planck/keymaps/bbaserdem/config.h
@@ -0,0 +1,44 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6#ifdef AUDIO_ENABLE
7 // Compose own song in future
8 #define STARTUP_SONG SONG(PLANCK_SOUND)
9
10 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
11 SONG(COLEMAK_SOUND), \
12 SONG(DVORAK_SOUND) \
13 }
14#endif
15
16// Enables tap magic
17#define TAPPING_TERM 300
18#define TAPPING_TOGGLE 1
19
20/*
21 * MIDI options
22 */
23
24/* Prevent use of disabled MIDI features in the keymap */
25//#define MIDI_ENABLE_STRICT 1
26
27/* enable basic MIDI features:
28 - MIDI notes can be sent when in Music mode is on
29*/
30
31#define MIDI_BASIC
32
33/* enable advanced MIDI features:
34 - MIDI notes can be added to the keymap
35 - Octave shift and transpose
36 - Virtual sustain, portamento, and modulation wheel
37 - etc.
38*/
39//#define MIDI_ADVANCED
40
41/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
42//#define MIDI_TONE_KEYCODE_OCTAVES 2
43
44#endif
diff --git a/keyboards/planck/keymaps/bbaserdem/keymap.c b/keyboards/planck/keymaps/bbaserdem/keymap.c
new file mode 100644
index 000000000..74dfabdec
--- /dev/null
+++ b/keyboards/planck/keymaps/bbaserdem/keymap.c
@@ -0,0 +1,413 @@
1/* Copyright 2015-2017 Jack Humbert
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "planck.h"
18
19#define _______ KC_TRNS
20#define XXX KC_NO
21
22#define _DV 0
23#define _TD 1
24#define _GM 2
25#define _MO 3
26#define _SY 4
27#define _FN 5
28#define _MS 6
29
30#define PARAN TD(PAR)
31#define CURLY TD(CUR)
32#define SQUAR TD(SQU)
33#define ANGUL TD(ANG)
34
35#define UNDO LCTL(KC_Z)
36#define REDO LCTL(KC_Y)
37#define COPYCUT TD(CPC)
38#define PASTE LCTL(KC_V)
39
40#define MO_SC_U KC_MS_WH_UP
41#define MO_SC_D KC_MS_WH_DOWN
42#define MO_SC_L KC_MS_WH_LEFT
43#define MO_SC_R KC_MS_WH_RIGHT
44#define MO_U KC_MS_UP
45#define MO_D KC_MS_DOWN
46#define MO_L KC_MS_LEFT
47#define MO_R KC_MS_RIGHT
48#define MO_CL_L KC_MS_BTN1
49#define MO_CL_R KC_MS_BTN2
50#define MO_CL_M KC_MS_BTN3
51#define MO_CL_1 KC_MS_BTN4
52#define MO_CL_2 KC_MS_BTN5
53#define MO_AC_0 KC_MS_ACCEL0
54#define MO_AC_1 KC_MS_ACCEL1
55#define MO_AC_2 KC_MS_ACCEL2
56
57#define PHY_HB UC(0x0127)
58#define PHY_DE UC(0xc2b0)
59#define TUR_TL UC(0x20ba)
60#define EUR_ER UC(0x20ac)
61#define EUR_PN UC(0x00a3)
62
63enum custom_keycodes {
64 TUR_A = SAFE_RANGE,
65 TUR_C,
66 TUR_G,
67 TUR_I,
68 TUR_O,
69 TUR_S,
70 TUR_U,
71 UNI_LI,
72 UNI_WN
73};
74
75// Tap dance
76enum {
77 ATD = 0,
78 CLS,
79 SCL,
80 QUO,
81 PAR,
82 CUR,
83 SQU,
84 ANG,
85 CPC
86};
87
88const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
89
90/* Dvorak
91 * ,------------------------------------------------------------------------.
92 * | Blt | " | , | . | P | Y || F | G | C | R | L | Bkp |
93 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
94 * | Esc | A | O | E | U | I || D | H | T | N | S | Del |
95 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
96 * |Sh\CL| ; : | Q | J | K | X || B | M | W | V | Z |MOUSE|
97 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
98 * | Ctl | Alt | Meta| Tab | SYM | Spc || Ent | FUN | Lft | Dwn | Up | Rgt |
99 * `------------------------------------------------------------------------'
100 */
101[_DV] = {
102 {BL_STEP,TD(QUO),KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
103 {KC_ESC ,KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_DEL },
104 {TD(CLS),TD(SCL),KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, TT(_MO)},
105 {KC_LCTL,TD(ATD),KC_LGUI,KC_TAB, TT(_SY),KC_SPC, KC_ENT, TT(_FN),KC_LEFT,KC_DOWN,KC_UP, KC_RGHT}
106},
107[_TD] = {
108 {_______,_______,_______,_______,_______,_______,_______, TUR_G, TUR_C, _______,_______,_______},
109 {_______, TUR_A, TUR_O, _______, TUR_U, TUR_I, _______, PHY_HB,_______,_______, TUR_S, _______},
110 {_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______},
111 {_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______}
112},
113
114/* Game layer
115 * ,------------------------------------------------------------------------.
116 * | OFF | Q | W | E | R | T || F1 | F2 | Ctrl| ^ |Shift| Esc |
117 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
118 * | ~ | A | S | D | F | G || F3 | F4 | < | v | > |Enter|
119 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
120 * | Shf | Z | X | C | V | B || F5 | F6 | , | . | / ? | Alt |
121 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
122 * | Alt | Ctrl| ` ~ | - _ | | Spc || Spc | | 1 | 2 | 3 | 4 |
123 * `------------------------------------------------------------------------'
124 */
125[_GM] = {
126 {TG(_GM),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F1, KC_F2, KC_RCTL,KC_UP, KC_RSFT,KC_ESC },
127 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F3, KC_F4, KC_LEFT,KC_DOWN,KC_RGHT,KC_ENT },
128 {KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F5, KC_F6, KC_COMM,KC_DOT, KC_SLSH,KC_RALT},
129 {KC_LALT,KC_LCTL,KC_GRV, KC_MINS,_______,KC_SPC, KC_SPC, _______,KC_1, KC_2, KC_3, KC_4 }
130},
131
132/* Mouse control layer
133 * ,------------------------------------------------------------------------.
134 * | |.....| ^ |.....|.....|Acc 2||.....|.....|.....| |^| |.....| |
135 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
136 * | | < | v | > |.....|Acc 1||.....|.....| <-- | |v| | --> | |
137 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
138 * | | Left| Mid |Right|.....|Acc 0||.....|.....|Btn 4|.....|Btn 5| |
139 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
140 * | | | | | | || | | | | | |
141 * `------------------------------------------------------------------------'
142 */
143[_MO] = {
144 {TG(_MO),XXX, MO_U, XXX, XXX, MO_AC_2,XXX, XXX, XXX, MO_SC_U,XXX, _______},
145 {_______,MO_L, MO_D, MO_R, XXX, MO_AC_1,XXX, XXX, MO_SC_L,MO_SC_D,MO_SC_R,_______},
146 {_______,MO_CL_L,MO_CL_M,MO_CL_R,XXX, MO_AC_0,XXX, XXX, MO_CL_1,XXX, MO_CL_2,_______},
147 {_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______}
148},
149
150/* Symbols layer
151 * ,------------------------------------------------------------------------.
152 * | OFF | ! | 1 | 2 | 3 | & || = | + | - | * | % | |
153 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
154 * | _ | ( ) | 4 | 5 | 6 | \ || / | [ ] | { } | < > | | | |
155 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
156 * |degre| ? | 7 | 8 | 9 | ~ || ` | @ | # | $ | ^ | |
157 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
158 * | | | | 0 | | || | |TLira| Euro|Pound| |
159 * `------------------------------------------------------------------------'
160 */
161
162[_SY] = {
163 {TG(_SY),KC_EXLM,KC_1, KC_2, KC_3, KC_AMPR,KC_EQL, KC_PLUS,KC_MINS,KC_ASTR,KC_PERC,_______},
164 {KC_UNDS,PARAN, KC_4, KC_5, KC_6, KC_BSLS,KC_SLSH,SQUAR, CURLY, ANGUL, KC_PIPE,_______},
165 {PHY_DE, KC_QUES,KC_7, KC_8, KC_9, KC_TILD,KC_GRV, KC_AT, KC_HASH,KC_DLR, KC_CIRC,_______},
166 {_______,_______,_______,KC_0, _______,_______,_______,_______,TUR_TL, EUR_ER, EUR_PN, _______}
167},
168
169/* Function layer
170 * ,------------------------------------------------------------------------.
171 * | OFF | game|music| | |RESET||RESET| win | lin | wake|sleep|power|
172 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
173 * | F1 | F2 | F3 | F4 | F5 | F6 || F7 | F8 | F9 | F10 | F11 | F12 |
174 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
175 * | | undo| redo|cutcp|paste|vol 0||prtsc| ins | rev.| stop| play| next|
176 * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
177 * | | | | | |vol -||vol +| | home|pg dn|pg up| end |
178 * `------------------------------------------------------------------------'
179 */
180
181[_FN] = {
182 {TG(_FN),TG(_GM),MU_ON, _______,_______,RESET, RESET, UNI_LI, UNI_WN ,KC_WAKE,KC_SLEP,KC_PWR },
183 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
184 {_______,UNDO, REDO, COPYCUT,PASTE, KC_MUTE,KC_PSCR,KC_INS, KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT},
185 {_______,_______,_______,_______,_______,KC_VOLD,KC_VOLU,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END }
186},
187
188/* Music layer
189 * ,-----------------------------------------------------------------------.
190 * | OFF |rec S| stop| play|sped^|spedv|cycle|.....|.....|.....|.....|.....|
191 * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
192 * |.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|
193 * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
194 * |.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|
195 * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
196 * |.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|
197 * `-----------------------------------------------------------------------'
198 */
199[_MS] = {
200 { MU_OFF, KC_LCTL, KC_LALT, KC_LGUI, KC_UP, KC_DOWN, MU_MOD, XXX, XXX, XXX, XXX, XXX },
201 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX },
202 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX },
203 { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }
204}
205};
206
207// Set unicode method to linux.
208void matrix_init_user(){
209 set_unicode_input_mode(UC_LNX);
210}
211
212// User defined keys
213bool process_record_user(uint16_t keycode, keyrecord_t *record) {
214 // This section is a bit tedious in VIM, so I shortened lines
215 // Check for shift letter
216 bool is_capital = ( keyboard_report->mods &
217 (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) ) ^
218 ( keyboard_report->mods & MOD_BIT(KC_CAPS) );
219 switch (keycode) {
220 // Add music layer to music functionality
221 case MU_ON:
222 if (record->event.pressed) { layer_on(_MS); }
223 return true; break;
224 case MU_OFF:
225 if (record->event.pressed) { layer_off(_MS); }
226 return true; break;
227 // Turkish letters keycodes
228 case TUR_A:
229 if (record->event.pressed) {
230 if ( is_capital ) {
231 unicode_input_start(); register_hex(0x00c2); unicode_input_finish();
232 } else {
233 unicode_input_start(); register_hex(0x00e2); unicode_input_finish();
234 }
235 }
236 return false; break;
237 case TUR_U:
238 if (record->event.pressed) {
239 if ( is_capital ) {
240 unicode_input_start(); register_hex(0x00dc); unicode_input_finish();
241 } else {
242 unicode_input_start(); register_hex(0x00fc); unicode_input_finish();
243 }
244 }
245 return false; break;
246 case TUR_I:
247 if (record->event.pressed) {
248 if ( is_capital ) {
249 unicode_input_start(); register_hex(0x0130); unicode_input_finish();
250 } else {
251 unicode_input_start(); register_hex(0x0131); unicode_input_finish();
252 }
253 }
254 return false; break;
255 case TUR_O:
256 if (record->event.pressed) {
257 if ( is_capital ) {
258 unicode_input_start(); register_hex(0x00d6); unicode_input_finish();
259 } else {
260 unicode_input_start(); register_hex(0x00f6); unicode_input_finish();
261 }
262 }
263 return false; break;
264 case TUR_S:
265 if (record->event.pressed) {
266 if ( is_capital ) {
267 unicode_input_start(); register_hex(0x015e); unicode_input_finish();
268 } else {
269 unicode_input_start(); register_hex(0x015f); unicode_input_finish();
270 }
271 }
272 return false; break;
273 case TUR_G:
274 if (record->event.pressed) {
275 if ( is_capital ) {
276 unicode_input_start(); register_hex(0x011e); unicode_input_finish();
277 } else {
278 unicode_input_start(); register_hex(0x011f); unicode_input_finish();
279 }
280 }
281 return false; break;
282 case TUR_C:
283 if (record->event.pressed) {
284 if ( is_capital ) {
285 unicode_input_start(); register_hex(0x00c7); unicode_input_finish();
286 } else {
287 unicode_input_start(); register_hex(0x00e7); unicode_input_finish();
288 }
289 }
290 return false; break;
291 // Keys to change unicode mode
292 case UNI_LI:
293 if( record->event.pressed ) {
294 set_unicode_input_mode(UC_LNX);
295 }
296 return false; break;
297 case UNI_WN:
298 if( record->event.pressed ) {
299 set_unicode_input_mode(UC_WIN);
300 }
301 return false; break;
302 }
303 return true;
304}
305
306// Tap dance feature for the altgr implementation
307void altgr_dvo_tap (qk_tap_dance_state_t *state, void *user_data) {
308 if (state->count == 1) {
309 register_code (KC_RALT);
310 } else if (state->count == 2) {
311 unregister_code (KC_RALT);
312 layer_on(_TD);
313 } else if (state->count == 3) {
314 layer_off(_TD);
315 }
316}
317void altgr_dvo_end (qk_tap_dance_state_t *state, void *user_data) {
318 if (state->count == 1) {
319 unregister_code (KC_RALT);
320 } else if (state->count == 2) {
321 layer_off(_TD);
322 }
323}
324
325// Shift vs capslock function
326void caps_tap (qk_tap_dance_state_t *state, void *user_data) {
327 if (state->count == 1) {
328 register_code (KC_LSFT);
329 } else if (state->count == 2) {
330 unregister_code (KC_LSFT);
331 register_code (KC_CAPS);
332 }
333}
334void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) {
335 if (state->count == 1) {
336 unregister_code (KC_LSFT);
337 } else {
338 unregister_code (KC_CAPS);
339 }
340}
341
342// Parantheses
343void paranthesis_dance (qk_tap_dance_state_t *state, void *user_data) {
344 if (state->count == 1) {
345 SEND_STRING("()"); register_code(KC_LEFT); unregister_code(KC_LEFT);
346 } else if (state->count == 2) {
347 SEND_STRING("(");
348 } else if (state->count == 3) {
349 SEND_STRING(")");
350 }
351}
352void curly_dance (qk_tap_dance_state_t *state, void *user_data) {
353 if (state->count == 1) {
354 SEND_STRING("{}"); register_code(KC_LEFT); unregister_code(KC_LEFT);
355 } else if (state->count == 2) {
356 SEND_STRING("{");
357 } else if (state->count == 3) {
358 SEND_STRING("}");
359 }
360}
361
362void square_dance (qk_tap_dance_state_t *state, void *user_data) {
363 if (state->count == 1) {
364 SEND_STRING("[]"); register_code(KC_LEFT); unregister_code(KC_LEFT);
365 } else if (state->count == 2) {
366 SEND_STRING("[");
367 } else if (state->count == 3) {
368 SEND_STRING("]");
369 }
370}
371
372void angular_dance (qk_tap_dance_state_t *state, void *user_data) {
373 if (state->count == 1) {
374 SEND_STRING("<>"); register_code(KC_LEFT); unregister_code(KC_LEFT);
375 } else if (state->count == 2) {
376 SEND_STRING("<");
377 } else if (state->count == 3) {
378 SEND_STRING(">");
379 }
380}
381
382// Copy or cut feature
383void copy_cut (qk_tap_dance_state_t *state, void *user_data) {
384 if (state->count == 1) {
385 register_code (KC_LCTL);
386 register_code (KC_C);
387 unregister_code (KC_C);
388 unregister_code (KC_LCTL);
389 } else if (state->count == 2) {
390 register_code (KC_LCTL);
391 register_code (KC_X);
392 unregister_code (KC_X);
393 unregister_code (KC_LCTL);
394 }
395}
396
397// Tap dance feature
398qk_tap_dance_action_t tap_dance_actions[] = {
399 // Tap once for Left Ctrl, second one is momentory switch to layer TUR
400 [ATD] = ACTION_TAP_DANCE_FN_ADVANCED( altgr_dvo_tap, NULL, altgr_dvo_end )
401 // Advanced tap dance feature allows for immediate response to shift
402 ,[CLS] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end )
403 // Shifting for double quote and semicolon
404 ,[SCL] = ACTION_TAP_DANCE_DOUBLE( KC_SCLN, KC_COLN )
405 ,[QUO] = ACTION_TAP_DANCE_DOUBLE( KC_QUOT, KC_DQUO )
406 // Tap dances for paranthesis, which sends macros
407 ,[PAR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, paranthesis_dance )
408 ,[CUR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, curly_dance )
409 ,[SQU] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, square_dance )
410 ,[ANG] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, angular_dance )
411 // Tap dance for copy/cutting
412 ,[CPC] = ACTION_TAP_DANCE_FN( copy_cut )
413};