summaryrefslogtreecommitdiff
path: root/users/rverst
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-11-28 16:39:48 +1100
committerNick Brassel <nick@tzarc.org>2023-11-28 16:40:47 +1100
commit0115951de12bd4c798a43a380651c34552552e85 (patch)
tree62999011ae782d93aa6dc9c889615db2a840cafc /users/rverst
parent0379d1f59e58cefa18cdb72ba1b77507d1108ae6 (diff)
parent4d99e0a23cff02f4c6e55e093b5de08a9be0df7c (diff)
`develop` -> `master`, 2023q4 edition
Diffstat (limited to 'users/rverst')
-rw-r--r--users/rverst/config.h45
-rw-r--r--users/rverst/readme.md18
-rw-r--r--users/rverst/rules.mk9
-rw-r--r--users/rverst/rverst.c425
-rw-r--r--users/rverst/rverst.h85
-rw-r--r--users/rverst/unicode.h31
6 files changed, 0 insertions, 613 deletions
diff --git a/users/rverst/config.h b/users/rverst/config.h
deleted file mode 100644
index 52e7c861ca..0000000000
--- a/users/rverst/config.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright 2021 Robert Verst <robert@verst.eu> @rverst
- *
- * 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/>.
- */
-
-#pragma once
-
-#ifdef RGBLIGHT_ENABLE
-# define RGBLIGHT_SLEEP
-# undef RGBLIGHT_EFFECT_BREATHING
-# undef RGBLIGHT_EFFECT_RAINBOW_MOOD
-# undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
-# undef RGBLIGHT_EFFECT_SNAKE
-# undef RGBLIGHT_EFFECT_KNIGHT
-# undef RGBLIGHT_EFFECT_CHRISTMAS
-# undef RGBLIGHT_EFFECT_STATIC_GRADIENT
-# undef RGBLIGHT_EFFECT_RGB_TEST
-# undef RGBLIGHT_EFFECT_ALTERNATING
-# undef RGBLIGHT_EFFECT_TWINKLE
-# define RGBLIGHT_SLEEP
-# define RGBLIGHT_EFFECT_BREATHING
-# define RGBLIGHT_EFFECT_RAINBOW_MOOD
-# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
-# define RGBLIGHT_EFFECT_STATIC_GRADIENT
-# define RGBLIGHT_EFFECT_TWINKLE
-#endif // RGBLIGHT_ENABLE
-
-#if defined(LOCKING_SUPPORT_ENABLE)
-# undef LOCKING_SUPPORT_ENABLE
-#endif
-
-#if defined(LOCKING_RESYNC_ENABLE)
-# undef LOCKING_RESYNC_ENABLE
-#endif
diff --git a/users/rverst/readme.md b/users/rverst/readme.md
deleted file mode 100644
index b25af82db4..0000000000
--- a/users/rverst/readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Overview
-
-This is my user space, main goal is to unify the experience between different
-keyboard models and operating systems.
-My native language is German and I almost exclusively use keyboards in the
-US-ANSI layout. I find this layout the most practical for programming as
-far as the placement of special characters is concerned. However, when I write
-in German, I miss a few special characters like umlauts, etc.
-Since I also use different operating systems (MacOS, Linux and Windows)
-and especially Windows and MacOS behave very differently regarding the input
-of such characters (under Linux there is at least the Compose key).
-So I needed a hardware solution, and that's how I came to QMK.
-
-Here are defined some key codes to put the keyboard in different modes
-(Mac, Windows, Linux) and the corresponding functions to make the input.
-And some logic to store the respective mode and load it at boot time.
-
-You'll find a proper layout here: [keyborads/id80/keymaps/rverst](../../keyboards/id80/keymaps/rverst)
diff --git a/users/rverst/rules.mk b/users/rverst/rules.mk
deleted file mode 100644
index 2b8fe92959..0000000000
--- a/users/rverst/rules.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-SRC += rverst.c
-
-LEADER_ENABLE = no
-MOUSEKEY_ENABLE = no
-LTO_ENABLE = yes
-CONSOLE_ENABLE = yes
-UNICODEMAP_ENABLE = yes
-COMMAND_ENABLE = no
-
diff --git a/users/rverst/rverst.c b/users/rverst/rverst.c
deleted file mode 100644
index df37ba9b5f..0000000000
--- a/users/rverst/rverst.c
+++ /dev/null
@@ -1,425 +0,0 @@
-/* Copyright 2021 Robert Verst <robert@verst.eu> @rverst
- *
- * 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 "rverst.h"
-#include "print.h"
-
-#ifdef UNICODEMAP_ENABLE
-# include "unicode.h"
-#endif
-
-userspace_config_t userspace_config;
-
-uint8_t get_mode(void) {
- int m = 0;
- if (userspace_config.mode_1) {
- m += 1;
- }
- if (userspace_config.mode_2) {
- m += 2;
- }
- if (userspace_config.mode_3) {
- m += 4;
- }
-
- return m;
-}
-
-void set_mode(uint8_t mode, bool save) {
- dprintf("set_mode - mode: %d, save: %s\n", mode, save ? "true" : "false");
- switch_mode(mode);
-
- if (mode > 7) {
- mode = 7;
- }
-
- if (mode >= 4) {
- userspace_config.mode_3 = true;
- mode -= 4;
- } else {
- userspace_config.mode_3 = false;
- }
-
- if (mode >= 2) {
- userspace_config.mode_2 = true;
- mode -= 2;
- } else {
- userspace_config.mode_2 = false;
- }
-
- if (mode > 0) {
- userspace_config.mode_1 = true;
- } else {
- userspace_config.mode_1 = false;
- }
-
- if (save) {
- eeconfig_update_user(userspace_config.raw);
- }
-}
-
-void switch_mode(uint8_t mode) {
-#ifdef UNICODEMAP_ENABLE
- switch (mode) {
- case MAC_UNI:
- set_unicode_input_mode(UNICODE_MODE_MACOS);
- break;
- case WINDOWS_UNI:
- set_unicode_input_mode(UNICODE_MODE_WINCOMPOSE);
- break;
- case LINUX_UNI:
- set_unicode_input_mode(UNICODE_MODE_LINUX);
- break;
- }
-#endif
-}
-
-bool is_unicode(uint8_t mode) { return (mode == MAC_UNI) || (mode == WINDOWS_UNI) || (mode == LINUX_UNI); }
-
-//**********************
-// keyboard_pre_init
-//**********************
-__attribute__((weak)) void keyboard_pre_init_keymap(void) {}
-
-void keyboard_pre_init_user(void) {
- userspace_config.raw = eeconfig_read_user();
- switch_mode(get_mode());
- keyboard_pre_init_keymap();
-}
-
-//************************
-// keyboard_post_init
-//************************
-__attribute__((weak)) void keyboard_post_init_keymap(void) {}
-
-void keyboard_post_init_user(void) {
- // debug_enable = true;
- // debug_matrix=true;
- // debug_keyboard = true;
-
-#ifdef RGBLIGHT_ENABLE
-
-#endif
-
- keyboard_post_init_keymap();
-}
-
-//**********************
-// eeconfig_init
-//**********************
-
-__attribute__((weak)) void eeconfig_init_keymap(void) {}
-
-void eeconfig_init_user(void) {
- userspace_config.raw = 0;
- eeconfig_update_user(userspace_config.raw);
- eeconfig_init_keymap();
- keyboard_init();
-}
-
-//**********************
-// process_record
-//**********************
-__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- if (!process_record_keymap(keycode, record)) {
- return false;
- }
-
- if (!record->event.pressed) {
- return true;
- }
-
- bool ls = (get_mods() | get_weak_mods()) & MOD_BIT(KC_LSFT);
- bool rs = (get_mods() | get_weak_mods()) & MOD_BIT(KC_RSFT);
- bool as = ls || rs;
-
- int mode = get_mode();
-
- switch (keycode) {
- case RV_SM0:
- case RV_SM0S:
- set_mode(MAC_UNI, keycode == RV_SM0S);
- return false;
- case RV_SM1:
- case RV_SM1S:
- set_mode(WINDOWS_UNI, keycode == RV_SM1S);
- return false;
- case RV_SM2:
- case RV_SM2S:
- set_mode(LINUX_UNI, keycode == RV_SM2S);
- return false;
- case RV_SM3:
- case RV_SM3S:
- set_mode(MAC, keycode == RV_SM3S);
- return false;
- case RV_SM4:
- case RV_SM4S:
- set_mode(WINDOWS, keycode == RV_SM4S);
- return false;
-
- case RV_SAYM:
- switch (mode) {
- case MAC:
- send_string("MacOS (normal)");
- break;
- case WINDOWS:
- send_string("Windows (normal)");
- break;
- case MAC_UNI:
- send_string("MacOS (unicode)");
- break;
- case WINDOWS_UNI:
- send_string("Windows (unicode)");
- break;
- case LINUX_UNI:
- send_string("Linux (unicode)");
- break;
- }
- return false;
-
- // Lock computer
- case RV_LOCK:
- if (mode == MAC || mode == MAC_UNI) {
- tap_code16(G(C(KC_Q)));
- } else if (mode == WINDOWS || mode == WINDOWS_UNI) {
- tap_code16(G(KC_L));
- }
- return false;
-
- // Screenshot
- case RV_SNAP:
- if (mode == MAC || mode == MAC_UNI) {
- if (ls) unregister_code(KC_LSFT);
- if (rs) unregister_code(KC_RSFT);
-
- tap_code16(G(S(as ? KC_4 : KC_5)));
-
- if (ls) register_code(KC_LSFT);
- if (rs) register_code(KC_RSFT);
- } else if (mode == WINDOWS || mode == WINDOWS_UNI) {
- tap_code16(G(S(KC_S)));
- }
- return false;
-
- // Umlauts - äÄöÖüÜ
- case RV_AUML:
- case RV_OUML:
- case RV_UUML:
- if (is_unicode(mode)) {
- if (keycode == RV_AUML) {
- if (as)
- send_unicode_string("Ä");
- else
- send_unicode_string("ä");
- } else if (keycode == RV_OUML) {
- if (as)
- send_unicode_string("Ö");
- else
- send_unicode_string("ö");
- } else if (keycode == RV_UUML) {
- if (as)
- send_unicode_string("Ü");
- else
- send_unicode_string("ü");
- }
- } else if (mode == MAC) {
- if (ls) unregister_code(KC_LSFT);
- if (rs) unregister_code(KC_RSFT);
-
- tap_code16(A(KC_U));
-
- if (as) register_code(KC_LSFT);
- if (keycode == RV_AUML) {
- tap_code(KC_A);
- } else if (keycode == RV_OUML) {
- tap_code(KC_O);
- } else if (keycode == RV_UUML) {
- tap_code(KC_U);
- }
- if (rs) {
- unregister_code(KC_LSFT);
- register_code(KC_RSFT);
- }
- } else if (mode == WINDOWS) {
- if (ls) unregister_code(KC_LSFT);
- if (rs) unregister_code(KC_RSFT);
-
- register_code(KC_RALT);
- tap_code(KC_1);
- if (keycode == RV_AUML) {
- if (as)
- tap_code(KC_4);
- else
- tap_code(KC_3);
- tap_code(KC_2);
- } else if (keycode == RV_OUML) {
- if (as) {
- tap_code(KC_5);
- tap_code(KC_3);
- } else {
- tap_code(KC_4);
- tap_code(KC_8);
- }
- } else if (keycode == RV_UUML) {
- if (as) {
- tap_code(KC_5);
- tap_code(KC_4);
- } else {
- tap_code(KC_2);
- tap_code(KC_9);
- }
- }
- unregister_code(KC_RALT);
-
- if (ls) register_code(KC_LSFT);
- if (rs) register_code(KC_RSFT);
- }
- return false;
-
- // Euro sign - €
- // with legacy-mode for MAC and WINDOWS without unicode support
- case RV_EUR:
- if (is_unicode(mode)) {
- send_unicode_string("€");
- } else if (mode == MAC) {
- tap_code16(S(A(KC_2)));
- } else if (mode == WINDOWS) {
- register_code(KC_RALT);
- tap_code(KC_0);
- tap_code(KC_1);
- tap_code(KC_2);
- tap_code(KC_8);
- unregister_code(KC_RALT);
- }
- return false;
-
- // Sharp-S - ß
- // with legacy-mode for MAC and WINDOWS without unicode support
- case RV_SZ:
- if (is_unicode(mode)) {
- if (as) {
- send_unicode_string("§");
- } else {
- send_unicode_string("ß");
- }
- } else if (mode == MAC) {
- tap_code16(A(KC_S));
- } else if (mode == WINDOWS) {
- register_code(KC_RALT);
- tap_code(KC_2);
- tap_code(KC_2);
- tap_code(KC_5);
- unregister_code(KC_RALT);
- }
- return false;
-
- // Trademark - ™
- case RV_TM:
- if (is_unicode(mode)) {
- send_unicode_string("™");
- }
- return false;
-
- // Registered trademark - ®
- case RV_RT:
- if (is_unicode(mode)) {
- send_unicode_string("®");
- }
- return false;
-
- // Copyright - ©
- case RV_CC:
- if (is_unicode(mode)) {
- send_unicode_string("©");
- }
- return false;
-
- // Degree - °
- case RV_DEG:
- if (is_unicode(mode)) {
- send_unicode_string("°");
- }
- return false;
-
- // Plus-minus - ±
- case RV_PM:
- if (is_unicode(mode)) {
- send_unicode_string("±");
- }
- return false;
-
- // Not equal - ≠
- case RV_UNEQ:
- if (is_unicode(mode)) {
- send_unicode_string("≠");
- }
- return false;
-
- // Superscript one - ¹
- case RV_SUP1:
- if (is_unicode(mode)) {
- send_unicode_string("¹");
- }
- return false;
-
- // Superscript two - ²
- case RV_SUP2:
- if (is_unicode(mode)) {
- send_unicode_string("²");
- }
- return false;
-
- // Superscript three - ³
- case RV_SUP3:
- if (is_unicode(mode)) {
- send_unicode_string("³");
- }
- return false;
- // vim equal split
- case RV_SEQU:
- tap_code16(C(KC_W));
- tap_code(KC_EQL);
- return false;
- // vim vertical split increase
- case RV_VINC:
- tap_code16(C(KC_W));
- tap_code(KC_4);
- tap_code16(S(KC_DOT));
- return false;
- // vim vertical split decrease
- case RV_VDEC:
- tap_code16(C(KC_W));
- tap_code(KC_4);
- tap_code16(S(KC_COMM));
- return false;
- // vim split increase
- case RV_SINC:
- tap_code16(C(KC_W));
- tap_code(KC_4);
- tap_code16(S(KC_EQL));
- return false;
- // vim split decrease
- case RV_SDEC:
- tap_code16(C(KC_W));
- tap_code(KC_4);
- tap_code(KC_MINS);
- return false;
- }
-
- return true;
-}
diff --git a/users/rverst/rverst.h b/users/rverst/rverst.h
deleted file mode 100644
index 2e46d41d06..0000000000
--- a/users/rverst/rverst.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright 2021 Robert Verst <robert@verst.eu> @rverst
- *
- * 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/>.
- */
-
-#pragma once
-
-#include QMK_KEYBOARD_H
-
-enum userspace_mode {
- MAC = 0,
- WINDOWS,
- MAC_UNI,
- WINDOWS_UNI,
- LINUX_UNI,
-};
-
-enum userspace_keycodes {
- RV_NON = SAFE_RANGE,
- RV_SM0, // set Mac Unicode mode
- RV_SM1, // set Window Unicode mode
- RV_SM2, // set Linux Unicode mode
- RV_SM3, // set Mac lagecy mode
- RV_SM4, // set Windows legacy mode
- RV_SM0S, // set Mac Unicode mode and save
- RV_SM1S, // set Windows Unicode mode and save
- RV_SM2S, // set Linux Unicode and save
- RV_SM3S, // set Mac legacy mode
- RV_SM4S, // set Windows legacy and save
- RV_SAYM, // say mode
- RV_LOCK, // lock computer
- RV_AUML, // äÄ
- RV_OUML, // öÖ
- RV_UUML, // üÜ
- RV_EUR, // €
- RV_SZ, // ߧ
- RV_TM, // ™
- RV_RT, // ®
- RV_CC, // ©
- RV_DEG, // °
- RV_SNAP, // Screenshot
- RV_PM, // ±
- RV_UNEQ, // ≠
- RV_SUP1, // ¹
- RV_SUP2, // ²
- RV_SUP3, // ³
- RV_VINC, // vim increase vertical split size (<c-w> 4>)
- RV_VDEC, // vim decrease vertical split size (<c-w> 4<)
- RV_SINC, // vim increase vertical split size (<c-w> 4+)
- RV_SDEC, // vim decrease vertical split size (<c-w> 4-)
- RV_SEQU, // vim equal split size (<c-w> =)
-};
-
-typedef union {
- uint32_t raw;
- struct {
- bool mode_1 : 1;
- bool mode_2 : 1;
- bool mode_3 : 1;
- };
-} userspace_config_t;
-
-extern userspace_config_t userspace_config;
-
-uint8_t get_mode(void);
-void set_mode(uint8_t mode, bool save);
-void switch_mode(uint8_t mode);
-bool is_unicode(uint8_t mode);
-
-void keyboard_pre_init_keymap(void);
-void keyboard_post_init_keymap(void);
-void eeconfig_init_keymap(void);
-bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
-
diff --git a/users/rverst/unicode.h b/users/rverst/unicode.h
deleted file mode 100644
index 4a92d32038..0000000000
--- a/users/rverst/unicode.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2021 Robert Verst <robert@verst.eu> @rverst
- *
- * 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/>.
- */
-
-#pragma once
-
-#ifdef UNICODE_SELECTED_MODES
-# undef UNICODE_SELECTED_MODES
-# define UNICODE_SELECTED_MODES UNICODE_MODE_MACOS, UNICODE_MODE_LINUX, UNICODE_MODE_WINCOMPOSE
-#endif
-
-enum unicode_names { BANG, IRONY, SNEK };
-
-const uint32_t unicode_map[] PROGMEM = {
- [BANG] = 0x203D,
- [IRONY] = 0x2E2E,
- [SNEK] = 0x1F40D,
-};
-