2022-05-15 17:27:01 +06:00
|
|
|
#include "keymap_italian_mac_ansi.h"
|
2020-04-01 03:15:16 +06: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){
|
|
|
|
if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
|
|
|
|
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){
|
|
|
|
if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
|
2021-07-06 05:05:11 +06:00
|
|
|
register_code16(IT_DQUO);
|
2020-04-01 03:15:16 +06:00
|
|
|
} else {
|
2021-07-06 05:05:11 +06:00
|
|
|
register_code16(IT_QUOT);
|
2020-04-01 03:15:16 +06:00
|
|
|
}
|
|
|
|
} else {
|
2021-07-06 05:05:11 +06:00
|
|
|
unregister_code16(IT_DQUO);
|
|
|
|
unregister_code16(IT_QUOT);
|
2020-04-01 03:15:16 +06:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case IT_CMLS:
|
|
|
|
if (record->event.pressed){
|
|
|
|
if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
|
|
|
|
unregister_code16(KC_LSFT);
|
2021-07-06 05:05:11 +06:00
|
|
|
register_code16(IT_LABK);
|
2020-04-01 03:15:16 +06:00
|
|
|
register_code16(KC_LSFT);
|
|
|
|
} else {
|
|
|
|
register_code16(IT_COMM);
|
|
|
|
}
|
|
|
|
} else {
|
2021-07-06 05:05:11 +06:00
|
|
|
unregister_code16(IT_LABK);
|
2020-04-01 03:15:16 +06:00
|
|
|
unregister_code16(IT_COMM);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case IT_DTMR:
|
|
|
|
if (record->event.pressed){
|
|
|
|
if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
|
2021-07-06 05:05:11 +06:00
|
|
|
register_code16(IT_RABK);
|
2020-04-01 03:15:16 +06:00
|
|
|
} else {
|
|
|
|
register_code16(IT_DOT);
|
|
|
|
}
|
|
|
|
} else {
|
2021-07-06 05:05:11 +06:00
|
|
|
unregister_code16(IT_RABK);
|
2020-04-01 03:15:16 +06:00
|
|
|
unregister_code16(IT_DOT);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case IT_SLQS:
|
|
|
|
if (record->event.pressed){
|
|
|
|
if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){
|
2021-07-06 05:05:11 +06:00
|
|
|
register_code16(IT_QUES);
|
2020-04-01 03:15:16 +06:00
|
|
|
} else {
|
|
|
|
register_code16(IT_SLSH);
|
|
|
|
}
|
|
|
|
} else {
|
2021-07-06 05:05:11 +06:00
|
|
|
unregister_code16(IT_QUES);
|
2020-04-01 03:15:16 +06:00
|
|
|
unregister_code16(IT_SLSH);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return process_record_keymap(keycode, record) && process_record_secrets(keycode, record);
|
|
|
|
};
|
|
|
|
|