summaryrefslogtreecommitdiff
path: root/users/ericgebhart/lang/locales.c
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2023-11-26 18:36:45 +0000
committerGitHub <noreply@github.com>2023-11-27 05:36:45 +1100
commit1ed03f498fa204178c2696c510ac6a2cd8524e2d (patch)
treeb97c1f983b7e4b57c007d0feedadd3ad3e39062b /users/ericgebhart/lang/locales.c
parent4908d4b1ca260efecf3613e6517aa3a6f2034876 (diff)
Remove userspace keymaps (#22544)
Diffstat (limited to 'users/ericgebhart/lang/locales.c')
-rw-r--r--users/ericgebhart/lang/locales.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/users/ericgebhart/lang/locales.c b/users/ericgebhart/lang/locales.c
deleted file mode 100644
index 560dec13b7..0000000000
--- a/users/ericgebhart/lang/locales.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#include "ericgebhart.h"
-#include "locales.h"
-
-bool process_locales(uint16_t keycode, keyrecord_t *record) {
-
- switch (keycode) {
- case KC_SET_BASE:
- // set the current default base to eeprom.
- if (record->event.pressed) {
- set_single_persistent_default_layer(get_highest_layer(default_layer_state));
- }
- break;
-
- // choose a different set of default layers based on locales.
- case KC_NEXT_LOCALE:
- // choose another locale and set the default base to the first layer.
- if (!record->event.pressed) {
- if (current_locale + 1 < LOCALES_END){
- current_locale++;
- }else{
- current_locale = 0;
- }
- default_layer_set(1UL << LOCALE_LAYER_RANGE[0]);
- }
- return false;
- break;
-
- // choose a different base layer based on locales.
- // simply iterates over the list and sets the default layer.
- case KC_NEXT_BASE_LAYER:
- if (!record->event.pressed) {
- uint8_t current = get_highest_layer(default_layer_state);
- if (current < LOCALE_LAYER_RANGE[1]){
- current++;
- }else{
- current = LOCALE_LAYER_RANGE[0];
- }
- default_layer_set(1UL << current);
- }
- return false;
- break;
- }
- return true;
-}