Skip to content

Commit 9ae2649

Browse files
authored
convert more symbols to use SemKey
1 parent b9b0585 commit 9ae2649

7 files changed

Lines changed: 65 additions & 54 deletions

File tree

users/moutis/handsdown/vf-config.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,25 +161,26 @@
161161
// the above combos may compete for the same locations,
162162
// we'll define them all here.
163163
//
164-
#define HD_new_keys HD_LB0, HD_LM0 // new -- Since cmd/ctrl is on middle
165-
#define HD_open_keys HD_RB0, HD_RM0 // open -- these must be 2 handed, so combo
166-
#define HD_close_keys HD_RT0, HD_RM0 // close -- not strictly necessary?
167-
#define HD_quit_keys HD_LT0, HD_LM0 // quit -- because q is on symbol layer
168-
#define HD_find_keys HD_LM4, HD_LM0 // find selection
169-
#define HD_sall_keys HD_LB4, HD_LB1 // select all
170-
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
171-
#define HD_undo_keys HD_LB4, HD_LB3 // undo
164+
#define HD_new_keys HD_LB0, HD_LM0 // new -- Since cmd/ctrl is on middle
165+
#define HD_open_keys HD_RB0, HD_RM0 // open -- these must be 2 handed, so combo
166+
#define HD_close_keys HD_RT0, HD_RM0 // close -- not strictly necessary?
167+
#define HD_quit_keys HD_LT0, HD_LM0 // quit -- because q is on symbol layer
168+
#define HD_find_keys HD_LM4, HD_LM0 // find selection
169+
#define HD_sall_keys HD_LB4, HD_LB1 // select all
170+
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
171+
#define HD_undo_keys HD_LB4, HD_LB3 // undo
172172
#define HD_redo_keys HD_LB4, HD_LB3, HD_LB2 // redo
173-
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
174-
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)
173+
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
174+
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)
175175

176176
#define HD_tab_keys HD_LT4, HD_LT3 // tab
177177
#define HD_stab_keys HD_LT4, HD_LT3, HD_LT2 // Shift-tab
178178
#define HD_spc_keys HD_LM1, HD_LM0 // SPACE
179179
#define HD_ent_keys HD_LB0, HD_LB1 // ENTER
180180
#define HD_ent2_keys HD_LB0, HD_LB1, HD_LB2 // hard-ENTER/page break
181-
#define APPMENU_keys HD_LT1, HD_LT0 // APPMENU
182-
#define APPMENU_nav_keys LN_LT1, LN_LT0 // APPMENU
181+
#define APPMENU_keys HD_LT1, HD_LT0 // APPMENU
182+
#define APPMENU_nav_keys LN_LT1, LN_LT0 // APPMENU
183+
#define H_l_num_keys HD_LH1, HD_RH1 // toggle nav/num layer
183184

184185
// TEXT ENTRY - off map standard alphas (also on Layer L_SYM @ Z=LT4 & Q=LT3)
185186
//

users/moutis/moutis.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ enum my_layers {// must be difined before semantickeys.h
147147
L_QWERTY, // 0 - QWERTY compatibility layer
148148
L_HD, // 1 - Hands Down Alpha layer
149149
L_SYM, // 2 - symbols, punctuation, off-map alphas
150-
L_FUN, // 3 - function & number rows
151-
L_NUM, // 4 - numpad (right); navpad (left)
152-
L_NAV, // 5 - nav pad (right); meta keys (left)
150+
L_FUN, // 3 - function (left) & number rows (right)
151+
L_NUM, // 4 - navpad (left) & numpad (right)
152+
L_NAV, // 5 - meta keys (left) & nav pad (right)
153153
L_CFG, // 6 - Media/Consumer controls; Keyboard settings
154154
L_count
155155
};

users/moutis/moutis_combo.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -764,10 +764,10 @@ void matrix_scan_user_process_combo() { // called from matrix_scan_user if comb
764764
#endif // EN_HDIGRAPH_COMBOS
765765

766766
case HC_AT:
767-
send_string(At_ComboHeld);
767+
tap_SemKey(SK_No); // ordinal number symbol
768768
break;
769769
case HC_COLN: // held, so …
770-
tap_code16(A(KC_SCLN)); // (this could use semkeys)
770+
tap_SemKey(SK_ELPS); //
771771
break;
772772
case HC_OE:
773773
case HC_Q:
@@ -777,7 +777,7 @@ void matrix_scan_user_process_combo() { // called from matrix_scan_user if comb
777777
tap_code16(KC_PERC); // Held, so send % (instead of =)
778778
break;
779779
case HC_NDSH: // Held, so send M-Dash (instead of N-Dash).
780-
tap_code16(A(S(KC_MINS))); // this should use semkeys
780+
tap_code16(SK_MDSH); // M-Dash
781781
break;
782782

783783
case PC_STAB:
@@ -805,35 +805,35 @@ void matrix_scan_user_process_combo() { // called from matrix_scan_user if comb
805805
tap_code16(KC_TILD);
806806
break;
807807
case PC_DASH:
808-
tap_code16(A(KC_MINS)); // this should use semkeys
808+
tap_SemKey(SK_NDSH); //
809809
break;
810810
// case HC_ELIP:
811811
case PC_ELIP:
812-
tap_code16(A(KC_SCLN)); // this should use semkeys
812+
tap_SemKey(SK_ELPS); //
813813
break;
814814
case PC_EURO:
815-
tap_code16(A(S(KC_2))); // this should use semkeys
815+
tap_SemKey(SK_EURO); //
816816
break;
817817
case PC_CENT:
818-
tap_code16(A(KC_4)); // this should use semkeys
818+
tap_SemKey(SK_CENT); // ¢
819819
break;
820820
case PC_JYEN:
821-
tap_code16(A(KC_Y)); // this should use semkeys
821+
tap_SemKey(SK_JPY); // ¥
822822
break;
823823
case PC_BPND:
824-
tap_code16(A(KC_3)); // this should use semkeys
824+
tap_SemKey(SK_BPND); // £
825825
break;
826826
case PC_NEQL:
827-
tap_code16(A(KC_EQL)); // this should use semkeys
827+
tap_SemKey(SK_NOTEQ); //
828828
break;
829829
case PC_DIV:
830-
tap_code16(A(KC_SLSH)); // this should use semkeys
830+
tap_SemKey(SK_DIV); // ÷
831831
break;
832832
case PC_PLMN:
833-
tap_code16(A(S(KC_EQL))); // this should use semkeys
833+
tap_SemKey(SK_PLMN); // ±
834834
break;
835835
case PC_DEG:
836-
tap_code16(A(KC_0)); // this should use semkeys
836+
tap_SemKey(SK_DEGR); // º
837837
break;
838838

839839

@@ -892,7 +892,7 @@ void matrix_scan_user_process_combo() { // called from matrix_scan_user if comb
892892
tap_code16(KC_C); // this should use semkeys? ç
893893
break;
894894
case HC_ENYE:
895-
tap_code16(KC_N); // this should use semkeys? ñ
895+
tap_SemKey(SK_ENYE); //
896896
break;
897897

898898

users/moutis/moutis_combo.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ enum my_combos {
4242
HC_CFG, // The keyboard and media config/settings layer
4343
HC_CFG2, // The keyboard and media config/settings layer
4444
HC_APP,
45-
HC_APPNAV, // App menu on Nav layer
45+
HC_APPNAV, // App menu w/ Nav layer
46+
HC_HDl_num, // TOGGLE nav / numpad layer
47+
HC_LNl_num, // TOGGLE nav / numpad layer
4648
HC_CAPW, // CAPS WORD for all others
4749
FC_CAPS, // CAPS LOCK (others)
4850
FC_LANG2, // eisuu/mhen (others)
@@ -230,7 +232,7 @@ enum my_combos {
230232
// may repeat as appropriate. (tap_code vs register_code)
231233
//
232234
PC_STAB, // Shift-<tab>
233-
PC_TGNM, // TOGGLE NUMLCK on numpad layer
235+
PC_TGNM, // TOGGLE NUMLCK (on numpad layer)
234236
PC_DASH, // – on number layer (keypad)
235237
PC_TILD, // ˜
236238
PC_ELIP, // …

users/moutis/moutis_combo_def.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const uint16_t PROGMEM H_menu_nav_combo[] = {APPMENU_nav_keys, COMBO_END}; // Ap
2828
#else
2929
const uint16_t PROGMEM H_menu_nav_combo[] = {LV_LT1, LV_LT0, COMBO_END}; // AppMENU on Nav layer
3030
#endif
31+
const uint16_t PROGMEM H_HDl_num_combo[] = {HD_LH1, HD_RH1, COMBO_END}; // Toggle num layer
32+
const uint16_t PROGMEM H_LNl_num_combo[] = {LN_LH1, LN_RH1, COMBO_END}; // Toggle num layer
3133

3234
// Spatially arranged on the QWERTY ZXCV locations
3335
//
@@ -317,6 +319,8 @@ combo_t key_combos[] = {
317319
[HC_CFG2] = COMBO(HC_cfg_combo2, MO(L_CFG)), // keyboard/media settings/config layer
318320
[HC_APP] = COMBO(H_menu_combo, KC_APP), // app menu
319321
[HC_APPNAV] = COMBO(H_menu_nav_combo, KC_APP), // app menu
322+
[HC_HDl_num] = COMBO(H_HDl_num_combo, TG(L_NUM)), // toggle num layer
323+
[HC_LNl_num] = COMBO(H_LNl_num_combo, TG(L_NUM)), // toggle num layer
320324
[HC_SCLN] = COMBO(Hscln_combo, KC_SCLN), // ;
321325
[HC_COLN] = COMBO_ACTION(Hcoln_combo), // : (hold for elipsis)
322326
[HC_UNDS] = COMBO(Hunds_combo, S(KC_UNDS)), // _ underscore

users/moutis/moutis_semantickeys.c

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -99,41 +99,43 @@ const uint16_t SemKeys_t[SK_count][OS_count] = {
9999
[SK_idx(SK_WINNXT)] = {C(KC_TAB),C(KC_TAB)}, // Window/tab switcher Next
100100
[SK_idx(SK_WINPRV)] = {C(S(KC_TAB)),C(S(KC_TAB))}, // Window/tab switcher Prev
101101
// Punctuation & typography
102-
[SK_idx(SK_NDSH)] = {LSA(KC_MINS),0x8150}, // — N-Dash ** need Win Compose via BCD?
103-
[SK_idx(SK_MDSH)] = {LSA(KC_MINS),0x8151}, // — M-Dash ** need Win Compose via BCD?
104-
[SK_idx(SK_ELPS)] = {A(KC_SCLN),0x8133}, // … ** need Win Compose via BCD?
105-
[SK_idx(SK_SCRS)] = {LSA(KC_5),0x8134}, // † Single Cross ** need Win Compose via BCD?
106-
[SK_idx(SK_DCRS)] = {LSA(KC_7),0x8135}, // ‡ Double Cross ** need Win Compose via BCD?
107-
[SK_idx(SK_BBLT)] = {A(KC_8),0x8149}, // • Bold Bullet ** need Win Compose via BCD?
108-
[SK_idx(SK_SBLT)] = {LSA(KC_9),0x8183}, // · Small Bullet ** need Win Compose via BCD?
109-
[SK_idx(SK_PARA)] = {A(KC_7),0x8182}, // ¶ ** need Win Compose via BCD?
110-
[SK_idx(SK_SECT)] = {A(KC_5),0x8167}, // § ** need Win Compose via BCD.
102+
[SK_idx(SK_NDSH)] = {LSA(KC_MINS),0x8150}, // — N-Dash
103+
[SK_idx(SK_MDSH)] = {LSA(KC_MINS),0x8151}, // — M-Dash
104+
[SK_idx(SK_ELPS)] = {A(KC_SCLN),0x8133}, // …
105+
[SK_idx(SK_SCRS)] = {LSA(KC_5),0x8134}, // † Single Cross
106+
[SK_idx(SK_DCRS)] = {LSA(KC_7),0x8135}, // ‡ Double Cross
107+
[SK_idx(SK_BBLT)] = {A(KC_8),0x8149}, // • Bold Bullet
108+
[SK_idx(SK_SBLT)] = {LSA(KC_9),0x8183}, // · Small Bullet
109+
[SK_idx(SK_PARA)] = {A(KC_7),0x8182}, // ¶
110+
[SK_idx(SK_SECT)] = {A(KC_5),0x8167}, // §
111111
// Number & Math symbols
112112
[SK_idx(SK_DEGR)] = {LSA(KC_8),0x8176}, // ° DEGREE
113113
[SK_idx(SK_GTEQ)] = {A(KC_DOT),0x4242}, // ≥ Greater Than or Equal to
114114
[SK_idx(SK_LTEQ)] = {A(KC_COMM),0x4243}, // ≤ Less Than or Equal to
115115
[SK_idx(SK_PLMN)] = {LSA(KC_EQL),0x8177}, // ± Plus/Minus
116-
[SK_idx(SK_NOTEQ)] = {A(KC_EQL),ALGR(KC_EQL)}, // ≠ NOT Equal to ** need Win Compose via ?????
116+
[SK_idx(SK_DIV) ] = {A(KC_SLSH),0x4246}, // ÷ Divide
117+
[SK_idx(SK_NOTEQ)] = {A(KC_EQL),ALGR(KC_EQL)}, // ≠ NOT Equal to
117118
[SK_idx(SK_APXEQ)] = {A(KC_X),0x4247}, // ≈ APPROX Equal to
118119
[SK_idx(SK_OMEGA)] = {A(KC_Z),0x4234}, // Ω OMEGA
119120
// Currency
120-
[SK_idx(SK_EURO)] = {LSA(KC_2),0x8128}, // € ** need Win Compose via BCD?
121-
[SK_idx(SK_CENT)] = {A(KC_4),0x8162}, // ¢ ** need Win Compose via BCD?
122-
[SK_idx(SK_BPND)] = {A(KC_3),0x8163}, // £ ** need Win Compose via BCD?
123-
[SK_idx(SK_JPY )] = {A(KC_Y),0x8165}, // ¥ ** need Win Compose via BCD?
121+
[SK_idx(SK_EURO)] = {LSA(KC_2),0x8128}, // €
122+
[SK_idx(SK_CENT)] = {A(KC_4),0x8162}, // ¢
123+
[SK_idx(SK_BPND)] = {A(KC_3),0x8163}, // £
124+
[SK_idx(SK_JPY )] = {A(KC_Y),0x8165}, // ¥
125+
[SK_idx(SK_No )] = {LSA(KC_SCLN),0x8470}, // № ordinal number symbol *wrong alt code*
124126
// Quotations
125-
[SK_idx(SK_SQUL)] = {A(KC_RBRC),0x8145}, // ’ ** Left single quote UNICODE?
126-
[SK_idx(SK_SQUR)] = {LSA(KC_RBRC),0x8146}, // ’ ** Right single quote UNICODE?
127-
[SK_idx(SK_SDQL)] = {A(KC_LBRC),0x8147}, // “ ** Left double quote UNICODE?
128-
[SK_idx(SK_SDQR)] = {LSA(KC_LBRC),0x8148}, // ” ** Right double quote UNICODE?
129-
[SK_idx(SK_FDQL)] = {A(KC_BSLS),0x8171}, // « Left double French quote UNICODE?
130-
[SK_idx(SK_FDQR)] = {LSA(KC_BSLS),0x8187}, // » Right double French quote UNICODE?
131-
[SK_idx(SK_FSQL)] = {LSA(KC_3),0x8139}, // ‹ Left single French quote UNICODE?
132-
[SK_idx(SK_FSQR)] = {LSA(KC_4),0x8155}, // › Right single French quote UNICODE?
127+
[SK_idx(SK_SQUL)] = {A(KC_RBRC),0x8145}, // ’ ** Left single quote
128+
[SK_idx(SK_SQUR)] = {LSA(KC_RBRC),0x8146}, // ’ ** Right single quote
129+
[SK_idx(SK_SDQL)] = {A(KC_LBRC),0x8147}, // “ ** Left double quote
130+
[SK_idx(SK_SDQR)] = {LSA(KC_LBRC),0x8148}, // ” ** Right double quote
131+
[SK_idx(SK_FDQL)] = {A(KC_BSLS),0x8171}, // « Left double French quote
132+
[SK_idx(SK_FDQR)] = {LSA(KC_BSLS),0x8187}, // » Right double French quote
133+
[SK_idx(SK_FSQL)] = {LSA(KC_3),0x8139}, // ‹ Left single French quote
134+
[SK_idx(SK_FSQR)] = {LSA(KC_4),0x8155}, // › Right single French quote
133135
[SK_idx(SK_IQUE)] = {LSA(KC_SLASH),0x8191}, // ¿ Spanish inverted Question Mark
134136
[SK_idx(SK_IEXC)] = {A(KC_1),0x8161}, // ¡ Spanish inverted Exclamation Mark
135137
// Composed letters with diacritics
136-
[SK_idx(SK_ENYE)] = {A(KC_N),ALGR(KC_N)} // ñ/Ñ ** need Win Compose via BCD?
138+
[SK_idx(SK_ENYE)] = {A(KC_N),ALGR(KC_N)} // ñ/Ñ
137139
/* Eventually… all these should be handled as SemKeys as well?
138140
HD_aumlt,
139141
HD_amacr,

users/moutis/moutis_semantickeys.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ enum my_keycodes {
110110
SK_GTEQ, // ≥ Greater Than or Equal to
111111
SK_LTEQ, // ≤ Less Than or Equal to
112112
SK_PLMN, // ± Plus/Minus
113+
SK_DIV, // ÷ Divide symbol
113114
SK_NOTEQ, // ≠ NOT Equal to
114115
SK_APXEQ, // ≈ APPROX Equal to
115116
SK_OMEGA, // Ω OMEGA
@@ -118,6 +119,7 @@ enum my_keycodes {
118119
SK_CENT, // ¢
119120
SK_BPND, // £
120121
SK_JPY, // ¥
122+
SK_No, // № ordinal number symbol
121123
// Quotations
122124
SK_SQUL, // ’ Left single quote (linger for paired)
123125
SK_SQUR, // ’ Right single quote

0 commit comments

Comments
 (0)