Skip to content

Instantly share code, notes, and snippets.

@burakcan
Created June 25, 2019 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save burakcan/76104ec321641c2a3332d3e1978d9923 to your computer and use it in GitHub Desktop.
Save burakcan/76104ec321641c2a3332d3e1978d9923 to your computer and use it in GitHub Desktop.
uint16_t last_keycode = _______;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_COMM:
if (last_keycode == KC_DOT) {
if (record -> event.pressed) {
register_code(KC_SLSH);
} else {
unregister_code(KC_SLSH);
}
last_keycode = KC_SLSH;
return false;
}
default:
last_keycode = keycode;
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment