2022-05-15 04:27:01 -07:00
|
|
|
#include "keymap_italian_mac_ansi.h"
|
2020-03-31 14:15:16 -07:00
|
|
|
#include "sigul.h"
|
|
|
|
|
|
|
|
__attribute__ ((weak))
|
|
|
|
layer_state_t layer_state_set_keymap (layer_state_t state) {
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
|
|
|
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
|
|
|
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
|
|
|
}
|
|
|
|
|
|
|
|
__attribute__ ((weak))
|
|
|
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
__attribute__ ((weak))
|
|
|
|
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
switch (keycode) {
|
|
|
|
|
|
|
|
case IT_SCCL:
|
|
|
|
if (record->event.pressed){
|
2022-10-16 06:14:40 -07:00
|
|
|
if (get_mods() & MOD_BIT(KC_LSFT) || get_mods() & MOD_BIT(KC_RIGHT_SHIFT)){
|
2020-03-31 14:15:16 -07:00
|
|
|
register_code16(IT_COLN);
|
|
|
|
} else {
|
|
|
|
register_code16(IT_SCLN);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
unregister_code16(IT_COLN);
|
|
|
|
unregister_code16(IT_SCLN);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case IT_APDQ:
|
|
|
|
if (record->event.pressed){
|
2022-10-16 06:14:40 -07:00
|
|
|
if (get_mods() & MOD_BIT(KC_LSFT) || get_mods() & MOD_BIT(KC_RIGHT_SHIFT)){
|
2021-07-05 16:05:11 -07:00
|
|
|
register_code16(IT_DQUO);
|
2020-03-31 14:15:16 -07:00
|
|
|
} else {
|
2021-07-05 16:05:11 -07:00
|
|
|
register_code16(IT_QUOT);
|
2020-03-31 14:15:16 -07:00
|
|
|
}
|
|
|
|
} else {
|
2021-07-05 16:05:11 -07:00
|
|
|
unregister_code16(IT_DQUO);
|
|
|
|
unregister_code16(IT_QUOT);
|
2020-03-31 14:15:16 -07:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case IT_CMLS:
|
|
|
|
if (record->event.pressed){
|
2022-10-16 06:14:40 -07:00
|
|
|
if (get_mods() & MOD_BIT(KC_LSFT) || get_mods() & MOD_BIT(KC_RIGHT_SHIFT)){
|
2020-03-31 14:15:16 -07:00
|
|
|
unregister_code16(KC_LSFT);
|
2021-07-05 16:05:11 -07:00
|
|
|
register_code16(IT_LABK);
|
2020-03-31 14:15:16 -07:00
|
|
|
register_code16(KC_LSFT);
|
|
|
|
} else {
|
|
|
|
register_code16(IT_COMM);
|
|
|
|
}
|
|
|
|
} else {
|
2021-07-05 16:05:11 -07:00
|
|
|
unregister_code16(IT_LABK);
|
2020-03-31 14:15:16 -07:00
|
|
|
unregister_code16(IT_COMM);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case IT_DTMR:
|
|
|
|
if (record->event.pressed){
|
2022-10-16 06:14:40 -07:00
|
|
|
if (get_mods() & MOD_BIT(KC_LSFT) || get_mods() & MOD_BIT(KC_RIGHT_SHIFT)){
|
2021-07-05 16:05:11 -07:00
|
|
|
register_code16(IT_RABK);
|
2020-03-31 14:15:16 -07:00
|
|
|
} else {
|
|
|
|
register_code16(IT_DOT);
|
|
|
|
}
|
|
|
|
} else {
|
2021-07-05 16:05:11 -07:00
|
|
|
unregister_code16(IT_RABK);
|
2020-03-31 14:15:16 -07:00
|
|
|
unregister_code16(IT_DOT);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case IT_SLQS:
|
|
|
|
if (record->event.pressed){
|
2022-10-16 06:14:40 -07:00
|
|
|
if (get_mods() & MOD_BIT(KC_LSFT) || get_mods() & MOD_BIT(KC_RIGHT_SHIFT)){
|
2021-07-05 16:05:11 -07:00
|
|
|
register_code16(IT_QUES);
|
2020-03-31 14:15:16 -07:00
|
|
|
} else {
|
|
|
|
register_code16(IT_SLSH);
|
|
|
|
}
|
|
|
|
} else {
|
2021-07-05 16:05:11 -07:00
|
|
|
unregister_code16(IT_QUES);
|
2020-03-31 14:15:16 -07:00
|
|
|
unregister_code16(IT_SLSH);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return process_record_keymap(keycode, record) && process_record_secrets(keycode, record);
|
|
|
|
};
|
|
|
|
|